Debian
cd /tmp
下载源码
git clone https://github.com/shadowsocks/shadowsocks-libev.git
开始编译
cd shadowsocks-libev
./autogen.sh
./configure --prefix=/usr && make
make install
准备必须的文件
mkdir -p /etc/shadowsocks-libev
cp ./debian/shadowsocks-libev.init /etc/init.d/shadowsocks-libev
cp ./debian/shadowsocks-libev.default /etc/default/shadowsocks-libev
cp ./debian/shadowsocks-libev.service /lib/systemd/system/
cp ./debian/config.json /etc/shadowsocks-libev/config.json
chmod +x /etc/init.d/shadowsocks-libev
编辑配置文件
vim /etc/shadowsocks-libev/config.json
启动服务
service shadowsocks-libev start
Centos
cd /tmp
编译环境准备&安装依赖包
yum install -y gcc automake autoconf libtool make build-essential autoconf libtool
yum install -y curl curl-devel unzip zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
下载源码
wget https://github.com/shadowsocks/shadowsocks-libev/archive/master.zip
unzip master.zip
开始编译
cd shadowsocks-libev*
./autogen.sh
./configure --prefix=/usr && make
make install
准备必须的文件
mkdir -p /etc/shadowsocks-libev
cp ./rpm/SOURCES/etc/init.d/shadowsocks-libev /etc/init.d/shadowsocks-libev
cp ./debian/config.json /etc/shadowsocks-libev/config.json
chmod +x /etc/init.d/shadowsocks-libev
编辑配置文件
vim /etc/shadowsocks-libev/config.json
启动服务
service shadowsocks-libev start
备注:配置文件中"server":"127.0.0.1"可改成服务器ip。"method"默认是aes-256-cfb
,改成rc4-md5
对连接速度有略微提升。