Skip to content

Instantly share code, notes, and snippets.

@baaxl9vh
Forked from aa65535/ss-install.md
Last active November 14, 2017 04:50
Show Gist options
  • Select an option

  • Save baaxl9vh/216b0924195733e62d69c2aebe3e21fb to your computer and use it in GitHub Desktop.

Select an option

Save baaxl9vh/216b0924195733e62d69c2aebe3e21fb to your computer and use it in GitHub Desktop.
shadowsocks-libev install at Debian or CentOS

Debian

cd /tmp
# 编译环境准备&安装依赖包
apt-get install --no-install-recommends build-essential autoconf libtool libssl-dev libpcre3-dev asciidoc xmlto git
# 克隆源码
git clone --recursive 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/config.json /etc/shadowsocks-libev/config.json
chmod +x /etc/init.d/shadowsocks-libev
# 编辑配置文件
vim /etc/shadowsocks-libev/config.json
# 添加开机自启动服务
update-rc.d shadowsocks-libev defaults
# 启动服务
service shadowsocks-libev start

CentOS

cd /tmp
# 编译环境准备&安装依赖包
yum install -y gcc make libtool build-essential git
yum install -y curl curl-devel zlib-devel openssl-devel perl perl-devel pcre pcre-devel cpio expat-devel gettext-devel asciidoc xmlto
yum install mbedtls-devel -y
yum install libev-devel -y
# Install The Sodium crypto library libraries
https://github.com/jedisct1/libsodium
# 克隆源码
git clone --recursive https://github.com/shadowsocks/shadowsocks-libev.git
# 开始编译
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
# 添加开机自启动服务
chkconfig --add shadowsocks-libev
chkconfig shadowsocks-libev on
# 启动服务
service shadowsocks-libev start
# rng-tools
yum install -y rng-tools
#
rngd -r /dev/urandom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment