【脚本】BBR原版/魔改/Plus/锐速四合一加速脚本

BBR是来自于Google的黑科技,目的是通过优化和控制TCP的拥塞,充分利用带宽并降低延迟,起到神奇般的加速效果。在BBR出来之前,就只有锐速比较好用,但是锐速是一个国产的闭源软件。 有些朋友会担心是否会有有害代码的问题。不过BBR就是一个开源在GITHUB的项目。前面我已经介绍过了《【脚本】服务器加速BBR脚本安装》 BBR在大部分的时间都是比较好用的。但是偶尔也会在某些机器,某些线路上面的效果不明显。 这里就给大家推荐某大佬修改的一键脚本,集成了BBR原版/魔改/plus+锐速的四合一脚本。 项目开源地址:https://github.com/cx9208/Linux-NetSpeed 脚本安装命令: wget "https://github.com/cx9208/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh 在vultr上Centos 7, Debian 8/9, Ubuntu 16/18测试通过,不支持ovz虚拟方式的vps google cloud实机也测试通过。 oracle centos7 暂时无法安装,oracle其他系统未测试 Oracle的Ubuntu可以直接bbr,但centos需要执行以下命令否则报错: 1. 切换成 root 2. 重新生成 grub2.cfg, 命令如下: grub2-mkconfig -o /boot/grub2/grub.cfg 3. 跑你要跑的 bbr.sh 1.先选择1-3在切换内核(第一次显示为bbr内核也要切换一遍),重启 2. 重启后不用再下载脚本,直接 ./tcp.sh ,在[4 – 8]中选你要开的加速 “1. 安装 BBR/BBR魔改版内核” 对应4,5,6(原版,魔改,暴力魔改) “2. 安装 BBRplus版内核 ” 对应7(plus) “3. 安装 Lotserver(锐速)内核” 对应8(锐速) 3. 开启后再 ./tcp.sh , 显示开启成功则启动成功,你也可以自己手动确认 现在你可以自由的切换你想要的加速,直到你不想折腾为止~ END

2019年6月4日 · 1 分钟

【脚本】一键卸载安骑士脚本 屏蔽阿里云ECS以及腾讯云后台监控

国内的服务器:阿里云、腾讯云的服务器跟百度云加速都自带监控,它会自动检测你的文章内容跟URL。 你可能会发现有些网站或者出现关键字会被扫描到提示不安全内容,而且可能会被自动屏蔽这篇文章的URL,甚至要求我们删除这篇文章。 比如阿里云: 打开这个页面就可以看到你的阿里云被屏蔽的所有页面:https://yundun.console.aliyun.com/?p=sc#/sc/fine 阿里云: 一、卸载安骑士 wget http://update.aegis.aliyun.com/download/quartz_uninstall.sh chmod x quartz_uninstall.sh ./quartz_uninstall.sh 二、删除残留文件 rm -rf /etc/init.d/agentwatch /usr/sbin/aliyun-service rm -rf /usr/local/aegis* 三、屏蔽云盾 同时,云盾也是需要屏蔽掉的,这里我们直接将云盾的IP段屏蔽到iptables中。 iptables -I INPUT -s 140.205.201.0/28 -j DROP iptables -I INPUT -s 140.205.201.16/29 -j DROP iptables -I INPUT -s 140.205.201.32/28 -j DROP iptables -I INPUT -s 140.205.225.192/29 -j DROP iptables -I INPUT -s 140.205.225.200/30 -j DROP iptables -I INPUT -s 140.205.225.184/29 -j DROP iptables -I INPUT -s 140.205.225.183/32 -j DROP iptables -I INPUT -s 140.205.225.206/32 -j DROP iptables -I INPUT -s 140.205.225.205/32 -j DROP iptables -I INPUT -s 140.205.225.195/32 -j DROP iptables -I INPUT -s 140.205.225.204/32 -j DROP 写入之后然后保存iptables,这样就完成了屏蔽阿里云安骑士,以及云盾。 ...

2019年5月27日 · 1 分钟

【脚本】Linux系统服务器性能跑分测试脚本/UnixBench一键跑分测试脚本

UnixBench是一款开源的用于测试Unix、BSD、Linux系统基本性能的工具,比较通用于Linux系统VPS性能测试,主要测试项目有:系统调用、读写、进程、图形化测试、2D、3D、管道、运算、C库等系统基准性能提供测试数据。 一、脚本命令 如果你想使用UnixBench测试你的服务器性能,请使用SSH工具连接你的服务器后执行下面命令。脚本默认使用UnixBench5.1.3版本,因为大多VPS都没有显卡或者是集成显卡,不需要进行图像性能测试,所以作者注释了关于graphic的测试项。此脚本运行测试时间大约10-30分钟,跑分结束后得分越高性能越好。 wget --no-check-certificate https://github.com/wn789/unixbench/blob/master/unixbench.sh chmod +x unixbench.sh ./unixbench.sh 二、测试效果 ======================================================================== BYTE UNIX Benchmarks (Version 5.1.3) System: vmu8i5vg.hostflyte.com: GNU/Linux OS: GNU/Linux -- 3.10.0-862.6.3.el7.x86_64 -- #1 SMP Tue Jun 26 16:32:21 UTC 2018 Machine: x86_64 (x86_64) Language: en_US.utf8 (charmap="UTF-8", collate="UTF-8") CPU 0: Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz (5200.0 bogomips) x86-64, MMX, Physical Address Ext, SYSENTER/SYSEXIT, SYSCALL/SYSRET 02:55:47 up 3 days, 10:29, 1 user, load average: 0.00, 0.17, 0.39; runlevel 3 ------------------------------------------------------------------------ Benchmark Run: Mon May 20 2019 02:55:47 - 03:24:31 1 CPU in system; running 1 parallel copy of tests Dhrystone 2 using register variables 20693875.6 lps (10.0 s, 7 samples) Double-Precision Whetstone 3391.4 MWIPS (10.0 s, 7 samples) Execl Throughput 1960.6 lps (30.0 s, 2 samples) File Copy 1024 bufsize 2000 maxblocks 306812.9 KBps (30.0 s, 2 samples) File Copy 256 bufsize 500 maxblocks 85444.0 KBps (30.0 s, 2 samples) File Copy 4096 bufsize 8000 maxblocks 820093.2 KBps (30.0 s, 2 samples) Pipe Throughput 489059.0 lps (10.0 s, 7 samples) Pipe-based Context Switching 101501.3 lps (10.0 s, 7 samples) Process Creation 6539.4 lps (30.0 s, 2 samples) Shell Scripts (1 concurrent) 2674.3 lpm (60.0 s, 2 samples) Shell Scripts (8 concurrent) 364.4 lpm (60.1 s, 2 samples) System Call Overhead 427380.5 lps (10.0 s, 7 samples) System Benchmarks Index Values BASELINE RESULT INDEX Dhrystone 2 using register variables 116700.0 20693875.6 1773.3 Double-Precision Whetstone 55.0 3391.4 616.6 Execl Throughput 43.0 1960.6 456.0 File Copy 1024 bufsize 2000 maxblocks 3960.0 306812.9 774.8 File Copy 256 bufsize 500 maxblocks 1655.0 85444.0 516.3 File Copy 4096 bufsize 8000 maxblocks 5800.0 820093.2 1414.0 Pipe Throughput 12440.0 489059.0 393.1 Pipe-based Context Switching 4000.0 101501.3 253.8 Process Creation 126.0 6539.4 519.0 Shell Scripts (1 concurrent) 42.4 2674.3 630.7 Shell Scripts (8 concurrent) 6.0 364.4 607.4 System Call Overhead 15000.0 427380.5 284.9 ======== System Benchmarks Index Score 584.6 ======= Script description and score comparison completed! ======= 本脚本适用于CentOS的下载脚本、 ...

2019年5月20日 · 2 分钟

【脚本】服务器加速BBR脚本安装

通过脚本一键升级内核并安装BBR加速. Linux系统中root用户拥有最高权限, 出于安全考虑, GCP默认是以普通用户登录的, 我们需要先切换到root用户, 否则运行某些命令时会提示无权限. 先切换到root用户. Xshell连上服务器后, 输入命令: sudo -i 切换后, 命令前面的提示符中也会显示root 依次运行以下4条命令 (输完一条记得按回车呀) yum install -y wget wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh chmod +x bbr.sh ./bbr.sh 如果遇到问题, 记得看提示! 安装完成后,脚本会提示需要重启VPS,输入 y 并回车后重启, 这时Xshell连接也会自动断开。 VPS重启可能需要几分钟, 耐心等待一下. 重启完成后,再用Xhell重新连接VPS, sudo -i切换到root用户. 现在验证一下是否成功安装了最新内核并开启BBR. 输入以下命令: uname -r 查看内核版本,如果返回值含有4.13或以上版本, 就表示OK了. sysctl net.ipv4.tcp_available_congestion_control 返回值一般为: net.ipv4.tcp_available_congestion_control = bbr cubic reno sysctl net.ipv4.tcp_congestion_control 返回值一般为: net.ipv4.tcp_congestion_control = bbr sysctl net.core.default_qdisc 返回值一般为: net.core.default_qdisc = fq lsmod | grep bbr 返回值有 tcp_bbr 模块即说明bbr已启动。

2019年5月20日 · 1 分钟

【CentOS7】防火墙端口增删

CentOS 7 防火墙配置常用命令汇总 # 1.查看防火墙状态 systemctl status firewalld # 2.开启防火墙 systemctl start firewalld # 3.防火墙开机自启动 systemctl enable firewalld # 4.未安装防火墙 sudo yum install firewalld # 5.查看所有打开的端口 firewall-cmd --zone=public --list-ports # 6.添加单端口 firewall-cmd --add-port=22/tcp --permanent # 7.添加端口区间 firewall-cmd --zone=public --add-port=39000-40000/tcp --permanent # 8.重载防火墙 firewall-cmd --reload # 9.删除指定端口 firewall-cmd --permanent --remove-port=123/tcp 一、防火墙的基本使用 1.查看防火墙状态 systemctl status firewalld 2.开启防火墙 systemctl start firewalld 3.关闭防火墙 systemctl stop firewalld 4.若遇无法开启 //先用 systemctl unmask firewalld.service //再用 systemctl start firewalld.service #如果还是not found 就是未安装,执行以下命令安装 sudo yum install firewalld //再启动就OK了 5.开机启用防火墙 ...

2019年4月23日 · 1 分钟

【CentOS7】修改SSH默认22号端口

目前很多人还是使用密码来登陆服务器,并且服务器都是默认的 22端口,但是这样会有被暴力破解密码的危险(除非足够复杂)。 为了服务器安全,推荐:非22端口+Key密匙登陆+Key密匙密码,这样搭配最安全。 为了保险起见,我们先添加一个SSH端口并添加对应的防火墙规则,然后用这个新的端口连接服务器试试,如果没问题了,我们再删除默认的22端口。 添加SSH端口 vi /etc/ssh/sshd_config # vi打开文件后,按 I键 进入编辑模式,然后按下面的要求添加端口配置,最后按 ESC键 退出编辑模式并输入 :wq 保存并退出vi编辑器。 我们在默认的SSH端口配置下面添加一个我们要用的新的端口,例如 23456 Port 22 # 默认的22端口配置 Port 23456 # 新添加的 23456端口配置 然后我们重启SSH: service ssh restart # 如果提示服务不存在,那就用 service sshd restart # CentOS 7 使用 systemctl restart sshd.service 防火墙放通23456端口 firewall-cmd --add-port=23456/tcp --permanent #重载防火墙 firewall-cmd --reload #查询指定端口是否开启成功 firewall-cmd --query-port=23456/tcp #返回yes就放通成功了 yes 上面步骤做完了,那么请断开当前的SSH连接,然后把SSH端口改为新的端口(示例端口为 23456),链接新端口试试,如果连接正常,那么继续下面的步骤,如果连接不正常,那么使用旧端口 22 连接上面去排除问题。 取消默认SSH 22号端口 vi /etc/ssh/sshd_config 我们再打开SSH配置文件,删除 Port 22 这一行,然后重启SSH即可。 ...

2019年4月23日 · 1 分钟

【Ubuntu】在Ubuntu 14.04 64bit中永久添加DNS的方法

DNS信息是由/etc/resolv.conf提供的,它是每次开机时,由/sbin/resolvconf生成的 /etc/resolv.conf是/run/resolvconf/resolv.conf的符号链接 错误的修改方法 直接修改/etc/resolv.conf文件添加DNS的方法并不可行,因为重启系统后,该配置文件会被重新覆盖。 这一点也可以该文件顶部的注释行证明 原因解释: 在Ubuntu中有一个 resolvconf的服务,这个服务用来控制/etc/resolv.conf的内容。 所以一旦我们重启了系统或者该服务,那么/etc/resolv.conf文件中的内容将被还原为原来的内容。 所以直接修改/etc/resolv.conf并不能解决这个问题。 正确的修改方法 修改如下文件,默认是空的 sudo vim /etc/resolvconf/resolv.conf.d/base 在里面加入你想添加的DNS服务器,一行一个 修改好后保存,然后执行 sudo /sbin/resolvconf -u 或者 sudo etc/init.d/resolvconf restart 或者重启系统 再查看/etc/resolv.conf文件,已经将我们添加的内容加上了 cat /etc/resolv.conf 另一种方法 sudo vim /etc/network/interfaces dns-nameservers 8.8.8.8 114.114.114.114 遇到的问题 无法实现上面的功能,不知道是什么原因? http://jingyan.baidu.com/article/e5c39bf5bbe0e739d7603396.html 似乎有价值 最后的折衷解决方案,在网卡配置GUI中手动加入dns配置,然后使用下面的命令检查 nmcli dev list iface wlan0 | grep DNS 把wlan0换成你网路连接的硬体,看DNS是哪一个,就知道现在使用的DNS是谁 参考文献 [1].http://blog.csdn.net/yangcs2009/article/details/26674311 [2].http://www.linuxidc.com/Linux/2009-08/21425.htm 解决方法在文章最后 [3].http://www.tuicool.com/articles/iiUjAj 这个是最终解决办法 [4].http://askubuntu.com/questions/130452/how-do-i-add-a-dns-server-via-resolv-conf [5].http://www.tuicool.com/articles/RVZn2y 针对Ubuntu 14.04的

2019年4月23日 · 1 分钟

【宝塔面板】5.9版本安装指令

安装要求: Python版本: 2.6/2.7(安装宝塔时会自动安装) 内存:128M以上,推荐512M以上(纯面板约占系统10M内存) 硬盘:100M以上可用硬盘空间(纯面板约占20M磁盘空间) 系统:CentOS 6.x / 7.x (Ubuntu、Debian、Fedora ), 确保是干净的操作系统,不支持32位系统,没有安装过其它环境带的Apache/Nginx/php/MySQL(已有环境不可安装) Linux面板5.9(稳定版)安装命令: Centos安装命令: yum install -y wget && wget -O install.sh http://download.bt.cn/install/install.sh && sh install.sh Ubuntu/Deepin安装命令: wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && sudo bash install.sh Debian安装命令: wget -O install.sh http://download.bt.cn/install/install-ubuntu.sh && bash install.sh Fedora安装命令: wget -O install.sh http://download.bt.cn/install/install.sh && bash install.sh 备用节点【广东】: yum install -y wget && wget -O install.sh http://125.88.182.172:5880/install/install.sh && sh install.sh 备用节点【香港】: yum install -y wget && wget -O install.sh http://103.224.251.67:5880/install/install.sh && sh install.sh 备用节点【美国】: yum install -y wget && wget -O install.sh http://128.1.164.196:5880/install/install.sh && sh install.sh 若点击更新后没生效,请尝试重启面板服务: ...

2019年4月23日 · 1 分钟

【宝塔面板】常用脚本命令

虽然目前宝塔面板开始收费,但是免费版本功能还是够用的。至少目前还没有其他相对好的免费面板替换,所以如果希望使用在Linux服务器可视化面板,还是建议使用宝塔面板的。老蒋在平时有帮助网友解决有服务器中安装宝塔面板的问题时候,有需要查看宝塔面板特定的脚本命令。 所以,在这篇文章中将宝塔面板常用的脚本整理出来,这样下次不用再去搜索。其实我们在做任何事情的时候,记忆力或者不想记,可以记录下来,以便以后使用的时候直接寻找文档。 第一、宝塔面板安装 请查看前文《宝塔面板:5.9版本安装指令》 第二、宝塔面板管理 停止 /etc/init.d/bt stop 启动 /etc/init.d/bt start 重启 /etc/init.d/bt restart 卸载 /etc/init.d/bt stop && chkconfig --del bt && rm -f /etc/init.d/bt && rm -rf /www/server/panel 查看当前面本端口 cat /www/server/panel/data/port.pl 修改面板端口,如要改成8881(centos 6 系统) echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart 修改面板端口,如要改成8881(centos 7 系统) echo '8881' > /www/server/panel/data/port.pl && /etc/init.d/bt restart 强制修改MySQL管理(root)密码,如要改成123456 cd /www/server/panel && python tools.py root 123456 修改面板密码,如要改成123456 ...

2019年4月23日 · 2 分钟