1)搭建Yun仓库,分为本地自建和网络源的
1、搭建本地yun源仓库
1、创建本地yum源的挂载目录
mkdir -p /mnt/data/ //创建挂载目录
mv /etc/yum.repos.d/* /etc/yum.repos.d_bak /备份yum源文件
rm /etc/yum.repos.d/*
vi /etc/yum.repos.d/local.repo
[centos7.6]
name=centos7.6-repo
baseurl=file:///mnt/data
enabled=1
gpgcheck=0
mount -o loop /yum/CentOS-7-x86_64-DVD-1708.iso /mnt/data/
yum clean all
yum makecache
yum list|grep telnet
yum install -y telnet
2、创建网络Yun源
yum install -y autofs
systemctl enable autofs --now
[root@node4 yum.repos.d]# cat /etc/yum.repos.d/internet.repo
[base]
name=base
baseurl=file:///misc/cd/centos
https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / B a s e O S / releasever/BaseOS/ releasever/BaseOS/basearch/os
https://mirrors.cloud.tencent.com/centos/ r e l e a s e v e r / B a s e O S / releasever/BaseOS/ releasever/BaseOS/basearch/os/
https://repo.huaweicloud.com/centos// r e l e a s e v e r / B a s e O S / releasever/BaseOS/ releasever/BaseOS/basearch/os/
gpgcheck=0
[AppStream]
name=AppStream
baseurl=file:///misc/cd/AppStream
https://repo.huaweicloud.com/centos/ r e l e a s e v e r / A p p S t r e a m / releasever/AppStream/ releasever/AppStream/basearch/os/
https://mirrors.tuna.tsinghua.edu.cn/centos/ r e l e a s e v e r / A p p S t r e a m / releasever/AppStream/ releasever/AppStream/basearch/os
https://mirrors.cloud.tencent.com/centos/ r e l e a s e v e r / A p p S t r e a m / releasever/AppStream/ releasever/AppStream/basearch/os/
gpgcheck=0
[epel]
name=EPEL
baseurl=http://mirrors.aliyun.com/epel/ r e l e a s e v e r / E v e r y t h i n g / releasever/Everything/ releasever/Everything/basearch
http://mirrors.huaweicloud.com/epel/ r e l e a s e v e r / E v e r y t h i n g / releasever/Everything/ releasever/Everything/basearch
gpgcheck=0
enabled=0
[extras]
name=extras
baseurl=https://mirrors.aliyun.com/centos/ r e l e a s e v e r / e x t r a s / releasever/extras/ releasever/extras/basearch/os
http://mirrors.huaweicloud.com/centos/ r e l e a s e v e r / e x t r a s / releasever/extras/ releasever/extras/basearch/os
gpgcheck=0
enabled=1
[root@node4 yum.repos.d]#
2、httpd的安装