What?
Yum is a way to install software on a Linux system.
Why
Yum installs software that automatically considers the dependencies of the package, does not require a manual installation of the required dependencies, is more convenient to use than RPM, and also enables a large number of software installation deployments, so we learn how to deploy and use the Yum repositories.
where
The Yum Software warehouse is divided into three ways
Local services, file:///
http service, / http
FTP Service, ftp://
How?
The Yum server is used to provide packages ( rpm package), as well as the need to provide warehouse data ( Repodata ), which collects all rpm the packet header information.
RHEL6.5 and above installation CD has already provided the warehouse data, so it is only possible to copy the contents of the disc to the specified directory.
1, mount the disc image to/media
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/82/DF/wKiom1djayix1NmOAABZzEDxirg355.jpg "title=" 1.jpg " alt= "Wkiom1djayix1nmoaabzzedxirg355.jpg"/>
2. Delete the existing Yum configuration file
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/82/DE/wKioL1djbIPCKtTPAAAivq9Zmu4161.jpg "title=" 2.jpg " alt= "Wkiol1djbipckttpaaaivq9zmu4161.jpg"/>
3, create a new Yum profile//name customization, but end with. Repo
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/82/DF/wKiom1dja_viBGCWAAAnycUMvis719.jpg "title=" 3.jpg " alt= "Wkiom1dja_vibgcwaaanycumvis719.jpg"/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/82/E0/wKiom1djc_zjgbkyAACeArBwAEU220.jpg "title=" 4.jpg " alt= "Wkiom1djc_zjgbkyaacearbwaeu220.jpg"/>
4, test with Yum Update command
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/82/DE/wKioL1djdbLDooLTAAEEI4JmaNs482.jpg "title=" 5.jpg " alt= "Wkiol1djdbldooltaaeei4jmans482.jpg"/>
5, install software using yum-y install software name
One, the configuration of the Yum warehouse side
1. Install VSFTPD on the Yum Warehouse server
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M01/82/DF/wKioL1djkW-SuNXJAAEcd4PH8vg256.jpg "title=" 6.jpg " alt= "Wkiol1djkw-sunxjaaecd4ph8vg256.jpg"/>
2, create a directory in/var/ftp/to store the warehouse source
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/82/DF/wKioL1djkiXToV4tAABGGeUbIBA251.jpg "title=" 7.jpg " alt= "Wkiol1djkixtov4taabggeubiba251.jpg"/>
3. Use the Createrepo tool to generate warehouse data files
Use command: Createrepo--database /var/ftp/other (software storage location)
Since rhel6.5 already contains data files, it is not necessary to create a separate
4, add Firewall rule
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/82/E1/wKiom1djlRTipHl-AAB_IrgwDw0617.jpg "title=" 8.jpg " alt= "Wkiom1djlrtiphl-aab_irgwdw0617.jpg"/>
Second, the Yum client operation
1, install the FTP tool on the Yum client
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M01/82/E0/wKioL1djl37R-sebAAD30acXTcs191.jpg "title=" 9.jpg " alt= "Wkiol1djl37r-sebaad30acxtcs191.jpg"/>
Attention! FTP connection server will error, as follows
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/82/E1/wKiom1djl0bBHmcjAAA3WDdMVtE231.jpg "title=" 10.jpg "alt=" Wkiom1djl0bbhmcjaaa3wddmvte231.jpg "/>
This issue is caused by the server's firewall blocking the FTP passive connection
Passive connection: PASV connection means that the client through the FTP port number and FTP server to establish a link, when the need to transfer data, the server will be on the link through the PASV command to open a port, tell the client can connect through this port, transfer files, Firewall settings are one more step.
Workaround: Modify the VSFTPD configuration file and set up the firewall
650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M00/82/E1/wKiom1djmV7zPsxBAAAdLxO4flQ734.jpg "title=" 12.jpg "alt=" Wkiom1djmv7zpsxbaaadlxo4flq734.jpg "/>
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M02/82/E1/wKiom1djmPyC33kyAAAkyCjlqr8167.jpg "title=" 11.jpg "alt=" Wkiom1djmpyc33kyaaakycjlqr8167.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/82/E1/wKiom1djmf7QPE49AACDM7QVU2g448.jpg "title=" 13.jpg "alt=" Wkiom1djmf7qpe49aacdm7qvu2g448.jpg "/>
2. Delete the previous RPM file and create a new
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/E0/wKioL1djnqCxNj09AABEUHz9Xxc536.jpg "title=" 14.jpg "alt=" Wkiol1djnqcxnj09aabeuhz9xxc536.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/82/E1/wKiom1djnbqhBuwxAABAXvoAHKg111.jpg "title=" 15.jpg "alt=" Wkiom1djnbqhbuwxaabaxvoahkg111.jpg "/>
3, Test complete
One, the configuration of the Yum warehouse side
1. Install httpd on the Yum Warehouse server
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M00/82/E1/wKioL1djoESS2Bk6AAEPsP92qEI555.jpg "title=" 16.jpg "alt=" Wkiol1djoess2bk6aaepsp92qei555.jpg "/>
2, create a directory in/var/www/to store the warehouse source
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/E1/wKioL1djoDSCFVhbAABFNzdtTNQ985.jpg "title=" 17.jpg "alt=" Wkiol1djodscfvhbaabfnzdttnq985.jpg "/>
3. Modify the httpd configuration file to change the DocumentRoot to "/var/www"
650) this.width=650; "src=" http://s5.51cto.com/wyfs02/M02/82/E2/wKiom1djpvLTUrObAAAmYUTfUvw171.jpg "title=" 21.jpg "alt=" Wkiom1djpvlturobaaamyutfuvw171.jpg "/>
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/82/E2/wKiom1djpv2wMk34AAAclb0DDy4408.jpg "title=" 20.jpg "alt=" Wkiom1djpv2wmk34aaaclb0ddy4408.jpg "/>
4. Start the HTTPD service and add firewall rules
650) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/82/E2/wKiom1djoKvyRm18AAEjd7ShP5Y479.jpg "title=" 18.jpg "alt=" Wkiom1djokvyrm18aaejd7shp5y479.jpg "/>
Two, the Yum client configuration
1. Delete the previous RPM file and create a new
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/E0/wKioL1djnqCxNj09AABEUHz9Xxc536.jpg "title=" 14.jpg "alt=" Wkiol1djnqcxnj09aabeuhz9xxc536.jpg "/>
650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/82/E1/wKioL1djow2DJF8eAABC-PtKAk4957.jpg "title=" 19.jpg "alt=" Wkiol1djow2djf8eaabc-ptkak4957.jpg "/>
2, test success with Yum repolist command
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/82/E1/wKioL1djqG-Q2RhYAACWs6RDdg0253.jpg "title=" 22.jpg "alt=" Wkiol1djqg-q2rhyaacws6rddg0253.jpg "/>
This article is from the "New Start" blog, so be sure to keep this source http://yuanshuai.blog.51cto.com/10539781/1790333
Yum Software Warehousing Services