记录一下我的购买服务器后通常会进行的操作

1:安装 BBR:
KVM:
wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh
chmod +x bbr.sh
./bbr.sh
通用魔改版:
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
适用于ubuntu18.04的魔改版:
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh"
apt install make gcc -y
sed -i 's#/usr/bin/gcc-4.9#/usr/bin/gcc#g' '/root/tcp.sh'
chmod +x tcp.sh && ./tcp.sh
Openvz:

LKL版:

wget --no-check-certificate https://github.com/91yun/uml/raw/master/lkl/install.sh && bash install.sh
LKL-Rinetd版:
Centos:
#单网卡
wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos.sh
bash tcp_nanqinlang-rinetd-centos.sh

#如果提示only support OpenVZ !,则使用下面这个脚本

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0-nocheckvirt/tcp_nanqinlang-rinetd-centos-nocheckvirt.sh
bash tcp_nanqinlang-rinetd-centos-nocheckvirt.sh

#多网卡

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-centos.sh
bash tcp_nanqinlang-rinetd-centos.sh

#如果提示only support OpenVZ !,则使用下面这个脚本

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0-nocheckvirt/tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt-multiNIC.sh
bash tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt-multiNIC.sh
Ubuntu:

#适用于单网卡(单IP)服务器:

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu.sh
bash tcp_nanqinlang-rinetd-debianorubuntu.sh

#如果提示only support OpenVZ !,则使用下面这个脚本

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0-nocheckvirt/tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt.sh
bash tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt.sh

#多网卡:

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0/tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh
bash tcp_nanqinlang-rinetd-debianorubuntu-multiNIC.sh

#如果提示only support OpenVZ !,则使用下面这个脚本

wget https://github.com/tcp-nanqinlang/lkl-rinetd/releases/download/1.1.0-nocheckvirt/tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt-multiNIC.sh
bash tcp_nanqinlang-rinetd-debianorubuntu-nocheckvirt-multiNIC.sh
2.安装 宝塔面板
5.x: yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh
6.x: yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && bash install.sh
3.安装 科学上网
Doubi版:
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/ssrmu.sh && chmod +x ssrmu.sh && bash ssrmu.sh

秋水逸冰版:

wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh
chmod +x shadowsocks-all.sh
./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log

手动编译修改进程名防止被发现:

wget https://github.com/shadowsocks/shadowsocks/archive/master.zip
unzip master.zip
vim setup.py 

修改name项和entry_points下的ssserver项为其他名称,比如nodejs
然后安装

python setup.py install

然后添加开机启动

chmod +x /etc/rc.d/rc.local
vi /etc/rc.local

添加

nodejs -p 端口 -k 密码 -m 加密 --user nobody -d start
4.安装 ServerStatus监控服务器情况
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubiBackup/doubi/master/status.sh && chmod +x status.sh

显示客户端管理菜单 bash status.sh c

显示服务端管理菜单 bash status.sh s

安装目录:/usr/local/ServerStatus

网页文件:/usr/local/ServerStatus/web

配置文件:/usr/local/ServerStatus/server/config.json

客户端查看日志:tail -f tmp/serverstatus_client.log

服务端查看日志:tail -f /tmp/serverstatus_server.log

注意:

如果发生wegt错误,那这是因为你的系统过于精简了,请输入

yum install -y wget
5.安装 Fail2ban防御暴力SSH破解
wget https://raw.githubusercontent.com/FunctionClub/Fail2ban/master/fail2ban.sh && bash fail2ban.sh 2>&1 | tee fail2ban.log

使用参数ping来运行fail2ban-client 命令。 如果fail2ban服务正常运行,你可以看到“pong(嘭)”作为响应。

sudo fail2ban-client ping

回应:

Server replied: pong

待续……

Share

发表评论

电子邮件地址不会被公开。 必填项已用*标注