安装服务

1
2
$ yum install m2crypto libsodium supervisor
$ pip install shadowsocks

配置服务

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
$ vi /etc/shadowsocks.json
{
"server":"0.0.0.0",
"port_password":{
"1234":"passwd1",
"2345":"passwd2"
},
"timeout":600,
"method":"aes-256-cfb"
}
$ vi /etc/supervisord.d/shadowsocks.ini
[program:shadowsocks]
command=ssserver -c /etc/shadowsocks.json
autostart=true
autorestart=true
user=root
log_stderr=true
logfile=/var/log/shadowsocks.log

配置supervisor自动启动服务

1
2
3
$ chkconfig supervisord on
$ systemctl enable supervisord.service
$ service supervisord start