As more and more Linux servers are installed on the Intranet, you must upload the installation disk to install software on each server. It is troublesome and time-consuming to configure the local yum service. You can install the yum service on a Linux server on the Intranet, and then other servers can directly modify the repo file to use the yum service. Configuration http://www.linuxidc.com/Linux/2013-08/88217.htmRe for local yum sources in RedHatLinux
As more and more Linux servers are installed on the Intranet, you must upload the installation disk to install software on each server. It is troublesome and time-consuming to configure the local yum service. You can install the yum service on a Linux server on the Intranet, and then other servers can directly modify the repo file to use the yum service.
Recommended reading:
Configuration http://www.linuxidc.com/Linux/2013-08/88217.htm for local yum sources in RedHat Linux
RedHat 6.2 Linux modify yum source free use CentOS source http://www.linuxidc.com/Linux/2013-07/87383.htm
Configure epel yum source http://www.linuxidc.com/Linux/2012-10/71850.htm
Redhat local yum source configuration http://www.linuxidc.com/Linux/2012-11/75127.htm
Yum profile description http://www.linuxidc.com/Linux/2013-04/83298.htm
Install yum http://www.linuxidc.com/Linux/2013-06/86535.htm in RedHat 6.1
YUM installation and cleaning http://www.linuxidc.com/Linux/2013-07/87163.htm
The installation procedure is as follows:
Linux environment 1. RHEL version
[Root @ localhost40 pub] # cat/etc/issue
Red Hat Enterprise Linux Server release 6.5 (Santiago)
2. kernel version
[Root @ localhost40 pub] # uname-
Linux localhost40.localdomain 2.6.32-431. el6.x86 _ 64
Build a local YUM1. upload the RHEL installation CD file to the Home directory named RHEL. ISO2. create directory/home/RHEL/# mkdir/home/RHEL/3. mounting the ISO file on the installation disc # mount-o loop/home/RHEL. ISO/home/RHEL/4. enter/etc/yum. repos. d/directory, back up the original repo file, create a new repo file, RHEL. repo
# Cd/etc/yum. repos. d/
# Mkdir bak/
# Cp * bak/
# Vi RHEL. repo
#############################
[Rhel6]
Name = rhel6
Baseurl = file: // home/RHEL
Enabled = 1
Gpgcheck = 0
#############################
5. Save RHEL. repo and execute
# Yum clean all
# Yum update
# Yum makecache
Install and configure the vsftpd service 1. Install the vsftpd service
Yum install vsftpd *
2. After the installation is complete, copy all the files in the/home/RHEL/directory to the/var/ftp/pub directory.
# Cd/home/RHEL
# Cp-rv */var/ftp/pub
3. Switch to the/var/ftp/pub directory.
Delete *. html
Delete CentOS/repodata/TRANS. TBL
# Cd/var/ftp/pub
# Rm-rf *. html
# Rm-rf repodata/TRANS. TBL
Install the createrepo tool to generate the YUM universal database 1. install createrepo # yum-y install createrepo
# Createrepo-g/var/ftp/pub/repodata/partition/var/ftp/pub/Note: The partition name may be different from each system here, find the comps-rhel6-Server.xml behind it. Restart vsftp and complete the configuration.
#/Etc/init. d/vsftpd restart
Or
# Service vsftpd restart
Client yum configuration 1. Enter the/etc/yum. repos. d/directory, back up the original repo file, create a new repo file, RHEL. repo
# Cd/etc/yum. repos. d/
# Mkdir bak/
# Cp * bak/
# Vi RHEL. repo
#############################
[Rhel6]
Name = rhel6
Baseurl = ftp: // 192.9.169.99/pub/
Enabled = 1
Gpgcheck = 0
#############################
2. Note that the above baseurl is the ftp address of the yum server just installed. After the installation is complete, run
# Yum clean all
# Yum update
# Yum makecache
Common yum commands 1. Installation
Yum install package install the specified installation package1
Yum localinstall package local installation package
2. update and upgrade
Yum update all updates
Yum update package update the specified package
Yum check-update check updatable programs
3. Search and display
Yum info Display installation package information
Yum list displays all installed and installable packages
Yum list Displays the installation status of the specified package
Yum search Search for software packages
4. delete a program
Yum remove | erase package1 delete a package
Yum stores the downloaded software package and header in the cache, but does not automatically delete it. If we think they occupy disk space, we can clear them using the yum clean command.
Yum clean headers clear header
Yum clean packages clear the downloaded rpm package
Yum clean all clear header and rpm package
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10
This article permanently updates the link address: Http://www.linuxidc.com/Linux/2014-07/104291.htm