朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

Linux服务器常用脚本

机子拿到手第一件事是什么?卸载阿里云监控、测基本参数、安装面板?为了方便大家使用,在此做一个记录:

1.一键网络重装系统 – 魔改版(适用于Linux / Windows)

wget --no-check-certificate -qO ~/Network-Reinstall-System-Modify.sh 'https://www.cxthhhhh.com/CXT-Library/Network-Reinstall-System-Modify/Network-Reinstall-System-Modify.sh' && chmod a+x ~/Network-Reinstall-System-Modify.sh && bash ~/Network-Reinstall-System-Modify.sh -UI_Options

#Windows系统默认账号密码:Administrator/cxthhhhh.com
#Linux系统默认账号密码:root/cxthhhhh.com

2.VPS综合测试脚本

wget git.io/vpstest && bash vpstest

#上面脚本整合了很多个测试,我个人喜欢Oldking的superbench:

wget -qO- git.io/superbench.sh | bash

3.SuperUpdate.sh 一键更换Linux软件源脚本

wget -qO- git.io/superupdate.sh | bash

#若无回显,请检查是否安装 wget 和 ca-certificates
#centos
yum install -y wget && yum install -y ca-certificates
#debian/ubuntu
apt-get install -y wget && apt-get install -y ca-certificates

4.内存检测脚本

检测VPS真实可分配内存的小工具,适用于检测VPS超售情况。本程序检测的可分配内存指的是用户使用时最大能占用的内存量。

#CentOS / RHEL
yum install wget -y
yum groupinstall "Development Tools" -y
wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc++ memtester.cpp
./a.out

#Ubuntu / Debian
apt-get update
apt-get install wget build-essential -y
wget https://raw.githubusercontent.com/FunctionClub/Memtester/master/memtester.cpp
gcc -l stdc++ memtester.cpp
./a.out

5.BBR 原版/魔改/plus+锐速 四合一

项目:https://github.com/cx9208/Linux-NetSpeed
bbrplus介绍见:https://www.hostloc.com/thread-507165-1-1.html

Bash
wget "https://github.com/chiakge/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

#提示证书错误的话执行:

apt-get -y install ca-certificates
yum -y install ca-certificates

#某些情况下需要执行:

apt-get install libelf-dev

6.魔改 OpenVZ 开启 GoogleBBR

适用于基于OpenVZ虚拟机上的 Debian or 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

#多网卡(多 IP) 服务器,会为所有网卡(所有 IP)提供加速:
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

7.回程路由测试:

Bash
wget https://raw.githubusercontent.com/nanqinlang-script/testrace/master/testrace.sh
bash testrace.sh

8.宝塔5.9开心版

https://github.com/wangzhe12588/bt59happy
PS:开心版有一定风险,仅供测试

#centos
yum install -y wget && wget --no-check-certificate -O install.sh https://raw.githubusercontent.com/wangzhe12588/bt59happy/master/install-5.9-c.sh && sh install.sh

#ubuntu
wget --no-check-certificate -O install.sh https://raw.githubusercontent.com/wangzhe12588/bt59happy/master/install-ubuntu.sh && sudo bash install.sh

#debian
wget --no-check-certificate -O install.sh https://raw.githubusercontent.com/wangzhe12588/bt59happy/master/install-ubuntu.sh && bash install.sh

9.一键安装openlitespeed+mraiodb+lsphp7.3环境和Wordpress

#Usage:
wget --no-check-certificate https://raw.githubusercontent.com/litespeedtech/ols1clk/master/ols1clk.sh && bash ols1clk.sh -w --adminpassword mypassword --email myemail@qing.su --lsphp 73 --wordpressplus mydomain.qing.su --wordpresspath /srv/www/mydomain.qing.su/public_html/ --dbrootpassword myrootpassword --dbname mywordpressdb --dbuser mywordpressdbuser --dbpassword mywordpressdbpassword --listenport 80 --wpuser mywpuser --wppassword mywppassword --wplang zh_CN
#Note
-w 安装wordpress
–adminpassword 后面加上你设定的OpenLiteSpeed后台管理员密码
–email 后面跟你的WordPress管理员邮箱
–lsphp 后面加上你想要安装的PHP版本,比如7.3就输入73, 5.6就输入56.
–wordpressplus 后面加上你的WordPress域名。请提前将该域名解析到这台VPS或者服务器上。
–wordpresspath 后面跟WordPress的安装路径。
–dbrootpassword 后面加上MariaDB数据库root用户的密码。
–dbname 后面加上你需要新建的WordPress的数据库名。
–dbuser 后面加上你需要新建的WordPress的数据库用户名。
–dbpassword 后面加上你需要新建的WordPress的数据库密码。
–listenport 后面加上网站的端口,默认是80。
–wpuser 后面加上你需要新建的WordPress的管理员用户名。
–wppassword 后面加上你需要新建的WordPress的管理员密码。
–wplang 后面加上WordPress语言,如果需要中文,填zh_CN; 如果需要英文,填en.

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » Linux服务器常用脚本

评论 23

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #30

    Howdy! This is my 1st comment here so I just
    wanted to give a quick shout out and say I genuinely enjoy reading through your posts.

    Can you recommend any other blogs/websites/forums
    that cover the same topics? Thanks!

  2. #29

    I’m impressed, I must say. Rarely do I come across
    a blog that’s both equally educative and engaging, and let me tell you, you’ve hit the nail on the head.
    The issue is something that not enough people are speaking intelligently about.

    I am very happy that I found this during my search for something regarding this.

  3. #28

    I was recommended this website by my cousin. I
    am not sure whether this post is written by him as no one else know such detailed about my problem.
    You’re incredible! Thanks!

    tinyurl.com1周前 (08-03)回复
  4. #27

    I’m not that much of a internet reader to be honest but
    your sites really nice, keep it up! I’ll go ahead and bookmark your website
    to come back later. All the best

  5. #26

    Touche. Great arguments. Keep up the good work.

    tinyurl.com3周前 (07-23)回复
  6. #25

    Hiya! I know this is kinda off topic nevertheless
    I’d figured I’d ask. Would you be interested in exchanging links or maybe guest writing a blog post or vice-versa?
    My blog addresses a lot of the same subjects as yours
    and I feel we could greatly benefit from each other. If you happen to
    be interested feel free to shoot me an email. I look
    forward to hearing from you! Awesome blog by the way!

    bit.ly4周前 (07-15)回复
  7. #24

    Heya i’m for the first time here. I found
    this board and I find It really useful & it helped me out much.
    I hope to give something back and help others like you aided
    me.

    tinyurl.com1个月前 (07-07)回复
  8. #23

    This is the right webpage for anyone who really wants to find out about this topic.
    You realize a whole lot its almost hard to argue with you (not that I really will need to…HaHa).
    You definitely put a new spin on a topic that’s been written about for ages.
    Wonderful stuff, just wonderful!

    tinyurl.com2个月前 (06-12)回复