一键修复与安装脚本(各种linux系统修复与服务器环境安装脚本) One-click repair and installation scripts (various linux system repair and server environment installation scripts)
Go to file
2022-12-17 23:05:21 +08:00
back Rename ubuntu.txt to back/ubuntu.txt 2022-12-17 22:10:04 +08:00
modify_time.sh Update modify_time.sh 2022-12-17 22:31:05 +08:00
network.sh Update network.sh 2022-12-17 22:26:08 +08:00
package.sh Update package.sh 2022-12-17 22:31:26 +08:00
README.md Update README.md 2022-12-17 22:36:09 +08:00
resize_journal.sh Create resize_journal.sh 2022-12-17 23:05:21 +08:00
rust.sh Update rust.sh 2022-12-17 22:21:01 +08:00

一键修复脚本

一键尝试修复apt源

  • 支持系统Ubuntu 12+Debian 6+
  • 修复apt源broken损坏
  • 修复apt源锁死
  • 修复apt源公钥缺失
  • 修复替换系统可用的apt源列表国内用阿里源国外用官方源
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/package.sh -o package.sh && chmod +x package.sh && bash package.sh

一键尝试修复网络

  • 支持系统Ubuntu 18+Debian 8+centos 7+FedoraAlmalinux 8.5+
  • 尝试修复nameserver为google源或cloudflare源
  • 尝试修复为IP类型对应的网络优先级(默认IPV4类型纯V6类型再替换为IPV6类型)
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/network.sh -o network.sh && chmod +x network.sh && bash network.sh

一键尝试修复系统时间

  • 支持系统Ubuntu 18+Debian 8+centos 7+FedoraAlmalinux 8.5+
  • 检测修复本机系统时间如果相差超过300秒的合理范围则校准时间
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/modify_time.sh -o modify_time.sh && chmod +x modify_time.sh && bash modify_time.sh

一键环境安装脚本

一键安装rust环境

  • 支持系统Ubuntu 18+Debian 8+centos 7+FedoraAlmalinux 8.5+
curl -L https://raw.githubusercontent.com/spiritLHLS/one-click-installation-script/main/rust.sh -o rust.sh && chmod +x rust.sh && bash rust.sh 

部分手动命令

ubuntu缺失公钥

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 公钥

ubuntu更新源被锁

sudo rm -rf /var/cache/apt/archives/lock

https://itsfoss.com/fix-ubuntu-install-error/

debian缺失公钥

apt-get install debian-keyring debian-archive-keyring

centos换源

sudo cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
sudo sed -i 's/^mirrorlist=http/mirrorlist=https/' /etc/yum.repos.d/CentOS-Base.repo