SSH工具
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
|
网速测试
1 2 3 4 5 6 7 8
|
wget -qO- bench.sh | bash
curl -Lso- bench.sh | bash
|
Aria2
1
| wget https://raw.githubusercontent.com/P3TERX/aria2.sh/master/aria2.sh && bash aria2.sh
|
lnmp一键安装包
1 2 3 4
| wget http://soft.vpser.net/lnmp/lnmp1.7beta.tar.gz -cO lnmp1.7beta.tar.gz && tar zxf lnmp1.7beta.tar.gz && cd lnmp1.7
wget http://soft.vpser.net/lnmp/lnmp1.6.tar.gz -cO lnmp1.6.tar.gz && tar zxf lnmp1.6.tar.gz && cd lnmp1.6 && LNMP_Auto="y" DBSelect="2" DB_Root_Password="lnmp.org" InstallInnodb="y" PHPSelect="5" SelectMalloc="1" ./install.sh lnmp
|
Screen
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
screen -S t1
ctrl+a d
screen -r t1
|
Rclone
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
| yum -y update
yum install fuse fuse-devel -y curl https://rclone.org/install.sh | sudo bash
rclone config
rclone config file
systemctl enable rclone
systemctl restart rclone
systemctl stop rclone
systemctl status rclone
df -h
fusermount -qzu LocalFolder
/usr/bin/rclone mount googleDrive:/test /home/00 \ --umask 0000 \ --default-permissions \ --allow-non-empty \ --allow-other \ --buffer-size 32M \ --dir-cache-time 12h \ --vfs-read-chunk-size 64M \ --vfs-read-chunk-size-limit 1G
|
虚拟内存
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh
|
多媒体
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
yum install https://github.com/MediaBrowser/Emby.Releases/releases/download/4.4.0.40/emby-server-rpm_4.4.0.40_x86_64.rpm
/usr/sbin/service emby-server restart /usr/sbin/service emby-server start /usr/sbin/service emby-server status /usr/sbin/service emby-server stop
yum install https://downloads.plex.tv/plex-media-server-new/1.18.9.2578-513b381af/redhat/plexmediaserver-1.18.9.2578-513b381af.x86_64.rpm
systemctl enable plexmediaserver.service systemctl start plexmediaserver.service
systemctl status plexmediaserver
service plexmediaserver start service plexmediaserver stop service plexmediaserver restart
|
Nginx
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
| yum install nginx
yum remove nginx
sudo systemctl start nginx
sudo systemctl status nginx
nginx -t
sudo systemctl enable nginx
sudo systemctl disable nginx
sudo systemctl stop nginx
sudo systemctl restart nginx
sudo systemctl reload nginx
autoindex on; autoindex_exact_size off; autoindex_localtime on;
ps -ef | grep nginx
sudo systemctl reload nginx
|
Caddy
1 2 3 4 5 6 7 8 9 10 11
|
sudo systemctl start caddy.service
sudo systemctl restart caddy.service
sudo systemctl stop caddy.service
sudo systemctl status caddy.service
sudo systemctl enable caddy.service
|
Caddy配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
| # https://caddyserver.com/docs/ # 配置文件路径 /etc/caddy/Caddyfile # 开启目录浏览,gzip down.nobige.cn{ root /var/www/download gzip browse }
railgun.moe { gzip log /var/log/caddy/railgun_moe.log tls lengz@lengzzz.com root /var/www/ header /api { Access-Control-Allow-Origin * Access-Control-Allow-Methods "GET, POST, OPTIONS" -Server } fastcgi / 127.0.0.1:9000 php { index index.php } rewrite { to {path} {path}/ /index.php?{query} } } lengzzz.com { tls lengz@lengzzz.com log /var/log/caddy/lengzzz_com.log redir / https://railgun.moe/{uri} 301 }
|
yum源
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
| cd /etc/yum.repos.d/ mv CentOS-Base.repo CentOS-Base.repo_bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS7-Base-163.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS6-Base-163.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.163.com/.help/CentOS5-Base-163.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo https://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=3
wget -O /etc/yum.repos.d/CentOS-Base.repo https://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=2
wget -O /etc/yum.repos.d/CentOS-Base.repo https://lug.ustc.edu.cn/wiki/_export/code/mirrors/help/centos?codeblock=1
epel源: yum -y install epel-release
sudo yum clean all
sudo yum makecache
|
神奇的脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| bash <(curl -s -L https://git.io/v2ray.sh)
wget -N --no-check-certificate https://raw.githubusercontent.com/ToyoDAdoubi/doubi/master/ssr.sh && chmod +x ssr.sh && bash ssr.sh
wget -N --no-check-certificate -q -O install.sh "https://raw.githubusercontent.com/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh
wget --no-check-certificate https://github.com/tcp-nanqinlang/general/releases/download/3.4.2.1/tcp_nanqinlang-fool-1.3.0.sh bash tcp_nanqinlang-fool-1.3.0.sh
wget --no-check-certificate https://raw.githubusercontent.com/tcp-nanqinlang/general/master/General/CentOS/bash/tcp_nanqinlang-1.3.2.sh bash tcp_nanqinlang-1.3.2.sh
shutdown -r now
mkdir /home/mtproxy && cd /home/mtproxy curl -s -o mtproxy.sh https://raw.githubusercontent.com/ellermister/mtproxy/master/mtproxy.sh && chmod +x mtproxy.sh && bash mtproxy.sh
|
端口查询
1 2 3
| netstat -ntlp //查看当前所有tcp端口 netstat -ntulp | grep 80 //查看所有80端口使用情况 netstat -ntulp | grep 3306 //查看所有3306端口使用情况
|
方法
nginx[宝塔]开启目录浏览模式(nginx autoindex)
在网站 设置 伪静态里边设置如下
1 2 3
| autoindex on; autoindex_exact_size off; autoindex_localtime on;
|
端口映射
Xshell

putty

mount的基本用法
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
|
错误
-bash: wget: command not found
解决:yum -y install wget
Try ‘chmod –help’ for more information.
解决:chmod +x xx.sh
或是bash xx.sh
None of the supported tools for extracting zip archives (unzip 7z busybox) were found. Please install one of them and try agai
解决:yum install -y unzip
The nameserver prefix is invalid.
解决:只填NS Prefix前缀,不填.com域名之类,随意填写一些任意单词字母
umount 时出现的 “Device is busy”
umount, 老是提示:device is busy, 服务又不能停止的。
解决:用”umount -fl”解决
mount error(13): Permission denied
1 2 3 4
| mount.cifs //192.168.123.13/dwonload /home/download/ --verbose -o username=root,password=root,iocharset=utf8,uid=0,gid=0
mount.cifs //192.168.123.13/dwonload /home/download/ --verbose -o username=root,password=root,sec=ntlmssp,iocharset=utf8,uid=0,gid=0
|
-bash: netstat: command not found
1
| yum install -y net-tools
|
No package nginx available.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
| mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-8.repo
yum makecache
yum -y install epel-release
yum -y install nginx
|
参考