查看: 2802|回复: 0
收起左侧

[教程] Install Shadowsocks-libev on RHEL/CENTOS 7

[复制链接]
bismall
发表于 2014-12-3 12:35:30 | 显示全部楼层 |阅读模式
本帖最后由 bismall 于 2015-7-16 04:25 编辑

[mw_shl_code=shell,true]yum -y install epel-release
yum -y update

yum -y install gcc automake autoconf libtool make m2crypto autoconf libtool
yum -y install curl curl-devel zlib-devel openssl-devel perl perl-devel cpio expat-devel gettext-devel
yum -y install git

git clone https://github.com/shadowsocks/shadowsocks-libev.git ~/shadowsocks-libev

cd ~/shadowsocks-libev
./configure && make
make install

cat << EOF > /etc/security/limits.conf
* soft nofile 51200
* hard nofile 51200
EOF

cat << EOF > /etc/sysctl.conf
# Optimize a shadowsocks server
net.core.wmem_max = 12582912
net.core.rmem_max = 12582912
net.ipv4.tcp_rmem = 10240 87380 12582912
net.ipv4.tcp_wmem = 10240 87380 12582912
net.ipv4.ip_local_port_range = 18000    65535
net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_max_syn_backlog = 3240000
net.core.somaxconn = 3240000
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_congestion_control = hybla
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_tw_recycle = 1
EOF

echo "ulimit -n 51200" >> /etc/rc.local
echo "ss-server -p 443 -k password -m aes-256-cfb -u --fast-open &" >> /etc/rc.local

chmod +x /etc/rc.local

firewall-cmd --permanent --zone=public --add-port=443/tcp
firewall-cmd --reload

sh /etc/rc.local[/mw_shl_code]
您需要登录后才可以回帖 登录 | 快速注册

本版积分规则

手机版|杀毒软件|软件论坛| 卡饭论坛

Copyright © KaFan  KaFan.cn All Rights Reserved.

Powered by Discuz! X3.4( 沪ICP备2020031077号-2 ) GMT+8, 2024-11-24 04:08 , Processed in 0.131739 second(s), 16 queries .

卡饭网所发布的一切软件、样本、工具、文章等仅限用于学习和研究,不得将上述内容用于商业或者其他非法用途,否则产生的一切后果自负,本站信息来自网络,版权争议问题与本站无关,您必须在下载后的24小时之内从您的电脑中彻底删除上述信息,如有问题请通过邮件与我们联系。

快速回复 客服 返回顶部 返回列表