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/cdrom3, install createreporpm-ivh/media/cdrom/Packages/
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