Last active
May 26, 2018 06:56
-
-
Save littlekign/7438fdbd4dcf6ea3d52738aca5e8847f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 一、environment configuration(环境配置) | |
| yum update | |
| yum install git wget | |
| 二、shadowsocks-libev for centos7 configuration(ss在centos7在的依赖配置) | |
| yum install gcc gettext autoconf libtool automake make pcre-devel asciidoc xmlto c-ares-devel libev-devel libsodium-devel mbedtls-devel -y | |
| //install libsodium | |
| wget https://download.libsodium.org/libsodium/releases/libsodium-1.0.16.tar.gz --no-check-certificate | |
| tar xvf libsodium-1.0.12.tar.gz | |
| pushd libsodium-1.0.12 | |
| ./configure --prefix=/usr && make | |
| sudo make install | |
| popd | |
| sudo ldconfig | |
| //install mbedtls lib | |
| wget https://tls.mbed.org/download/mbedtls-2.6.0-gpl.tgz | |
| tar xvf mbedtls-2.4.2-gpl.tgz | |
| pushd mbedtls-2.4.2 | |
| make SHARED=1 CFLAGS=-fPIC | |
| sudo make DESTDIR=/usr install | |
| popd | |
| sudo ldconfig | |
| 三、shadowsocks-libev complie for centos7(ss在centos7下的编译安装) | |
| cd /tmp | |
| git clone https://github.com/shadowsocks/shadowsocks-libev.git | |
| cd shadowsocks-libev | |
| git submodule update --init | |
| ./autogen.sh && ./configure && make | |
| sudo make install | |
| 四、shadowsocks-libev server configuration(ss-server在centos7的配置) | |
| /* This shellScript is for the debian os | |
| ** so we should change the | |
| ** vi /lib/systemd/system/shadowsocks-libev.service | |
| ** Group = nogroup => Group = nobody | |
| ** and vi /etc/default/shadowsocks-libev | |
| ** Group = nogroup => Group = nobody | |
| ***change all the ss-server path to /usr/local/bin/ss-server | |
| 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 | |
| # Config ss service start on server startup: 添加开机自启动服务 | |
| chkconfig --add shadowsocks-libev | |
| chkconfig shadowsocks-libev on | |
| # setup the service :启动服务 | |
| service shadowsocks-libev start | |
| # check the server | |
| systemctl status shadowsocks-libev | |
| # open the port | |
| systemctl start firewalld #开启防火墙 | |
| firewall-cmd --permanent --add-port=${SERVER_PORT}/tcp ##change the ${SERVER_PORT} to real port | |
| firewall-cmd --permanent --add-port=${SERVER_PORT}/udp | |
| firewall-cmd --reload | |
| ###############################--Kcptun Install--###################################################### | |
| cd /tmp | |
| wget https://raw.githubusercontent.com/kuoruan/shell-scripts/master/kcptun/kcptun.sh | |
| chmod +x ./kcptun.sh | |
| vi /usr/local/bin/kcptun/server-config.json | |
| ./server_linux_amd64 -c server-config.json | |
| firewall-cmd --permanent --add-port=server_port | |
| ## references | |
| http://dcamero.azurewebsites.net/shadowsocks-kcptun.html //introduction for all kinds vpn build | |
| https://blog.kuoruan.com/110.html // For shadowsocks-libev + kcptun build | |
| http://engineplay.com/2017/04/10/Shadowsocks-libev/ // For shadowsocks-libev + kcptun build | |
| http://www.zanxus.com/linux/2017/01/19/shadowsocks-installation.html // For shadowsocks-libev + kcptun build | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment