命令记录

本文详细介绍了如何配置 CentOS 7 的 163 镜像源,包括 base、updates 和 extras 仓库的设置,以实现更快速稳定的软件包更新与安装。此外,还提供了系统更新、EPEL 仓库安装、OpenVPN 配置与运行、静态文件收集等操作步骤。

设置/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/releaseverPlus163.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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值