在 CentOS 7 下安装配置 shadowsocks

一键安装

$ bash <(curl -s http://morning.work/examples/2015-12/install-shadowsocks.sh)

安装配置 shadowsocks

在控制台执行以下命令安装 shadowsocks:

$ pip install --upgrade pip
$ pip install shadowsocks

安装完成后,需要创建配置文件/etc/shadowsocks.json,内容如下:

{
"server": "0.0.0.0",
"server_port": 8388,
"password": "uzon57jd0v869t7w",
"method": "aes-256-cfb"
}

新建启动脚本文件/etc/systemd/system/shadowsocks.service,内容如下:

[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0
ExecStart=/usr/bin/ssserver -c /etc/shadowsocks.json
[Install]
WantedBy=multi-user.target

执行以下命令启动 shadowsocks 服务:

$ systemctl enable shadowsocks
$ systemctl start shadowsocks

为了检查 shadowsocks 服务是否已成功启动,可以执行以下命令查看服务的状态:

猜你喜欢

转载自my.oschina.net/u/3197790/blog/1538373