Loading... # 宝塔面板 https://www.bt.cn/ ```bash #解除宝塔绑定限制 sed -i "s|if (bind_user == 'True') {|if (bind_user == 'REMOVED') {|g" /www/server/panel/BTPanel/static/js/index.js ``` # 加速 ```bash wget --no-check-certificate -O tcp.sh https://github.com/cx9208/Linux-NetSpeed/raw/master/tcp.sh && chmod +x tcp.sh && ./tcp.sh ``` # 探针 ```bash # 可乐脚本下载: wget https://raw.githubusercontent.com/CokeMine/ServerStatus-Hotaru/master/status.sh # 逗比脚本下载: wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/status.sh && chmod +x status.sh # 显示客户端管理菜单 bash status.sh c # 显示服务端管理菜单 bash status.sh sh ``` # 更新软件 ```bash #Ubuntu sudo apt-get update sudo apt-get upgrade #CentOS yum -y update && yum -y upgrade ``` # 安装Curl ```bash Ubuntu/Debian 系统安装 Curl 方法: apt-get update -y && apt-get install curl -y CentOS 系统安装 Curl 方法: yum update -y && yum install curl -y ``` # 在Linux系统中安装iperf3 ```bash sudo apt install iperf3 #Debian/Ubuntu sudo yum install iperf3 #RHEL/CentOS sudo dnf install iperf3 #Fedora 22+ #使用方法 客户端 iperf3 -c ip地址 -p 端口 -R #使用方法 服务端 iperf3 -s -p 端口 -i 1 ``` # 测试脚本 ```bash ##SuperBench(国内) wget -qO- --no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash #或者 curl -Lso- -no-check-certificate https://raw.githubusercontent.com/oooldking/script/master/superbench.sh | bash #或者 wget -qO- git.io/superbench.sh | bash ##秋水逸冰(国外) wget -qO- bench.sh | bash ``` # Linux生成测试文件 ```bash dd if=/dev/zero of=100mb.bin bs=100M count=1 #生成100MB测试文件 #更多详情 https://www.niconico.work/index.php/archives/26/ ``` # Debian 9/10快速开启Google BBR ```bash #修改系统变量 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 显示以下即已开启: # sysctl net.ipv4.tcp_available_congestion_control net.ipv4.tcp_available_congestion_control = bbr cubic reno #查看BBR是否启动 lsmod | grep bbr 显示以下即启动成功: # lsmod | grep bbr tcp_bbr 20480 14 ``` # 安装wget ```bash yum -y install wget #RHEL/CentOS apt-get install wget #Debian/Ubuntu ``` # GCP、AWS等大厂开启root登录 ```bash #一键脚本 echo root:niconiconi |sudo chpasswd root #修改niconiconi为自己想设定的密码 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 reboot #或者 手动设置 Debian系统(tg群: t.me/debianzh ) sudo -i 设置root密码(输入时不显示) passwd root 然后编辑ssh配置文件(进入后点击i键) vi /etc/ssh/sshd_config 找到下面的内容,并修改 PermitRootLogin no PasswordAuthentication no (no改为yes,修改完成点击ESC键,输入:wq回车) 最后,重启ssh service sshd restart ``` # 时区 ```bash 1. 查看当前时区 date -R 2. 修改设置时区 方法1:tzselect 方法2:timeconfig # RedHat Linux & CentOS 方法3:dpkg-reconfigure tzdata # Debian 3. 复制相应的时区文件,替换系统时区文件;或者创建链接文件: cp /usr/share/zoneinfo/$主时区/$次时区 /etc/localtime 在中国可以使用: cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime ``` # 安装git ```bash yum install git -y 或者 yum install -y git # Centos下使用 apt-get install git -y # Ubuntu/Debian下使用 ``` # SpeedTest CLI ```bash 1.安装 sudo apt-get install python-pip pip install speedtest-cli 2.使用 speedtest-cli ``` # Netflix ```bash yum install -y curl jq 2> /dev/null || apt install -y curl jq && bash <(curl -sSL https://raw.githubusercontent.com/Netflixxp/NF/main/nf.sh) ``` # 一键换源 ```bash bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirror.sh) ```
此处评论已关闭