Centos7 install sssssssssssssssssssssssssssssssssssssssssssss

如果没有netstat ,先安装:yum -y install net-tools

[root@vultr ~]# curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1488k 100 1488k 0 0 3186k 0 --:--:-- --:--:-- --:--:-- 3188k

[root@vultr ~]# python get-pip.py Collecting pip
Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
100% |████████████████████████████████| 1.2MB 607kB/s
Collecting wheel
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
100% |████████████████████████████████| 71kB 7.8MB/s
Installing collected packages: pip, wheel
Successfully installed pip-8.1.2 wheel-0.29.0

[root@vultr ~]# pip install --upgrade pip

Requirement already up-to-date: pip in /usr/lib/python2.7/site-packages

[root@vultr ~]# pip install shadowsocks Collecting shadowsocks
Downloading shadowsocks-2.8.2.tar.gz
Building wheels for collected packages: shadowsocks
Running setup.py bdist_wheel for shadowsocks ... done
Stored in directory: /root/.cache/pip/wheels/c9/d8/ff/5425932823af361970658e9421b4d53ac50b08dcbe6fd41e5f
Successfully built shadowsocks
Installing collected packages: shadowsocks
Successfully installed shadowsocks-2.8.2

[root@vultr etc]# vi /etc/shadowsocks.json {
"server": "0.0.0.0",
"server_port": 7788,
"password": "r1q7cnnf4bxg2b",
"method": "aes-256-cfb"
} [root@vultr etc]# vi /etc/systemd/system/shadowsocks.service [Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target

[root@vultr etc]# systemctl enable shadowsocks Created symlink from /etc/systemd/system/multi-user.target.wants/shadowsocks.service to /etc/systemd/system/shadowsocks.service.

[root@vultr etc]# systemctl start shadowsocks

[root@vultr etc]# systemctl status shadowsocks

-l ● shadowsocks.service - Shadowsocks
Loaded: loaded (/etc/systemd/system/shadowsocks.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2016-10-28 15:38:55 UTC; 9s ago
Main PID: 9509 (ssserver)
CGroup: /system.slice/shadowsocks.service
└─9509 /usr/bin/python /usr/bin/ssserver -c /etc/shadowsocks.json
Oct 28 15:38:55 vultr.guest systemd[1]: Started Shadowsocks.
Oct 28 15:38:55 vultr.guest systemd[1]: Starting Shadowsocks...
Oct 28 15:38:55 vultr.guest ssserver[9509]: INFO: loading config from /etc/shadowsocks.json
Oct 28 15:38:55 vultr.guest ssserver[9509]: 2016-10-28 15:38:55 INFO loading libcrypto from libcrypto.so.10
Oct 28 15:38:55 vultr.guest ssserver[9509]: 2016-10-28 15:38:55 INFO starting server at 0.0.0.0:9500
[root@vultr etc]# netstat -anlp|grep 9500
tcp 0 0 0.0.0.0:9500 0.0.0.0:* LISTEN 9509/python
udp 0 0 0.0.0.0:9500 0.0.0.0:* 9509/python
this article from http://moneyslow.com/7110.html

京ICP备11047313号-19 彩虹岛电子书