The thing is that systemd is missing from Centos 6.
Mini howto (using the console via SSH)
For example, the user from whose name will start synching will be “username” (to change at any).
Create user by command :
adduser -s /bin/bash -r username
- -r Create a system account with a UID less than 500 and without a home directory Next, enter the commands (the following is run from the username user):
su username cd /home/username wget https://github.com/syncthing/syncthing/releases/download/v0.14.44/syncthing-linux-386-v0.14.44.tar.gz tar xvzf synct* cd synct* ./syncthing
Waiting to generate keys and start the service, after you press Ctrl+C. Then (for convenience, rename):
cd /home/username mv syncthing-linux-386-v0.14.44 syncthing nano /home/username/.config/syncthing/config.xml
Looking for the string:
<address>127.0.0.1:8384< / address>
<address>0.0.0.0:8384< / address>
This will allow you to manage remotely via the web interface.
So far we have done everything from “username” user.
Other actions are performed as root.
enter the commands:
Now we’re back under the root user. Create a script to run Syncthing:
touch /home/username/run_syncthing.sh nano /home/username/run_syncthing.sh
Insert there this code:
#!/bin/sh cd /home/username/syncthing/ ./syncthing & > /dev/null
Save Ctrl+X Make it executable
cmod +X /home/username/run_syncthing.sh
Edit file /etc/rc.d/rc.local
At the end of the file insert the following line:
su username /home/username/run_syncthing.sh
Add rules to the firewall:
iptables -I INPUT -p tcp --dport 8384 -m state --state NEW -j ACCEPT iptables -I INPUT -p tcp --dport 22000 -m state --state NEW -j ACCEPT service iptables save service iptables restart
Reboot the system. It should work. When you first log in through the web interface, you must specify a login and password. I will be glad if someone will help. P.S. I apologize for my English, but I hope it is clear.