One-click installation script for shadowsocks-libev in CentOS

Source: Internet
Author: User
This script is applicable to the following environments: System Support: CentOS6.x32 or 64-bit memory requirements: & ge; M Date: July 22, about this script: One-click installation of the latest version of shadowsocks libev. This version features low memory usage (about K), low CPU consumption, and can even be installed on an OpenWRT-based router. Default configuration: server port: 8989 client

Applicable environment:
Supported systems: CentOS 6.x 32 or 64-bit
Memory requirements: ≥ 128 M
Date: January 1, July 12, 2014

About this script:
Install the latest shadowsocks version of libev with one click. This version features low memory usage (about K), low CPU consumption, and can even be installed on an OpenWRT-based router.

Default configuration:
Server Port 8989
Client port 1080
Password: set it by yourself (if not set, the default value is teddysun.com)

Download the client:
Http://sourceforge.net/projects/shadowsocksgui/files/dist/

Usage:
Log on as the root user and run the following command:

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

After the installation is complete, the script prompts as follows:

Congratulations, shadowsocks-libev install completed!Your Server IP:your_server_ipYour Server Port:8989Your Password:your_passwordYour Local IP:127.0.0.1Your Local Port:1080Your Encryption Method:aes-256-cfbWelcome to visit:http://teddysun.com/357.htmlEnjoy it!

Uninstall method:
Log on as the root user and run the following command:

./shadowsocks-libev.sh uninstall

Other items:
Reference link for client configuration: http://teddysun.com/339.html

After the installation is complete, the background starts shadowsocks and runs:

ps -ef | grep ss-server | grep -v ps | grep -v grep

You can check whether a process exists.
After this script is installed, the shadowsocks-libev will be added to the auto-start mode.

Run the following command:
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

Note:
1, has installed the old version of shadowsocks need to upgrade, you need to download the latest version of the script, run the uninstall command./shadowsocks-libev.sh uninstall, run the script again to install the latest version.
2. for the default iptables firewall rule icmp-host-prohibited of CentOS, if shadowsocks has been started after installation, but the local client cannot be connected, check whether iptables has the following rule:

REJECT     all  --  0.0.0.0/0            0.0.0.0/0           reject-with icmp-host-prohibited

Run the following command:

/etc/init.d/iptables status 

You can view it. If this rule exists, manually change the port 8989 to be added and place it on the top line of the rule. Edit the/etc/sysconfig/iptables file:

-A INPUT -p tcp -m state --state NEW -m tcp --dport 8989 -j ACCEPT

Put in:

-A INPUT -j REJECT --reject-with icmp-host-prohibited

. The final result is as follows:

-A INPUT -p tcp -m state --state NEW -m tcp --dport 8989 -j ACCEPT-A INPUT -j REJECT --reject-with icmp-host-prohibited

After editing, restart the iptables firewall. Command:/etc/init. d/iptables restart

Reference link:
Https://github.com/madeye/shadowsocks-libev

Related Article

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.