Centos7安装shadowsocks-libev

yum install -y epel-release
yum update -y
yum install -y gcc gcc-c++ pcre-devel asciidoc xmlto openssl openssl-devel mbedtls-devel libsodium-devel c-ares-devel libev-devel wget tar make

wget https://github.com/shadowsocks/shadowsocks-libev/releases/download/v3.3.5/shadowsocks-libev-3.3.5.tar.gz

tar xvf shadowsocks-libev*

rm -rf shadowsocks-libev-*.tar.gz

cd shadowsocks-libev*

./configure -prefix=/usr/local/shadowsocks-libev && make && make install

vi /etc/shadowsocks.json

单shadowsocks-libev实例配置: 
{
    "server":"0.0.0.0",
    "server_port":7788,
    "local_port":1080,
    "password":"password",
    "timeout":300,
    "method":"aes-256-cfb"
}
nohup ss-server -c /etc/shadowsocks.json & 
多shadowsocks-libev实例配置:
{
    "server":"0.0.0.0",
    "server_port":8388,
    "port_password":{
        "端口":"密码",
        "端口":"密码",
        "端口":"密码",
        "端口":"密码"
    },
    "local_port":1080,
    "timeout":300,
    "method":"aes-256-cfb"
}
nohup ss-manager -c /etc/shadowsocks.json & 

可选步骤:新建一个低权限账号运行 shadowsocks-libev 程序,防止软件bug导致服务器被黑

useradd -MN -s /sbin/nologin ss
nohup ss-server -a ss -u -c /etc/shadowsocks.json &

Add a Comment

您的电子邮箱地址不会被公开。