Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 yum install gettext gcc autoconf libtool automake make asciidoc xmlto c-ares-devel libev-devel
# 克隆源码
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
@on195594

This comment has been minimized.

Show comment
Hide comment
@on195594

on195594 Jul 31, 2016

如何设置开机自启动?

如何设置开机自启动?

@FreeLinuxUser

This comment has been minimized.

Show comment
Hide comment
@FreeLinuxUser

FreeLinuxUser Oct 21, 2016

chkconfig --add shadowsocks-libev
chkconfig shadowsocks-libev on

chkconfig --add shadowsocks-libev
chkconfig shadowsocks-libev on

@bologone

This comment has been minimized.

Show comment
Hide comment
@bologone

bologone Jan 12, 2017

Hi 各位好,

我按照上面CentOS的方法在CentOS7上安装了。显示服务已经在运行,可是客户端连不上。
这个状态显示信息:

[root@ouboservice2linux init.d]# systemctl status shadowsocks-libev -l
shadowsocks-libev.service - SYSV: lightweight secured socks5 proxy
Loaded: loaded (/etc/rc.d/init.d/shadowsocks-libev; bad; vendor preset: disabled)
Active: active (running) since Tue 2017-01-10 11:56:20 CET; 2 days ago
Docs: man:systemd-sysv-generator(8)
Process: 1308 ExecStart=/etc/rc.d/init.d/shadowsocks-libev start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/shadowsocks-libev.service
/usr/bin/ss-server -u -c /etc/shadowsocks-libev/config.json -f /var/run/shadowsocks-server/pid

Jan 10 11:56:20 ouboservice2linux systemd[1]: Starting SYSV: lightweight secured socks5 proxy...
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: UDP relay enabled
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: initializing ciphers... aes-256-cfb
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: tcp port reuse enabled
Jan 10 11:56:20 ouboservice2linux shadowsocks-libev[1308]: [46B blob data]
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: udp port reuse enabled
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: listening at 127.0.0.1:8388
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: running from root user
Jan 10 11:56:20 ouboservice2linux systemd[1]: Started SYSV: lightweight secured socks5 proxy.

请问哪里出错了?

多谢!

bologone commented Jan 12, 2017

Hi 各位好,

我按照上面CentOS的方法在CentOS7上安装了。显示服务已经在运行,可是客户端连不上。
这个状态显示信息:

[root@ouboservice2linux init.d]# systemctl status shadowsocks-libev -l
shadowsocks-libev.service - SYSV: lightweight secured socks5 proxy
Loaded: loaded (/etc/rc.d/init.d/shadowsocks-libev; bad; vendor preset: disabled)
Active: active (running) since Tue 2017-01-10 11:56:20 CET; 2 days ago
Docs: man:systemd-sysv-generator(8)
Process: 1308 ExecStart=/etc/rc.d/init.d/shadowsocks-libev start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/shadowsocks-libev.service
/usr/bin/ss-server -u -c /etc/shadowsocks-libev/config.json -f /var/run/shadowsocks-server/pid

Jan 10 11:56:20 ouboservice2linux systemd[1]: Starting SYSV: lightweight secured socks5 proxy...
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: UDP relay enabled
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: initializing ciphers... aes-256-cfb
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: tcp port reuse enabled
Jan 10 11:56:20 ouboservice2linux shadowsocks-libev[1308]: [46B blob data]
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: udp port reuse enabled
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: listening at 127.0.0.1:8388
Jan 10 11:56:20 ouboservice2linux /usr/bin/ss-server[1927]: running from root user
Jan 10 11:56:20 ouboservice2linux systemd[1]: Started SYSV: lightweight secured socks5 proxy.

请问哪里出错了?

多谢!

@yfhust

This comment has been minimized.

Show comment
Hide comment
@yfhust

yfhust Feb 17, 2017

你去掉-u看看,udp协议好像干扰较大

yfhust commented Feb 17, 2017

你去掉-u看看,udp协议好像干扰较大

@cheeslou

This comment has been minimized.

Show comment
Hide comment
@cheeslou

cheeslou Mar 17, 2017

楼主楼主

cd shadowsocks-libev
我在进入这个目录后;
运行: ./configure --prefix=/usr && make
直接就提示没有这个 路径;

请求帮助!

楼主楼主

cd shadowsocks-libev
我在进入这个目录后;
运行: ./configure --prefix=/usr && make
直接就提示没有这个 路径;

请求帮助!

@tianjianchn

This comment has been minimized.

Show comment
Hide comment
@tianjianchn

tianjianchn Mar 23, 2017

@cheeslou 如果你是在 CentOS7 上装的话,可以参考这个:install-shadowsocks.sh

@cheeslou 如果你是在 CentOS7 上装的话,可以参考这个:install-shadowsocks.sh

@holyen

This comment has been minimized.

Show comment
Hide comment
@holyen

holyen Apr 1, 2017

centos 上
./configure --prefix=/usr && make 这个报错了
-bash: ./configure: 没有那个文件或目录
@tianjianchn

holyen commented Apr 1, 2017

centos 上
./configure --prefix=/usr && make 这个报错了
-bash: ./configure: 没有那个文件或目录
@tianjianchn

@eldenchang

This comment has been minimized.

Show comment
Hide comment
@eldenchang

eldenchang Apr 19, 2017

@holyen 另一个老的branch的版本里面有configure, 这个当前版本可以参考这个wiki: shadowsocks-libev

eldenchang commented Apr 19, 2017

@holyen 另一个老的branch的版本里面有configure, 这个当前版本可以参考这个wiki: shadowsocks-libev

@acala127

This comment has been minimized.

Show comment
Hide comment
@acala127

acala127 Oct 27, 2017

@bologone check your /etc/shadowsocks-libev/config.json, change "127.0.0.1" to your server IP.

@bologone check your /etc/shadowsocks-libev/config.json, change "127.0.0.1" to your server IP.

@xuexiaoao

This comment has been minimized.

Show comment
Hide comment
@xuexiaoao

xuexiaoao Nov 25, 2017

这个是客户端还是服务端的ssr呢,有点搞不清楚

这个是客户端还是服务端的ssr呢,有点搞不清楚

@HarrisonXi

This comment has been minimized.

Show comment
Hide comment
@HarrisonXi

HarrisonXi Jan 3, 2018

@xuexiaoao 这是纯C实现的服务端,应该是最轻量的

@xuexiaoao 这是纯C实现的服务端,应该是最轻量的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment