Installation and introduction of yum
First, the introduction of yum command
Yum (Yellow dog Updater, Modified) is a Shell front-end package manager in Fedora and RedHat as well as in SUSE.
Based on RPM package management, RPM packages can be downloaded and installed automatically from designated servers, dependencies can be automatically handled, and all dependent software packages can be installed at once without having to download and install them again and again.
Yum provides commands to find, install, and delete one, a group, or even all of the software packages, and the commands are concise and easy to remember.
Second, the installation example of yum warehouse.
The environment is configured in the virtual machine.
[root@localhost /] # mount / dev/cdrom / media/
Mount: / dev/sr0 write protection, which will be mounted as read-only
[root@localhost /] # ls / etc/yum.repos.d/
CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Vault.repo
CentOS-CR.repo CentOS-fasttrack.repo CentOS-Sources.repo
[root@localhost /] # yum clean all cleans up previous yum files or rm-rf / etc/yum.repos.d/*
Loaded plug-ins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Cleaning software source: base extras updates
Cleaning up everything
Cleaning up list of fastest mirrors
[root@localhost /] # vim / etc/yum.repos.d/centos7.repo
[base]
Name=good
Baseurl= file:///media
Enabled=1
Gpgcheck=0
[root@localhost /] # yum-y install httpd mod_ssl