centos7安装shadowsocks

安装和启动服务:

yum install -y wget gcc git python-setuptools && easy_install pip
#优先从github安装最新版本,如果从github安装失败,则使用备用方案,执行此命令安装:pip install shadowsocks
pip install git+https://github.com/shadowsocks/shadowsocks.git@master

配置服务:
touch /etc/shadowsocks.json
chmod 600 /etc/shadowsocks.json
echo '{' >> /etc/shadowsocks.json
echo ' "server_port":38402,' >> /etc/shadowsocks.json
echo ' "password":"123456",' >> /etc/shadowsocks.json
echo ' "method":"aes-256-cfb"' >> /etc/shadowsocks.json
echo '}' >> /etc/shadowsocks.json
chmod +x /etc/rc.d/rc.local
echo "/bin/ssserver -c /etc/shadowsocks.json -d start" >> /etc/rc.local

启动服务:
ssserver -c /etc/shadowsocks.json -d start

停止服务:
ssserver -d stop

查看日志:
tail -f /var/log/shadowsocks.log

详情参见:
https://github.com/shadowsocks/shadowsocks/blob/master/README.md
https://github.com/shadowsocks/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E

标签: centos7安装shadowsocks

添加新评论