1.查看系统

[root@localhost ~]# cat /etc/issue

[root@localhost ~]# uname -a

2.安装ss服务端(CentOS 6)

yum update

 yum install python-setuptools && easy_install pip

pip install shadowsocks

3.新建ss配置文件

vim /etc/shadowsocks.json
单用户添加以下内容:
{
    "server":"0.0.0.0",
    "server_port":443,
    "local_address":"127.0.0.1",
    "local_port":1080,
    "password":"your password",
    "timeout":300,
    "method":"aes-256-cfb"
}
多用户添加以下内容:
{
    "server":"0.0.0.0",
    "port_password":{
        "8381":"password1",
        "8382":"password2",
        "8383":"password3",
        "8384":"password4"
    },
    "local_address":"127.0.0.1",
    "local_port":1080,
    "timeout":300,
    "method":"aes-256-cfb"
}

4.启动ss

ssserver -c /etc/shadowsocks.json -d start

5.设置开机启动SS 编辑 /etc/rc.local 在尾部添加如下代码

# shadowsocks(注释作用)
ssserver -c /etc/shadowsocks.json -d start

6.执行 source /etc/rc.local 使其修改生效

后续:可跳过5,6步,将ss添加到服务

vim /etc/systemd/system/ssserver.service
输入以下信息
[Unit]
Description=ssserver
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target

启动服务

systemctl start ssserver

添加到开启自启动

systemctl enable ssserver

重新启动

systemctl restart ssserver

停止

systemctl stop ssserver