安装ss

#安装 python setup tools
yum install python-setuptools -y
#安装pip
easy_install pip
#安装 shadowsocks
pip install shadowsocks

vi /etc/ssconfig.json

{
“server”:”0.0.0.0″,
“local_address”:”127.0.0.1″,
“local_port”:1080,
“timeout”:600,
“method”:”aes-256-cfb”,
“port_password”:
{
“8991”:”A用户密码”,
“8992”:”B用户密码”
}
}

vim /usr/lib/systemd/system/shadowsocks.service

[Unit]
Description=Shadowsocks Server
Documentation=https://github.com/shadowsocks/shadowsocks
After=network.target remote-fs.target nss-lookup.target

[Service]
Type=forking
#设置启动时的配置文件,根据自己的需求改.
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks-libev/config.json
-d start
ExecReload=/bin/kill -HUP $MAINPID
ExecStop=/usr/bin/ssserver -d stop

[Install]
WantedBy=multi-user.target

systemctl enable shadowsocks
systemctl start shadowsocks
 
firewall-cmd –permanent –add-port=8989/tcp
firewall-cmd –permanent –add-port=8989/udp
firewall-cmd –reload

猜你喜欢

转载自www.cnblogs.com/GodZhe/p/10799976.html
ss