server
172.16.8.10

client172.16.8.11

 

 Server

1. 安装FTP

yum -y install vsftpd

2. 挂载 ISO,拷贝包


mountCentOS-7-x86_64-DVD-1503-01.iso  /mnt/cdrom/

cp -af /mnt/cdrom/var/ftp/pub/cdrom/

 

Client


3. 编辑repo文件:

vim /etc/yum.repos.d/CentOS-FTP.repo


[Ftp] 

name=FTP Yum 

baseurl=ftp://172.16.8.10/pub/cdrom

#baseurl=file:///var/www/yum7.1/cdrom

gpgcheck=0 

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 

enabled=1

 

4. 测试:

yum -y installmariadb

01-07 00:14