From 5d3894c6cb1063ac734d80e65b90588c97838397 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sat, 1 Nov 2014 08:06:40 -0700 Subject: [PATCH] Updated Configure Shadowsocks with Supervisor (markdown) --- Configure-Shadowsocks-with-Supervisor.md | 42 +++++++++++++++++++----- 1 file changed, 33 insertions(+), 9 deletions(-) diff --git a/Configure-Shadowsocks-with-Supervisor.md b/Configure-Shadowsocks-with-Supervisor.md index 615dbe9..feace24 100644 --- a/Configure-Shadowsocks-with-Supervisor.md +++ b/Configure-Shadowsocks-with-Supervisor.md @@ -2,15 +2,6 @@ If you want to run Shadowsocks in the background, use supervisor. -Here is an example of running shadowsocks with supervisor on Debian 7.0: - -Run -``` -apt-get update -apt-get install python-pip python-m2crypto supervisor -pip install shadowsocks -``` - Edit `/etc/shadowsocks.json` ``` @@ -24,6 +15,16 @@ Edit `/etc/shadowsocks.json` } ``` +Debian +------ + +Run +``` +apt-get update +apt-get install python-pip python-m2crypto supervisor +pip install shadowsocks +``` + Edit `/etc/supervisor/conf.d/shadowsocks.conf` ``` @@ -50,4 +51,27 @@ You can check logs or control the shadowsocks process: ``` supervisorctl tail -f shadowsocks stderr supervisorctl restart shadowsocks +``` + +CentOS +------ + +Edit `/etc/supervisord.conf`, add + +``` +[program:shadowsocks] +command=ssserver -c /etc/shadowsocks.json +autorestart=true +user=nobody +``` + +Run + +``` +sudo yum install python-pip supervisor +sudo pip install shadowsocks +sudo chkconfig --add supervisord +sudo chkconfig supervisord on +service supervisor start +supervisorctl reload ``` \ No newline at end of file