1
0
Эх сурвалжийг харах

快速安装 shadowsocks-libev 脚本 For Debian Centos Ubuntu

hongwenjun 6 жил өмнө
parent
commit
6467339c6e
4 өөрчлөгдсөн 16 нэмэгдсэн , 112 устгасан
  1. 0 21
      filelist
  2. 16 18
      shadowsocks/install_ss-server.sh
  3. 0 27
      sku.sh
  4. 0 46
      ss_brook.sh

+ 0 - 21
filelist

@@ -1,21 +0,0 @@
-/root/filelist
-/etc/init.d/brook
-/etc/init.d/frps
-/etc/init.d/shadowsocks-go
-/etc/nginx/1_www.srgb.xyz_bundle.crt
-/etc/nginx/2_www.srgb.xyz.key
-/etc/nginx/sites-enabled/default
-/etc/nginx/sites-enabled/frps
-/etc/nginx/sites-enabled/http
-/etc/nginx/sites-enabled/https
-/etc/shadowsocks-go/config.json
-/root/.bashrc
-/root/.vimrc
-/root/bbr.sh
-/root/fuck_net
-/usr/bin/shadowsocks-server
-/usr/local/brook/brook
-/usr/local/brook/brook.conf
-/usr/local/frps/frps
-/usr/local/frps/frps.ini
-

+ 16 - 18
shadowsocks/install_ss-server.sh

@@ -3,17 +3,23 @@
 # 定义文字颜色
 Green="\033[32m"  && Red="\033[31m" && GreenBG="\033[42;37m" && RedBG="\033[41;37m" && Font="\033[0m"
 
-echo -e "${Green}:: 注意 快速安装 shadowsocks-libev 脚本 For debian 9 ${Font}"
-echo -e "${RedBG}:: Centos和Ubuntu系统,进行编译安装 ${RedBG} shadowsocks-libev  ${Font}"
+echo -e "${Green}:: 注意 快速安装 shadowsocks-libev 脚本 For Debian Centos Ubuntu ${Font}"
+echo -e "${RedBG}:: 如果没有正确安装,请编译安装/更新 ${RedBG} shadowsocks-libev ${Font}"
 echo -e "${Green}$  bash <(curl -L -s git.io/fhExJ) update  ${Font}"
 
-debian_fast(){
-    # 安装所需运行库
-    apt update
-    apt install -y  libev-dev libc-ares-dev  libmbedtls-dev libsodium-dev
+def_install(){
+    if [[ ${release} == "centos" ]]; then
+        # 安装所需运行库 Centos
+        yum update -y
+        yum install -y  libev-devel c-ares-devel  mbedtls-devel libsodium-devel
+    else
+        # 安装所需运行库 Debian 9 & Ubuntu
+        apt update
+        apt install -y  libev-dev libc-ares-dev  libmbedtls-dev libsodium-dev
+    fi
 
-    # 下载 ss-server
-    wget https://raw.githubusercontent.com/hongwenjun/vps_setup/master/ss-server
+    # 下载 ss-server 对应各系统
+    wget https://raw.githubusercontent.com/hongwenjun/vps_setup/master/shadowsocks/${release}/ss-server
     chmod +x  ss-server  &&  mv ss-server /usr/local/bin/ss-server
 }
 
@@ -77,7 +83,7 @@ sysctl_config
 lsmod | grep bbr
 
 # 判断系统安装软件
-install_ss-server(){
+update_ss-server(){
     if [[ ${release} == "centos" ]]; then
         centos7_dev
         inst_ss-server
@@ -94,21 +100,13 @@ install_ss-server(){
     fi
 }
 
-def_install(){
-    if [[ ${release} == "debian" ]]; then
-        debian_fast
-    else
-        install_ss-server
-    fi
-}
-
 # 安装 ss-server
 check_sys
 if [[ $# > 0 ]]; then
     key="$1"
     case $key in
         update)
-        install_ss-server
+        update_ss-server
         ;;
     esac
 else

+ 0 - 27
sku.sh

@@ -1,27 +0,0 @@
-#!/bin/bash
-
-# 定义文字颜色
-Green="\033[32m"  && Red="\033[31m" && GreenBG="\033[42;37m" && RedBG="\033[41;37m" && Font="\033[0m"
-
-echo -e "${RedBG}:: 注意 一键安装 SS+Kcp+Udp2Raw 脚本 快速安装 只适合 debian 9 ${Font}"
-echo -e ":: Centos 和 Ubuntu 系统,需要再安装 ${RedBG} shadowsocks-libev  ${Font}"
-
-# 安装所需运行库
-apt update
-apt install -y  libev-dev libc-ares-dev  libmbedtls-dev libsodium-dev
-
-# 下载 ss-server
-wget https://raw.githubusercontent.com/hongwenjun/vps_setup/master/ss-server
-chmod +x  ss-server  &&  mv ss-server /usr/local/bin/ss-server
-
-sysctl_config() {
-    sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
-    echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
-    sysctl -p >/dev/null 2>&1
-}
-
-# 开启 BBR
-sysctl_config
-lsmod | grep bbr

+ 0 - 46
ss_brook.sh

@@ -1,46 +0,0 @@
-#!/bin/bash
-
-# 常用工具和配置
-apt-get update
-apt-get install -y htop tmux screen iperf3
-wget -O .vimrc      --no-check-certificate https://raw.githubusercontent.com/hongwenjun/srgb/master/vim/_vimrc
-wget -O .bashrc     --no-check-certificate https://raw.githubusercontent.com/hongwenjun/srgb/master/vim/_bashrc
-wget -O .tmux.conf  --no-check-certificate https://raw.githubusercontent.com/hongwenjun/tmux_for_windows/master/.tmux.conf
-
-# 下载ss_brook包和解压
-wget -O ss_brook.tgz  https://git.io/fxQuY
-tar -xzvf ss_brook.tgz  -C /
-rm ss_brook.tgz
-
-# 加入开机服务
-systemctl enable frps
-systemctl enable brook
-systemctl enable shadowsocks-go
-
-# 开启服务
-/etc/init.d/frps start
-/etc/init.d/brook start
-/etc/init.d/shadowsocks-go start
-
-# bbr 设置打开
-sysctl_config() {
-    sed -i '/net.core.default_qdisc/d' /etc/sysctl.conf
-    sed -i '/net.ipv4.tcp_congestion_control/d' /etc/sysctl.conf
-    echo "net.core.default_qdisc = fq" >> /etc/sysctl.conf
-    echo "net.ipv4.tcp_congestion_control = bbr" >> /etc/sysctl.conf
-    sysctl -p >/dev/null 2>&1
-}
-sysctl_config
-
-
-# 一键安装 SS+Kcp+Udp2Raw 脚本 快速安装 for debian 9
-wget -qO- git.io/fpZIW | bash
-
-# 安装所需运行库
-# apt update
-# apt install -y  libev-dev libc-ares-dev  libmbedtls-dev libsodium-dev
-# 安装脚本 sku
-# mkdir -p sku && cd sku && wget -O sku.tgz https://git.io/fxy7s && tar -xvf sku.tgz && ./sku.sh
-
-
-