yum服务器

yum服务器 10.18.44.105

yum -y install vsftpd
systemctl start vsftpd
systemctl stop firewalld
setenforce 0
mount /dev/cdrom /var/ftp/centos7/7
yum install --downloadonly --downloaddir=/var/ftp/nginx nginx
createrepo /var/ftp/nginx
mount -o loop  镜像位置 /var/ftp/centos/7

客户机

vim centos7.repo
[centos7]
name=centos7
baseurl=ftp://10.18.44.105/centos7/$releasever/
gpgkey=ftp://10.18.44.105/centos7/$releasever/RPM-GPG-KEY-CentOS-$releasever
[centos7]
name=centos7
baseurl=ftp://10.18.44.105/centos7/7/
gpgkey=ftp://10.18.44.105/centos7/7/RPM-GPG-KEY-CentOS-7

vim nginx.repo
[nginx]
name=nginx
baseurl=ftp://10.18.44.105/nginx/
gpgkey=0

本地yum源

mount  /dev/cdrom  /mnt
vim base.repo
[base]
name=base
baseurl=file:///mnt/
gpgcheck=0
enabled=1

你可能感兴趣的:(yum服务器)