Centos安装ss

首先升级Python版本

1
2
3
4
5
6
7
8
9
yum install -y gcc zlib zlib-devel openssl openssl-devel
wget http://www.python.org/ftp/python/3.3.0/Python-3.3.0.tgz
tar -zxf Python-3.3.0.tgz
cd Python-3.3.0
./configure
make&&make install
mv /usr/bin/python /usr/bin/python2.6.6
ln -s /usr/local/bin/python3 /usr/bin/python
python -v

升级完成后yum会无法使用

1
2
vi /usr/bin/yum
#!/usr/bin/python改为#!/usr/bin/python2.6.6

安装setuptools及pip

1
2
3
4
yum install -y unzip
unzip setuptools-39.2.0.zip
cd setuptools-39.2.0
python setup.py install

pip可以用easy_install pip安装,也可以用源码包安装

1
2
3
tar -zxf pip-10.0.1.tar.gz
cd pip-10.0.1
python setup.py install

安装shadowsocks

1
pip install shadowsocks

编辑配置文件

1
2
mkdir /etc/shadowsocks/
vi /etc/shadowsocks/config.json

单用户配置

1
2
3
4
5
6
7
8
9
10
{
"server":"",##填写服务器外网ip地址,ip也可以写内网地址,只要能转发出来即可。
"server_port":8000,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"",
"timeout":300,
"method":"aes-256-cfb",
"fast_open":false
}

多用户配置

1
2
3
4
5
6
7
8
9
10
11
12
{
"server":"",
"local_address":"127.0.0.1",
"local_port":1080,
"port_password":{
"8000":"123456",
"8001":"123456"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open":false
}

命令行启动关闭

1
2
ssserver -c /etc/shadowsocks/config.json -d start 后台启动
ssserver -c /etc/shadowsocks/config.json -d stop 后台停止

设置开机启动

将启动命令追加到/etc/rc.local文件中

分享:

发表评论

电子邮件地址不会被公开。 必填项已用*标注

😉😐😡😈🙂😯🙁🙄😛😳😮:mrgreen:😆💡😀👿😥😎😕