The local area network is used to build a local lab environment, which is not convenient for downloading software from the network. Therefore, you need to build a local software warehouse to easily install yum. Of course, the dependency between software Packages can be well handled. If you are familiar with the rpm installation method of Linux, you can install the software by using rpm. You can directly go to the Packages directory of the mounted disc to install the rpm.
[Yum installation method]
Insert the red hat system installation disc
Virtual Machine environment:
Method 1: There is a small CD icon in the lower right corner of the page. Click Settings. In settings, find the CD location in the local path and click OK;
Method 2: on the task bar of VMware Workstation, click "virtual machine" ---> "removable device" ---> "CD/DVD" --- "set ", find the disc location in the local path in the settings, and confirm it. The method is the same as above;
Real machine environment:
Insert the installation disc directly;
2. Attach the CD to a local device.
[Email protected]/] # mount/dev/sr0/mnt
3. Compile the rhel6.repo configuration file to build a repository.
Vim/etc/yum. repos. d/rhel6.repo
[Base] name = red hatbaseurl = file: // # attach a local disk # = ftp: // use ftp to attach a disk # = http: // use httpd to Mount enabled = 1 gpgcheck = 1 gpgcheck = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
3. Install software
Yum-y install software name
Yum-y remove software name
[RPM installation method]
Installation: complete rpm-ivh package name
Uninstall: rpm-e package name
For example:
Install ftp
[[Email protected] Packages] # rpm-ivh vsftpd-2.2.2-11.el6.x86_64.rpm
Uninstall ftp
[[Email protected] Packages] # rpm-e vsftpd
View software status
[[Email protected] Packages] # rpm-qa vsftpd
If no content is entered, the software is not installed.
This article from "day up" blog, please be sure to keep this source http://liyasong.blog.51cto.com/3096629/1573080
Yum builds a local repository and installs software