A problem has been encountered while installing the test environment, there is no file or folder in/ETC/YUM/REPOS.D and the Yum source cannot be updated.
Workaround:
(first, configure the network yum source)
1. First create a Yum.repo in the/etc/yum/repos.d/directory (name is also OK, the suffix is. Repo on the line) file.
Vim/etc/yum.repos.d/yum.repo
2. Open the file to add the following content (.... No need to add):
[Server]
Name=server ......... Name of the server
Baseurl= your yum source address ..... file address of the Yum Library
Enable=1 ..... Apply this server
Gpgcheck=0 ........ Turn off validation
An address is recommended here: http://mirrors.ustc.edu.cn/centos/5/updates/$basearch/,
[Server]
Name=server ......... Name of the server
Baseurl=http://mirrors.ustc.edu.cn/centos/5/updates/$basearch/..... file address of the Yum Library
Enable=1 ..... Apply this server
Gpgcheck=0 ........ Turn off validation
If the file cannot be saved, assign permissions
After saving, enter the Yum list test and find it available.
(second, configure local Yum source)1. Create mount point/mnt/cdrom
[Email protected]]# mkdir(Create a new subdirectory) /mnt/cdrom
[[Email protected]]# mount/dev/sr0/mnt/cdrom Mount/dev/cdrom to disc
Mount:block device(device) /dev/cdrom is write-protected, mounting read-only (with this hint is successful)
2. Settings
[Server]
Name=server ......... Name of the server
baseurl=file:///mnt/cdrom/. The file address of the Yum Library
Enable=1 ..... Apply this server
Gpgcheck=0 ........ Turn off validation
Test Pass
ADD:
Profile Description:
[] In the warehouse name, if the file already exists, the default can be. Manual input allows you to enter any name
Name Warehouse description, any can
BaseURL is the Yum source address, because FTP is configured here, it can be http,file, etc.
Enabled to enable this repository, 1 for use, 0 for disable
Gpgcheck whether to check the GPG signature (to verify that the package to be installed is Redhat official)
Linux (ubuntu14.04) Yum source installation