CentOS7安装SS

1.先安装软件

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log

2.查看或修改配置

vim /etc/shadowsocks.json

3.配置服务器

如果是多用户,需要修改配置为如下:

{
"server":"my-ssserver", "local_address":"127.0.0.1",
"local_port":8888,
"port_password":{
"9999":"password0",
"9001":"password1",
"9002":"password2",
"9003":"password3",
"9004":"password4"
},
"timeout":600,
"method":"aes-256-cfb",
"fast_open": false
}

4.相关命令

#随着版本的更新,下面的命令可能需要使用分类后缀才可以正常使用,比如:
/etc/init.d/shadowsocks status 改为 /etc/init.d/shadowsocks-go status

#停止
/etc/init.d/shadowsocks stop

#重启
/etc/init.d/shadowsocks restart

#状态
/etc/init.d/shadowsocks status

#清空防火墙策略要求
iptables -F

#关闭selinux防火墙
setenforce 0

#关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动
firewall-cmd --state #查看默认防火墙状态(关闭后显示notrunning,开启后显示running)

5.安装客户端

https://github.com/shadowsocks