CentOS安裝配置ss-manyuser教程

來源:互聯網
上載者:User

關於安裝配置ss-manyuser的步驟,我們整理如下。

一、安裝所需組件

yum install wget git tar gcc gcc-c++ openssl openssl-devel pcre-devel python-devel libevent automake autoconf libtool make -y

二、升級Python

請參考:CentOS升級Python2.7

wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz
tar zxvf Python-2.7.6.tgz
 
cd /root/Python-2.7.6/Modules/zlib
./configure
make && make install
 
cd /root/Python-2.7.6
./configure
make && make install
 
mv /usr/bin/python /usr/bin/python2.4.3
ln -s /usr/local/bin/python2.7 /usr/bin/python

三、安裝setuptools、pip、cymysql、ss

cd
wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
python ez_setup.py --insecure
wget --no-check-certificate https://pypi.python.org/packages/source/p/pip/pip-6.0.7.tar.gz
tar zxvf pip-6.0.7.tar.gz
cd pip-6.0.7
python setup.py install
pip install cymysql
cd
git clone -b manyuser https://github.com/mengskysama/shadowsocks.git
 
cd /root/shadowsocks/shadowsocks
vim Config.py

編輯資料庫配置儲存即可。

四、安裝swig和M2Crypto

cd /root
wget http://jaist.dl.sourceforge.net/project/swig/swig/swig-3.0.0/swig-3.0.0.tar.gz
tar zxvf swig-3.0.0.tar.gz
cd swig-3.0.0
./configure
make && make install

cd /root
wget https://pypi.python.org/packages/source/M/M2Crypto/M2Crypto-0.22.3.tar.gz --no-check-certificate
tar zxvf M2Crypto-0.22.3.tar.gz
cd M2Crypto-0.22.3
python setup.py build
python setup.py install

五、配置supervisor值守ss進程

請參考:CentOS配置Supervisor值守shadowsocks進程

cd /root
wget http://www.plope.com/software/meld3/meld3-0.6.5.tar.gz
tar zxvf meld3-0.6.5.tar.gz
cd meld3-0.6.5
python setup.py install
cd
 
pip install --upgrade pip
pip install --upgrade meld3
 
pip install supervisor
echo_supervisord_conf > /etc/supervisord.conf
 
vim /etc/supervisord.conf
[include]
files = /etc/supervisord.conf.d/*.conf
 
mkdir /etc/supervisord.conf.d
cd /etc/supervisord.conf.d
vim ss.conf
 
[program:ss]
command=python /root/shadowsocks/shadowsocks/server.py -c /root/shadowsocks/shadowsocks/config.json
autostart=true
autorestart=true
 
ln -s /usr/local/bin/supervisord /usr/bin/supervisord
ln -s /usr/local/bin/supervisorctl /usr/bin/supervisorctl
 
cd /etc/init.d
wget http://www.xj123.info/tool/sh/supervisord
chmod +x supervisord
 
chkconfig --add supervisord
chkconfig supervisord on
 
cd

service supervisord start

    supervisor一些控制命令
    啟動 supervisor supervisord
    supervisorctl tail -f ss stderr #Ctrl+C 取消查看
    開啟命令列 supervisorctl
    獲得所有程式狀態 supervisorctl status
    關閉目標程式 supervisorctl stop ss(換成你需要的程式)
    啟動目標程式 supervisorctl start ss(換成你需要的程式)
    關閉所有程式 supervisorctl shutdown

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.