备忘录

备忘录

本文提供了一系列常用的服务器管理脚本和命令,涵盖了面板安装、代理工具部署、网络优化、Git 操作、博客管理以及服务器测速等内容。

Ssh连接服务器

bash
ssh -i 密钥路径 <用户名>@<ip>
sudo -i  # 切换到root

哪吒面板

bash
curl -L https://raw.githubusercontent.com/naiba/nezha/master/script/install.sh  -o nezha.sh && chmod +x nezha.sh && sudo ./nezha.sh

宝塔面板

bash
if [ -f /usr/bin/curl ];then curl -sSO https://download.bt.cn/install/install_panel.sh;else wget -O install_panel.sh https://download.bt.cn/install/install_panel.sh;fi;bash install_panel.sh ed8484bec

1Panel

bash
curl -sSL https://resource.1panel.pro/quick_start.sh -o quick_start.sh && bash quick_start.sh

Xrayr

bash
#官方
bash <(curl -Ls https://raw.githubusercontent.com/XrayR-project/XrayR-release/master/install.sh)

#一键对接
wget -N https://raw.githubusercontent.com/missovo/XrayR-script/main/install.sh && bash install.sh)

#OR
bash <(curl -Ls https://raw.githubusercontent.com/missovo/XrayR-script/main/install.sh)

Bbr

bash
bash <(curl -Lso- https://git.io/kernel.sh)

X-ui

bash
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)

Git

bash
#配置同户名邮箱
git config --global user.name “xxx”
git config --global user.email “xxx@qq.com”

#克隆远程仓库
git clone https://github.com/xxxx.git

#添加当前目录文件
git add .

#提交说明
git commit -m '说明'

#更新到仓库
git push origin main

Hexo一键操作

bash
# 拉取仓库
git clone git@github.com:ghlsp/blog-admin.git 

# 安装依赖
cd
cd blog-admin
rm -rf node_modules && npm install --force
hexo s

# 更新当前仓库
git add .
git commit -m "更新"
git push

# 清除缓存并本地预览
cd
cd blog-admin
hexo cl
hexo s

# 更新仓库
cd 
cd blog-admin
hexo cl
git add .
git commit -m "更新版本号"
git push

服务器测速脚本

bash
bash <(curl -Lso- https://git.io/superbench)

Linux(使用 UFW 防火墙)

bash
# 完全禁用防火墙(清除规则且开机不启动)
sudo ufw disable

# 查看状态(显示 Status: inactive 即已关闭)
sudo ufw status

Linux(使用 firewalld 防火墙 - CentOS/RHEL)

bash
# 停止防火墙服务
sudo systemctl stop firewalld

# 禁止开机自启
sudo systemctl disable firewalld

# 查看状态(Active: inactive 即已关闭)
sudo systemctl status firewalld

文章配置

bash
---
title: 标题
description: 简介
date: 发布日期
updated: 修改日期
image: 头图
categories: [技术,生活,杂谈,开发,安全]
tags: [标签,标签]
references:
  - title: 引用自 xxx
    link: 引用链接
recommend: true #首页推荐
type: story #随笔 post #文章
---
新故事即将发生
小米纯手机端免解ROOT

评论区

评论加载中...