Create a local software repository 1. mkdir/media/cdrom2, and load the rhel6 disc to/media/cdrommount/dev/cdrom/media/cdrom * iso, after the system restarts, you need to reload the CD or iso file mount-oloop/root/xxxx. iso/media/c...
Build a local software repository
1. mkdir/media/cdrom
2. load the rhel6 disc to/media/cdrom.
Mount/dev/cdrom/media/cdrom
* Iso loading command. after the system restarts, you need to reload the CD or iso file.
Mount-o loop/root/xxxx. iso/media/cdrom
3. install createrepo
Rpm-ivh/media/cdrom/Packages/createrepo-[press the tab key] deltarpm-[press the tab key] python-deltarpm-[press the tab key]
4. create a repository using cd/media
Createrepo.
5. add the local source for yum.
Cd/etc/yum. repos. d
Rm-rf *
Vi my. repo
The content is as follows:
[My]
Enable = 1
Baseurl = file: // media
Save and exit
Vi/etc/yum. conf
Modify
Gpgcheck = 1
Change
Gpgcheck = 0
----------------
Yum list lists software for all repositories
Yum install software name install software
The yum search name is searched in the repository by the software package name.
Yum localinstall xxxxx. rpm Package, install the downloaded rpm Package software
Yum group list software groups
Yum groupinstall group name install a group of software
* Yum installation of local software cannot be packaged. it is best not to use it unless necessary.
Rpm-ivh -- nodeps -- force xxxxx. rpm for forced installation (not necessarily usable, only can be installed)
Delete software
Rpm-e software name
Rpm-qa view installed software
This article is from the blog "Wang Dao-Xu Zhongzhi (MakeWong )".