配置Yum仓库的步骤如下:
mount /dev/cdrom /mnt
mkdir /mnt/centos7.5
mount /opt/CentOS-7-x86_64-DVD-1611.iso /mnt/centos7.5
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
CentOS.Base.repo
配置文件:cd /etc/yum.repos.d/
vim CentOS.Base.repo
[centos7.5]
name=centos7.5
baseurl=file:///mnt/centos7.5
enabled=1
gpgcheck=0
gpgkey=file:///mnt/centos7.5/RPM-GPG-KEY-CentOS-7
yum clean all
yum makecache
yum repolist
cd /etc/yum.repos.d/
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum install -y cowsay
cowsay "Goodbye 2023, hello 2024!"
在一台服务器上配置Yum源
使用httpd服务让其他服务器访问
yum install -y httpd
systemctl start httpd
systemctl enable httpd
以上是配置Yum仓库的基本步骤,具体操作可能会因不同的Linux发行版和具体需求而有所差异。