Yum FTP server based on local configuration

Service-Terminal


Environment are as follows

Vmware14
CentOS 7.6 192.168.20.81 server 192.168.20.81 client

Configuring source yum

mount /dev/cdrom /media
we /etc/yum.repo.d/local.repo
[media]
name=media
baseurl=file:///media
enabled=1
gpgcheck=0

2. Configure VSFTPD

yum install -y vsftpd
we /etc/vsftpd/vsftpd.conf
anonymous_enable=YES
anon_root=/media
systemctl start vsftpd
systemctl enable vsftpd

Client


1. Edit yum configuration file

mkdir /etc/yum.repos.d/default
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/default
we /etc/yum.repos.d/localyum.repo
[localyum]
name=localyum
baseurl=ftp://192.168.20.81
enabled=1
gpgcheck=0

2. Install Ftp Client

scp 192.168.20.81:/media/Packages/ftp-0.17-67.el7.x86_64.rpm ./
rpm -ivh ftp-0.17-67.el7.x86_64.rpm

3. Verify Yum

yum install -y telnet 
 

Possible exception handling


If an exception occurs, you can try to turn off the firewall revalidation
systemctl stop firewalld
setenforce 0

Guess you like

Origin www.cnblogs.com/plluoye/p/11362822.html