How To Install Shadowsocks Server on CentOS, Debian, Ubuntu Easily

How To Install Shadowsocks Server on CentOS, Debian, Ubuntu Easily
Shadowsocks

Shadowsocks is a secure and lightweight socks5 proxy for embedded devices and low-end boxes, designed to protect your Internet traffic.
The benefit of Shadowsocks is that it works very well on un-stable Internet connections.
It has different versions written in C, Python and Go. I recommend the libev version written in C because it has low memory usage (around 600k) and low CPU consumption.

First, you need to have a Linux server with at least 128MB of RAM. If you don’t have one, I suggest a cheap OpenVZ VPS from:
RamNode 128MB OpenVZ VPS (New York) – $15/yr
– OR –
HostUs 512MB OpenVZ VPS (Amsterdam) – $18.95/yr

Easy Install Shadowsocks-libev on Your Server

You can easily install and configure Shadowsocks (Thanks to Teddysun). Just login as root user and run the following commands:

CentOS

wget --no-check-certificate -O shadowsocks-libev.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev.sh
chmod +x shadowsocks-libev.sh
./shadowsocks-libev.sh 2>&1 | tee shadowsocks-libev.log

Debian/Ubuntu

wget --no-check-certificate -O shadowsocks-libev-debian.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-libev-debian.sh
chmod +x shadowsocks-libev-debian.sh
./shadowsocks-libev-debian.sh 2>&1 | tee shadowsocks-libev-debian.log

You will be asked to set server port, password and encryption (I recommend chacha20-ietf-poly1305).
After the script is installed, it will auto start on server boot.

Service Commands

You can Start/Stop/Restart and view the Status of the service by using the following commands:

Start: /etc/init.d/shadowsocks start 
Stop: /etc/init.d/shadowsocks stop 
Restart: /etc/init.d/shadowsocks restart 
View Status: /etc/init.d/shadowsocks status

Uninstall Shadowsocks

Login as root user and run the following command:

CentOS

./shadowsocks-libev.sh uninstall

Debian/Ubuntu

./shadowsocks-libev-debian.sh uninstall

Clients

You can use Shadowsocks on:
Android
iOS
Windows
MAC OS X
Linux
LEDE/OpenWRT