CentOS installation and configuration ss-manyuser tutorial

Source: Internet
Author: User

The steps for installing and configuring ss-manyuser are as follows.

1. Install required components

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

II. Upgrade Python

Refer to CentOS to upgrade 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

3. Install setuptools, pip, cymysql, and 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
Vim Config. py

Edit the database configuration and save it.

4. Install swig and 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

5. Configure the supervisor to watch the ss process

Refer to: CentOS to configure the Supervisor to watch the shadowsocks process

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/server. py-c/root/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 control commands
Start supervisord
Supervisorctl tail-f ss stderr # Ctrl + C cancel viewing
Open the command line supervisorctl
Obtain the supervisorctl status of all programs
Close the target program supervisorctl stop ss (switch to the program you need)
Start the target program supervisorctl start ss (replace with the program you need)
Close all programs supervisorctl shutdown

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.