Blog

Install Free Shadowsocks Node

安装依赖

apt-get install python-pip git python-m2crypto -y

pip install cymysql

安装Shadowsocks

git clone -b manyuser https://github.com/mengskysama/shadowsocks.git

cd /root/shadowsocks/shadowsocks

# 修改数据库信息

vi Config.py

# 跑看看

python server.py  

使用supervisor进程守护

# 安装supervisor

apt-get install python-pip python-m2crypto supervisor -y

# 编辑文件

vi /etc/supervisor/conf.d/shadowsocks.conf

输入(下面dir路径如有不同修改为自己的)

[program:shadowsocks]

command=python /root/shadowsocks/shadowsocks/server.py -c /root/shadowsocks/shadowsocks/config.json

autorestart=true

user=root

启动

service supervisor start

supervisorctl reload

在以下两个文件的结尾都添加下列3行

vi /etc/profile

vi /etc/default/supervisor

ulimit -n 51200

ulimit -Sn 4096

ulimit -Hn 8192

debug查看日志

supervisorctl tail -f shadowsocks stderr

启动/重启/停止

supervisorctl start/restart/stop shadowsocks

没有评论

Leave a Reply