$contentdir -> pub/rocky(cat /etc/yum/vars/contentdir)
$releasever -> 8(6/7/8/9)
$basearch -> x86_64(uname -m)
1## AlmaLinux 是RHEL的一个1:1二进制兼容的分支
2sed -e 's|^mirrorlist=|#mirrorlist=|g' \
3 -e 's|repo.almalinux.org/almalinux|mirrors.xinac.net/almalinux|g' \
4 -e 's|^# baseurl|baseurl|g' \
5 -i.bak \
6 /etc/yum.repos.d/[Aa]lmalinux*.repo
xxxxxxxxxx
1## RockyLinux 是CentOS的一个完全兼容替代品
2sed -e 's|^mirrorlist=|#mirrorlist=|g' \
3 -e 's|dl.rockylinux.org/$contentdir|mirrors.xinac.net/rocky|g' \
4 -e 's|^#baseurl|baseurl|g' \
5 -i.bak \
6 /etc/yum.repos.d/[Rr]ocky*.repo
xxxxxxxxxx
1## openEuler 是一个开源免费的Linux发行版系统
2sed -e 's|^mirrorlist=|#mirrorlist=|g' \
3 -e 's|repo.openeuler.org|mirrors.xinac.net/openeuler|g' \
4 -e 's|^#baseurl|baseurl|g' \
5 -i.bak \
6 /etc/yum.repos.d/openEuler*.repo
x
1## AnolisOS 是OpenAnolis社区推出的发行版,100%兼容CentOS 8软件生态
2sed -e 's|^mirrorlist=|#mirrorlist=|g' \
3 -e 's|mirrors.openanolis.cn/anolis|mirrors.xinac.net/anolis|g' \
4 -e 's|^#baseurl|baseurl|g' \
5 -i.bak \
6 /etc/yum.repos.d/AnolisOS*.repo
xxxxxxxxxx
71## 仅提供x86_64架构的7.9和8.5版本
2sed -e 's|^mirrorlist=|#mirrorlist=|g' \
3 -e 's|mirror.centos.org/centos|mirrors.xinac.net/centos|g' \
4 -e 's|mirror.centos.org/$contentdir|mirrors.xinac.net/centos|g' \
5 -e 's|^#baseurl|baseurl|g' \
6 -i.bak \
7 /etc/yum.repos.d/CentOS-*.repo
xxxxxxxxxx
71## 仅提供x86_64架构之外的7.9和8.5版本
2sed -e 's|^mirrorlist=|#mirrorlist=|g' \
3 -e 's|mirror.centos.org/altarch|mirrors.xinac.net/centos-altarch|g' \
4 -e 's|mirror.centos.org/$contentdir|mirrors.xinac.net/centos-altarch|g' \
5 -e 's|^#baseurl|baseurl|g' \
6 -i.bak \
7 /etc/yum.repos.d/CentOS-*.repo
xxxxxxxxxx
101## 提供所有历史版本,6/7/8都可用
2#minorver=6.10
3#minorver=7.9.2009
4minorver=8.5.2111
5sed -e 's|^mirrorlist=|#mirrorlist=|g' \
6 -e 's|mirror.centos.org/centos/\$releasever|mirrors.xinac.net/centos-vault/$minorver|g' \
7 -e 's|mirror.centos.org/\$contentdir/\$releasever|mirrors.xinac.net/centos-vault/$minorver|g' \
8 -e 's|^#baseurl|baseurl|g' \
9 -i.bak \
10 /etc/yum.repos.d/CentOS-*.repo
xxxxxxxxxx
21# sudo apt install apt-transport-https ca-certificates
2sudo sed -i "s|deb.debian.org/debian|mirrors.xinac.net/debian|g" /etc/apt/sources.list
xxxxxxxxxx
21# sudo apt install apt-transport-https ca-certificates
2sudo sed -i 's@//.*archive.ubuntu.com@//mirrors.xinac.net@g' /etc/apt/sources.list
xxxxxxxxxx
1# vim /etc/yum.repos.d/mariadb.repo
2[mariadb]
3name=MariaDB
4baseurl=https://mirrors.xinac.net/mariadb/yum/10.3/centos7-amd64/
5enabled=1
6gpgcheck=1
7gpgkey=https://mirrors.xinac.net/mariadb/yum/RPM-GPG-KEY-MariaDB
8module_hotfixes=1
9
10## or
11yum.mariadb.org -> mirrors.xinac.net/mariadb/yum
xxxxxxxxxx
101# vim /etc/yum.repos.d/mysql57.repo
2[mysql57-community]
3name=MySQL 5.7 Community Server
4baseurl=https://mirrors.xinac.net/mysql/yum/mysql-5.7-community-el7-$basearch/
5enabled=1
6gpgcheck=1
7gpgkey=https://mirrors.xinac.net/mysql-repo/RPM-GPG-KEY-mysql-2022
8
9## import gpgkey
10rpm --import https://mirrors.xinac.net/mysql-repo/RPM-GPG-KEY-mysql-2022
x
1# repo
2yum install yum-utils -y
3yum-config-manager --add-repo https://mirrors.xinac.net/docker-ce/linux/centos/docker-ce.repo
4
5sed -i 's+download.docker.com+mirrors.xinac.net/docker-ce+g' \
6 -i.bak \
7 /etc/yum.repos.d/docker-ce.repo
8
9## install docker-ce
10yum install docker-ce docker-ce-cli containerd.io -y
11
12
13### 【国产操作系统注意需要修改配置文件后再安装 -> 见本页面底部】
xxxxxxxxxx
81## docker镜像加速
2tee /etc/docker/daemon.json <<-'EOF'
3{
4 "registry-mirrors": ["https://mirrors.xinac.net"]
5}
6EOF
7
8# systemctl restart docker
161# 手动配置
2[epel]
3name=Extra Packages for Enterprise Linux $releasever - $basearch
4baseurl=https://mirrors.xinac.net/epel/8/Everything/$basearch
5enabled=1
6gpgcheck=0
7gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-8
8
9## or
10yum install epel-release -y
11sed -e 's!^metalink=!#metalink=!g' \
12 -e 's!^#baseurl=!baseurl=!g' \
13 -e 's!download\.fedoraproject\.org/pub/epel!mirrors.xinac.net/epel!g' \
14 -e 's!download\.example/pub/epel!mirrors.xinac.net/epel!g' \
15 -i.bak \
16 /etc/yum.repos.d/epel*.repo
xxxxxxxxxx
71https://mirrors.xinac.net/simple
2https://mirrors.xinac.net/pypi
3https://mirrors.xinac.net/pypi/simple
4https://mirrors.xinac.net/pypi/web/simple
5
6## Usage
7pip install -r requirements.txt -i https://mirrors.xinac.net/pypi/simple --trusted-host mirrors.xinac.net
x
1# vim /etc/yum.repos.d/nginx.repo
2[nginx-stable]
3name=nginx stable repo
4baseurl=http://mirrors.xinac.net/nginx/packages/centos/$releasever/$basearch/
5gpgcheck=0
6enabled=1
7gpgkey=https://mirrors.xinac.net/nginx/keys/nginx_signing.key
8module_hotfixes=true
9
10## or
11yum-config-manager --add-repo https://download.xinac.net/repos/yum/nginx.repo
12sed -i 's+nginx.org+mirrors.xinac.net/nginx+g' \
13 -i.bak \
14 /etc/yum.repos.d/nginx.repo
15
16
17### 【国产操作系统注意需要修改配置文件后再安装 -> 见本页面底部】
xxxxxxxxxx
1## Elasticstack 主要包含Elasticsearch、Kibana、Beats 和 Logstash四部分
2## centos
3# vim /etc/yum.repos.d/elasticsearch.repo
4[elasticsearch]
5name=Elasticsearch repository for 7.x packages
6baseurl=https://mirrors.xinac.net/elasticstack/7.x/yum
7gpgcheck=1
8gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
9enabled=1
10autorefresh=1
11type=rpm-md
12
13## or
14sed -i 's+artifacts.elastic.co/packages+mirrors.xinac.net/elasticstack+g' \
15 -i.bak \
16 /etc/yum.repos.d/elasticsearch.repo
17## import gpgkey
18rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch
19
20
21## debian
22wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg
23echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://mirrors.xinac.net/elasticstack/7.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-7.x.list
24sudo apt-get install elasticsearch
x
1### openEuler/AnolisOS 等系统建议执行以下命令后再安装
2sed -e 's|$releasever|8|g' \
3 -i.bak \
4 /etc/yum.repos.d/docker-ce.repo \
5 /etc/yum.repos.d/nginx.repo