备份官方源
cd /etc/yum.repos.d
mkdir backup
mv ./CentOS-* ./backup/
使用腾讯源
在目录/etc/yum.repos.d下,创建 CentOS-Base.repo 文件
vi /etc/yum.repos.d/CentOS-Base.repo
写入如下内容
cd /etc/yum.repos.d
mkdir backup
mv ./CentOS-* ./backup/
在目录/etc/yum.repos.d下,创建 CentOS-Base.repo 文件
vi /etc/yum.repos.d/CentOS-Base.repo
写入如下内容
本文针对之前Centos7的安装方法,在Centos8下安装有些变化,故重新整理一遍新的安装方法。本文实际操作系统为:Centos8.5
centos8下的nginx版本比较新,直接安装即可
yum install -y nginx
通常安装remi源时会自动安装依赖epel源,也可手动安装
yum install https://mirrors.tuna.tsinghua.edu.cn/epel/epel-release-latest-8.noarch.rpm
vi /etc/yum.repos.d/google-chrome.repo
输入如下内容
[google-chrome]
name=google-chrome - \$basearch
baseurl=http://dl.google.com/linux/chrome/rpm/stable/\$basearch
enabled=1
gpgcheck=0
yum-config-manager --add-repo https://download.opensuse.org/repositories/home:/Alexander_Pozdnyakov/CentOS_7/
sudo rpm --import https://build.opensuse.org/projects/home:Alexander_Pozdnyakov/public_key
为了利用现有Nginx服务,本文采用手动搭建安装Trojan-go
(请在root用户下安装)
yum -y install socat
curl https://get.acme.sh | sh
出现:Install success!表示安装成功
source ~/.bashrc