设置/etc/yum.repos.d/CentOS7-Base-163.repo
CentOS-Base.repo
The mirror system uses the connecting IP address of the client and the
update status of each mirror to pick mirrors that are updated to and
geographically close to the client. You should use this for CentOS updates
unless you are manually picking other mirrors.
If the mirrorlist= does not work for you, as a fall back you can try the
remarked out baseurl= line instead.
[base]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 29: …Base - 163.com
#̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=os
baseurl…releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 32: …ates - 163.com
#̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=updates
ba…releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-KaTeX parse error: Expected 'EOF', got '#' at position 31: …tras - 163.com
#̲mirrorlist=http…releasever&arch=KaTeX parse error: Expected 'EOF', got '&' at position 9: basearch&̲repo=extras
bas…releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-releasever−Plus−163.combaseurl=http://mirrors.163.com/centos/releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/releasever−Plus−163.combaseurl=http://mirrors.163.com/centos/releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
同步文件
rsync -av asvm@10.22.2.119:/vmi/manager_git_bak /root/manager_git
sudo yum update -y
sudo yum install epel-release -y
sudo yum install -y openvpn wget
设置用户名密码
sudo vi /etc/openvpn/passwd
sudo vi /etc/openvpn/client.ovpn
运行
sudo openvpn
–daemon
–cd /etc/openvpn
–config client.ovpn
–auth-user-pass /etc/openvpn/passwd
–log-append /var/log/openvpn.log
设置忽略 Peer’s certificate issuer has been marked as not trusted by the user
sudo git config --global http.sslVerify false
sudo git clone -b 6.0-cas https://10.21.130.13/TSG-RD-VMI/manager.git
设置静态文件
sudo python manage.py collectstatic
python /vmi/manager/manage.py collectstatic --settings=web_portal.settings
python /vmi/manager/manage.py collectstatic --settings=web_console.settings
关闭openvpn
ps -ef|grep ‘<openvpn>’|grep -v grep|awk ‘{print $2}’ | xargs kill -9
本文详细介绍了如何配置 CentOS 7 的 163 镜像源,包括 base、updates 和 extras 仓库的设置,以实现更快速稳定的软件包更新与安装。此外,还提供了系统更新、EPEL 仓库安装、OpenVPN 配置与运行、静态文件收集等操作步骤。
7978

被折叠的 条评论
为什么被折叠?



