CENTOS7 installation Shadowsocks Tutorial Centos7 How to install Shadowsocks

Source: Internet
Author: User
Tags json

1. Installation Shadowsocks

  1. # yum Install python-setuptools && easy_install pip
  2. # pip Install Shadowsocks

2. Configure Shadowsocks

  1. # mkdir-p/etc/shadowsocks
  2. # Vim/etc/shadowsocks/config.json
  3. {
  4. "Server": "118.61.***.***",
  5. "Port_password": {
  6. "18381": "*********",
  7. "18382": "*********",
  8. "18383": "*********",
  9. "18385": "*********",
  10. "18384": "*********"
  11. },
  12. "Timeout": 300,
  13. "Method": "Rc4-md5",
  14. "Fast_open": false,
  15. "Workers": 1
  16. }

3. Self-starter files

  1. # cat /etc/systemd/system/shadowsocks-server.service  
  2. [unit]   
  3. description=shadowsocks service  
  4. after=network.target  
  5.   
  6. [service]  
  7. type=simple  
  8. user=nobody  
  9. execstart=/usr/bin/ssserver -c /etc/shadowsocks/config.json  
  10. execreload=/bin/kill -hup  $MAINPID   
  11. execstop=/bin/kill -s quit  $MAINPID   
  12. privatetmp=true  
  13. killmode=process  
  14. restart=on-failure  
  15. restartsec=5s  
  16.   
  17. [install]  
  18. wantedby=multi-user.target  

Since the start of this piece, do a unified management, whether it is the management tool packaging, or manually installed. Although the feeling is not convenient, but made a unified planning.

4, joined from the start

  1. # Systemctl Start Shadowsocks-server.service
  2. # Systemctl Enable Shadowsocks-server.service
  3. # systemctl Disable Shadowsocks-server.service

5. Open Port

  1. # Firewall-cmd--permanent--add-port=18381-18385/tcp
  2. # Firewall-cmd--reload

Centos7 use of FIREWALLD, than directly with iptables to simple, easy to use.

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.