2015年2月19日星期四

Debian下shadowsocks-libev一键安装脚本

本脚本适用环境:
系统支持:Debian/Ubuntu
内存要求:≥128M
日期:2014年10月31日
关于本脚本:
Debian 或 Ubuntu 下一键安装 libev 版的 shadowsocks 最新版本。该版本的特点是内存占用小(600k左右),使用 libev 和 C 编写,低 CPU 消耗,甚至可以安装在基于 OpenWRT 的路由器上。
默认配置:
服务器端口:8989
客户端端口:1080
密码:自己设定(如不设定,默认为teddysun.com)
使用方法:
使用root用户登录,运行以下命令:
wget --no-check-certificate https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev-debian.sh
chmod +x shadowsocks-libev-debian.sh
./shadowsocks-libev-debian.sh 2>&1 | tee shadowsocks-libev-debian.log
安装完成后,脚本提示如下:
Congratulations, shadowsocks-libev install completed!
Your Server IP:your_server_ip
Your Server Port:8989
Your Password:your_password
Your Local IP:127.0.0.1
Your Local Port:1080
Your Encryption Method:aes-256-cfb

Welcome to visit:http://teddysun.com/358.html
Enjoy it!
卸载方法:
使用 root 用户登录,运行以下命令:
./shadowsocks-libev-debian.sh uninstall
其他事项:
客户端配置的参考链接:http://teddysun.com/339.html
安装完成后即已后台启动 shadowsocks ,运行:
ps -ef | grep ss-server | grep -v ps | grep -v grep
可以查看进程是否存在。
本脚本安装完成后,会将 shadowsocks-libev 加入开机自启动。
使用命令:
启动:运行以下命令
nohup /usr/local/bin/ss-server -c /etc/shadowsocks/config.json > /dev/null 2>&1 &
停止:运行以下命令查看进程的 PID
ps -ef | grep -v grep | grep -v ps | grep -i '/usr/local/bin/ss-server' | awk '{print $2}'
kill该 PID 即可:
kill -9 上述命令得到的结果
更新(2014年10月31日):
1、修复写入自启动命令到 /etc/rc.local 中的错误。
特别说明:
已安装旧版本的 shadowsocks 需要升级的话,需下载本脚本的最新版,运行卸载命令./shadowsocks-libev-debian.sh uninstall 后,再次执行本脚本即可安装最新版。
参考链接:


http://teddysun.com/358.htmlhttps://github.com/madeye/shadowsocks-libev

没有评论:

发表评论