Yum repository set up remote (FTP service)

Experimental environment: two centos7 virtual machine.

experiment procedure:

First, the configuration server, the local mirror mount, mounting the FTP service ( FTP service default path: / var / FTP ), to create the site, the image can be copied to the source centos7 /, create directory expansion / other storage unofficial (present dependency) RPM packet groups, using the command createrepo

[Root @ server ~] # mount / dev / sr0 / mnt / mount the mirror to the local / mnt in                        

[Root @ server var] # yum install vsftpd -y install the FTP service                                       

[Root @ server ftp] # mkdir centos7 create a directory as a remote yum repository source

[Root @ server ftp] # cp -rf / mnt / * centos7 / & copy the image to the source directory, run in the background      

[Root @ server ftp] # mkdir other to create the extended directory                                      

[Root @ server ftp] # createrepo -g / mnt / repodata / repomd.xml other / data warehouse built using createrepo command file      


image.png

image.png

image.png

image.png

image.png

Second, turn on FTP service (named vsftps services). Turn off the firewall, turn off security enhancements, ensure that the client can successfully access.

[Root @ server ~] # systemctl start vsftpd FTP service open              

[Root @ server ~] # systemctl stop firewalld.service turn off the firewall                 

[Root @ server ~] # setenforce 0 close security enhancements 

image.png

Third, using the client to access the service machine, first install the FTP service, and to access servers, remote access success shows that you can use yun warehouse

[Root @ client ~] # yum install ftp -y install ftp service

[Root @ client ~] # ftp 192.168.195.128 using ftp service access service machine

image.png

image.png

Fourth, the local yum repository make a backup, move to the new backup directory (by default because the system reads the official default directory yum.reops.d, if it moved elsewhere, is read when yum install to install and use less, not installation), remove the local yum repository

[Root @ client ~] # cd /etc/yum.repos.d/ switching to the local repository configuration file directory yum             

[Root @ client yum.repos.d] # mkdir bak create a new backup directory                                       

[Root @ client yum.repos.d] # mv * .repo bak / warehouse department will move local yum configuration files to the backup directory   

[Root @ client yum.repos.d] # yum clean all yum repository cache clearing                                      

image.png

image.png

Fifth, edit the configuration file specifies the location of the remote yum repository for the client (the key files in the kiosk / centos7 catalog, can be copied)

[Root @ client yum.repos.d] # vim sentos7.repo edit the configuration file                      

image.png

image.png

Sixth, test whether the normal use remote yum repository

root @ client yum.repos.d] # yum install httpd -y install httpd service test                  

image.png

Seven, yum repository update (can also be updated on the client-service machines):

[Root @ client yum.repos.d] # yum update update package and update software and system kernel

[Root @ client yum.repos.d] # yum upgrade package only updates                               

[Root @ server other] # yum upgrade the service machine update yum repository                  

image.png



Remote yum repository set up is complete.

Guess you like

Origin blog.51cto.com/14475876/2436624