root:
sudo -i
安装 Curl apt-get update -y && apt-get install curl -y
apt -y install wget or yum -y install wget apt-get install sudo
VPS配置查看:
bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh)
curl -sL yabs.sh | bash -s -- -i
wget -q https://github.com/Aniverse/A/raw/i/a && bash a
wget -qO- bench.sh | bash
其他
bash <(wget -qO- git.io/ceshi) -j wget -q https://github.com/Aniverse/A/raw/i/a && bash a
测速:
bash <(curl -Lso- https://git.io/superspeed.sh)
bash <(curl -Lso- http://yun.789888.xyz/speedtest.sh)
流媒体检查:
bash <(curl -L -s check.unlock.media)
bash <(curl -L -s https://raw.githubusercontent.com/lmc999/RegionRestrictionCheck/main/check.sh) bash <(curl -sSL "https://github.com/CoiaPrant/MediaUnlock_Test/raw/main/check.sh")
BBR一键脚本
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
BBR手动开启
#首先先更新下系统,然后安装依赖组建:
apt-get update apt-get update && apt-get install -y wget curl
#之后开启原生BBR:
echo "net.core.default_qdisc=fq" >> /etc/sysctl.conf echo "net.ipv4.tcp_congestion_control=bbr" >> /etc/sysctl.conf sysctl -p
#检测是否正常开启BBR:
sysctl net.ipv4.tcp_available_congestion_control lsmod | grep bbr
回程路由:
curl https://raw.githubusercontent.com/zhanghanyun/backtrace/main/install.sh -sSf | sh
wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh bash testrace.sh
wget -qO- git.io/besttrace | bash
宝塔无需手机登录:
echo "{\"uid\":1000,\"username\":\"admin\",\"serverid\":1}" > /www/server/panel/data/userInfo.json
warp 解锁netflix:
wget -N https://cdn.jsdelivr.net/gh/kkkyg/CFwarp/CFwarp.sh && bash CFwarp.sh
wget https://github.com/luoxue-bot/warp_auto_change_ip/raw/main/warp_change_ip.sh && chmod +x warp_change_ip.sh && ./warp_change_ip.sh 停止warp systemctl stop wg-quick@wgcf 启动 systemctl start wg-quick@wgcf 重启 systemctl restart wg-quick@wgcf
ubuntu 关闭防火墙
关闭ubuntu的防火墙 ufw disable 开启防火墙 ufw enable 卸载iptables apt-get remove iptables 关闭ubuntu中的防火墙的其余命令 iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -F
iptables转发
wget -qO natcfg.sh http://arloor.com/sh/iptablesUtils/natcfg.sh && bash natcfg.sh
wget -N --no-check-certificate https://zhujiget.com/wp-content/uploads/2020/brook-pf.sh && chmod +x brook-pf.sh && ./brook-pf.sh
服务器开启root登陆
echo root:新密码 |sudo chpasswd root sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config; sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication yes/g' /etc/ssh/sshd_config; sudo service sshd restart
安装docker
安装 curl -sSL https://get.docker.com/ | sh 卸载docker sudo apt-get remove docker docker-engine rm -fr /var/lib/docker/
硬盘检测
apt-get install smartmontools lsblk smartctl -A /dev/sda | grep Power_On_Hours
硬盘测速
apt install hdparm hdparm -t --direct /dev/sda 使用dd测试硬盘IO性能 dd if=/dev/zero of=/dd/1Gb.file bs=8k count=102400 dd bs=128k count=10k if=/dev/zero of=test
挂载
lsblk #查看盘符,如添加sdb盘,挂载目录为/dd mkfs.ext4 /dev/sdb mkdir /dd mount /dev/sdb /dd chmod -R 777 /dd #取消挂载 umount /dev/sdb #重启系统后,如发现挂载消失,执行如下两条 mount /dev/sdb /dd chmod -R 777 /dd #多块硬盘组raid0 ,如sdb和sdc两块硬盘 apt-get install mdadm mdadm -Cv hhd -a yes -n 2 -l 0 /dev/sdb /dev/sdc
转发
#firewall firewall-cmd --permanent --zone=public --add-masquerade firewall-cmd --permanent --zone=public --add-forward-port=proto=8080:proto=tcp:toaddr=192.168.10.10:toport=3000 firewall-cmd --reload firewall-cmd --zone=public --list-all
# iptables iptables -t nat -F iptables -t nat -A POSTROUTING -j MASQUERADE iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.10.10:3000 service iptables save iptables -t nat -nL --line
剑皇
wget https://github.com/maintell/webBenchmark/releases/download/0.3/webBenchmark_linux_x64 -O webBenchmark_linux_x64 && chmod +x webBenchmark_linux_x64
./webBenchmark_linux_x64 -f -r -s URL