注意事项,pip版本不能太低,实测9.0.3可行(需要python 2.7,低版本python升级办法另有文章介绍)。

pip --version

以shadowsocks-2.8.2为例:

pip install shadowsocks

[root@ssserver ~]# pip install shadowsocksCollecting shadowsocks

  Downloading https://files.pythonhosted.org/packages/02/1e/e3a5135255d06813aca6631da31768d44f63692480af3a1621818008eb4a/shadowsocks-2.8.2.tar.gzBuilding wheels for collected packages: shadowsocks

  Running setup.py bdist_wheel for shadowsocks ... done

  Stored in directory: /root/.cache/pip/wheels/5e/8d/b6/3e2243a7e116984b2c3597c122c29abcfeac77daa260079e88Successfully built shadowsocksInstalling collected packages: shadowsocksSuccessfully installed shadowsocks-2.8.2

shadowsocks Successfully installed shadowsocks-2.8.2

vi /etc/shadowsocks.json

按键盘i键后,粘贴下面内容:

{

  "server":"0.0.0.0",          //0.0.0.0或内网IP

  "server_port":8388,          //默认ss端口,不改

  "local_address":"127.0.0.1", //不需要改

  "local_port":1080,           //不需要改

  "password":"password",       //自定义

  "timeout":300,

  "method":"aes-256-cfb",

  "fast_open":false

}

然后按键盘’Esc’键,再按shift+:键,再输入wq并回车。文件编辑结束。

官方资料:

Name

Explanation

server

the address your server listens

server_port

server port

local_address

the address your local listens

local_port

local port

password

password used for encryption

timeout

in seconds

method

default: "aes-256-cfb", see Encryption

fast_open

use TCP_FASTOPEN, true / false

workers

number of workers, available on Unix/Linux

启动,去到ssserver的位置(可能在/usr/local/Python27/bin下),执行:

./ssserver -c /etc/shadowsocks.json -d start

官方资料:
To run in the foreground: ssserver -c /etc/shadowsocks.json To run in the background: ssserver -c /etc/shadowsocks.json -d start ssserver -c /etc/shadowsocks.json -d stop

检查是否启动

netstat -noa | grep :8388 (netstat -noa | grep 8388)

检查端口被哪个进程占用

netstat -lnp|grep 8388

能够输出相关端口信息说明运行正常,如果客户端机器未能访问外网,通常是因为服务器防火墙的端口没有打开,比如腾讯云主机,在配置安全组中没有将8388端口开放给外网访问。添加入站规则,TCP、UDP开放8388端口。

To check the log:

sudo less /var/log/shadowsocks.log

其他有用命令:

./ssserver --version    (返回shadowsocks版本)

./ssserver -d stop

扩展知识:

shadowsocks 3.0.0版本 GitHub(截止2019年7月24日有效能用)

https://github.com/shadowsocks/shadowsocks/tree/master

该版本在GitHub上2018年12月之后没有更新,其他较新版本,可以在https://pypi.org/search/?q=shadowsocks或者GitHub找到,链接内有具体介绍。

譬如,shadowsocks-valoroso 3.0.7版本,则

pip install shadowsocks-valoroso

CentOS:

yum install python-setuptools && easy_install pip (装setuptools、pip命令,我未使用过)

pip install git+https://github.com/shadowsocks/shadowsocks.git@master    (shadowsocks-valoroso 3.0.0版本)

CentOS安装部署sha##dow**socks的更多相关文章

  1. centos 安装部署zabbix

    Zabbix_server初始安装部署 各模块要安装的模块 Server:server+nginx+mysql+php Agentd:agentd Proxy:proxy+mysql 1.准备环境: ...

  2. CentOS安装部署jumperserver(堡垒机)

    可以参考官方的文档:http://docs.jumpserver.org/zh/docs/introduce.html 测试环境 系统: CentOS 7 IP: 192.168.244.144 设置 ...

  3. CENTOS安装部署zabbix

    果学网 -专注IT在线www.prismcollege.com 參考原文:http://www.showerlee.com/archives/13 RHCE过的EMAIL已经下来.所以近期闲了就准备把 ...

  4. centos 安装 部署 gitlab github

    https://www.cnblogs.com/wenwei-blog/p/5861450.html 我这里使用的是centos 7 64bit,我试过centos 6也是可以的! 1. 安装依赖软件 ...

  5. centos 安装部署.net core站点

    安装 net core sudo rpm -Uvh https://packages.microsoft.com/config/rhel/7/packages-microsoft-prod.rpm s ...

  6. centos 安装部署ftp服务器

    0. 安装ftp yum install vsftpd 1. 添加ftp账户 useradd -d /home/test -g ftp -s /sbin/nologin test 命令的意思: 添加t ...

  7. CentOS安装部署Mysql 5.7

    1,如果没有安装wget,先安装yum -y install wget 2,下载MySQL官方的 Yum Repositorywget http://repo.mysql.com/mysql57-co ...

  8. Solr7 安装部署 管理界面介绍

    Solr7 安装部署 管理界面介绍 本章重点介绍CentOS 安装部署Solr7 ,Solr的管理界面介绍,添加核心Core配置,Dataimport导入数据,Documents 在线维护索引,Que ...

  9. CentOS 7部署Node.js+MongoDB:在VPS上从安装到Hello world

    写好代码,花钱买了VPS,看着Charges一直上涨却无从下手?记一位新手司机从购买VPS到成功访问的过程 0.购买VPS 首先,选择VPS提供商,部署一个新的服务器(Deploy New Serve ...

随机推荐

  1. List&LinQ

    DataTable会将整个数据表接收过来,可真正使用的数据未必是整个数据表所有的数据. 使用List可以接收需要使用的数据 public class Data_Model { public strin ...

  2. u-boot bl _main分析

    ldr    r0, =(CONFIG_SYS_INIT_SP_ADDR): #define CONFIG_SYS_INIT_SP_ADDR     (CONFIG_SYS_INIT_RAM_ADDR ...

  3. 2017年全国卷3的21题与2018年全国卷3的21题命题背景是同一个函数$y=\frac{2x}{\ln(x+1)}$(再次瞎谈)

    2017年四川高考数学(全国卷3)理科21题第1问 已知函数\(f(x)=x-1-a\ln x\) (1)若\(f(x)\geqslant 0\),求\(a\)的值\(.\) 该不等式等价于$a\ln ...

  4. 数据库管理哪家强?Devart VS Navicat 360°全方位对比解析

    今天小编向大家推荐的是两个开发环节的主流数据库管理品牌,那么你知道这两款数据库管理软件品牌与数据库引擎配套的管理软件有什么区别吗?小编这就360°全方位为您解答: ★ 品牌介绍 Devart:拥有超过 ...

  5. Linux 命令点滴

    .linux查看占用内存最多的程序 ;|head .查看占用cpu最多的程序 ;|head chown -R mysql:mysql /data/mysql_data chown -R mysql:m ...

  6. python之路day14--嵌套函数、匿名函数、高阶函数。函数的递归

      嵌套函数 函数里不仅可以写代码,还可以嵌套函数 name = "小猿圈" def change(): name = "小猿圈,自学编程" def chang ...

  7. 【leetcode】Submission Details

    Given two sentences words1, words2 (each represented as an array of strings), and a list of similar ...

  8. vscode匹配括号插件

    给大家推荐一个vscode匹配括号的插件: Bracket Pair Colorizer.超级好用哦

  9. @JsonView注解指定返回的model类中显示的字段

    1.User类 package com.imooc.model; import com.fasterxml.jackson.annotation.JsonView; /** * @author oy ...

  10. Python爬虫十六式 - 第三式:Requests的用法

    Requests: 让 HTTP 服务人类 学习一时爽,一直学习一直爽   Hello,大家好,我是Connor,一个从无到有的技术小白.今天我们继续来说我们的 Python 爬虫,上一次我们说到了 ...