How To Install Shadowsocks and BBR on CentOS 6

update 6/25/2019
wget --no-check-certificate -O
chmod +x
./ 2>&1 | tee shadowsocks-all.log

To install Shadowsocks and BBR on VPS, I have googled a lot of tutorials. But some of them are outdated. Here is a feasible summary recorded the installation process.


Shadowsocks is a lightweight secured socks5 proxy. Shadowsocks-Libev is a lightweight and full-featured port for embedded devices and low-end boxes. It's a pure C implementation and has a very small footprint (several megabytes) for thousands of connections. So it is a great option compared to other versions for a low-end Server.



First of all, you need to buy a foreign server. You can buy a VPS on Vultr or DigitalOcean et al. Then you will get a foreign IP. Open the Command Prompt and ping Your IP. For example, "ping". If it shows the following,

Pinging with 32 bytes of data:
Reply from bytes=32 time=211ms TTL=44
Reply from bytes=32 time=213ms TTL=44
Reply from bytes=32 time=213ms TTL=44
Reply from bytes=32 time=226ms TTL=44

that means your IP  is workable. If it shows "time out" you can destroy it and create a new VPS.

Connect Your VPS With SSH

After you buy a VPS, you will get a Username and a Password(sometimes they will be contained in an email sent to you) so that you can connect your VPS with SSH and use the command line to control it. There is much free SSH software like Xshell can easily connect your VPS. And the default port is 22.

Install Shadowsocks

After a successful SSH connection, enter the following three lines of code.

wget --no-check-certificate -O
chmod +x
./ 2>&1 | tee shadowsocks-libev.log

Then it will request you chose your Password, Port and Encryption Method. Wait a few minutes for it to configure. If it shows the following,

Congratulations, Shadowsocks-libev server install completed!
Your Server IP :
Your Server Port : 56789
Your Password :
Your Encryption Method: aes-256-gcm

that means you successful install Shadowsocks. Record this text and open the client(the download link is below) enter the corresponding text.
Finally, open your browser and visit Google Scholar( And enjoy it!

/etc/init.d/shadowsocks start
/etc/init.d/shadowsocks stop
/etc/init.d/shadowsocks restart
/etc/init.d/shadowsocks status
./ uninstall

Install BBR(not necessary)

If you think the speed of your connection(you can open "Global Mode " in your client and test the speed in here) is too slow, you can install BBR to improve the speed.
BBR ("Bottleneck Bandwidth and Round-trip propagation time") is a new congestion control algorithm developed at Google. Congestion control algorithms — running inside every computer, phone or tablet connected to a network — that decide how fast to send data. BBR then uses a new model to control both how fast it sends data and the maximum amount of data it's willing to allow in the network at any time. (More detail click here)

Update the Kernel Version

BBR requires that the kernel version of Linux be newer than 4.9. For CentOS 6, we can use

uname -r

to view the kernel version of our VPS. Here shows my kernel version is "2.6.32-696.30.1.el6.x86_64". Now, let's update the kernel version.

#input ELRepo Public Key
rpm --import
#install ELRepo
rpm -Uvh
#update the latest kernel
yum --enablerepo=elrepo-kernel install kernel-ml -y

After the upgrade, we need alter file "/etc/grub.conf". Enter the following command.

#open this file
vi /etc/grub.conf

Press the "I" key on the keyboard to go into "INSERT" mode.  Alter "default=1" to "default=0". Press the "Esc" key on the keyboard. Input

#save and exit

and press "Enter" to return to the main interface. And input


to restart the VPS. Wait about 1 min, reconnect the VPS with SSH. Enter

uname -r

to see the kernel version. If it shows "4.18.9-1.el6.elrepo.x86_64", that means you successful update the kernel version.

Install BBR

Enter the following command.

#Modify the configuration
cat >>/etc/sysctl.conf << EOF
#Make the configuration take effect
sysctl -p

Enter the following command to check if you see that the returned result contains "BBR"

sysctl net.ipv4.tcp_available_congestion_control
#returned result, net.ipv4.tcp_available_congestion_control = bbr cubic reno
lsmod | grep bbr
#returned result, tcp_bbr 20480 0

If the returned result is right,  congratulations on your successful installation of the BBR!


Shadowsocks client for Android
Shadowsocks client for Windows


About spend 3 hours writing this article. The most embarrassing thing was that my wireless mouse was out of power in the library #_#.  The SS account in the article can be used normally within a week. Any questions can be left below.
The article was last updated on September 23, 2018.
Author: Xuan
Copyright: CC BY-NC-SA 4.0
No Comments

Send Comment Edit Comment

 ̄﹃ ̄
∠( ᐛ 」∠)_
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
( ๑´•ω•) "(ㆆᴗㆆ)