不知从何时开始, 弄到一台新VPS的第一件事情…毫无疑问的就是部署shadowsocks…
Server 部署:
apt-get install update
- 参考: http://www.chedanji.com/ubuntu-shadowsocks/
处理问题
Error: Another program is already listening on a port that one of our HTTP servers is configured to use. Shut this program down first before starting supervisord.
sudo unlink /tmp/supervisor.sock
&
sudo unlink /var/run/supervisor.sock
均出现错误: unlink: cannot unlink `/var/run//supervisor.sock’: No such file or directory
vim /etc/supervisord.conf发现
file=/var/run//supervisor.sock ; (the path to the socket file)
这行多了一个"/"去掉搞定.(注: 这个应该是作为一个隐藏文件的处理, 但不知道为何没有处理好)
service supervisor start
- 参考: http://stackoverflow.com/questions/14479894/stopping-supervisord-shut-down
Web 控制部署:
vim /etc/supervisor/conf.d/shadowsocks.conf
[inet_http_server]
port = 127.0.0.1:9001
username = user
password = 123
supervisorctl reload
防火墙配置
ipdatables -A INPUT -p tcp -m state --state NEW -m tcp --dport 8449 -j ACCEPT
将8449替换成自己的端口即可
- 注:
-A INPUT -j DROP规则在的话会无法连上.
记得写入rules
iptables-save > /etc/iptables.rules
转载请注明出处: Debain & ubuntu 部署 shadowsocks