Linux (ubuntu14.04) yum source installation, ubuntu14.04yum
An error occurred while installing the test environment. The file or folder does not exist in/etc/yum/repos. d and the yum source cannot be updated.
Solution:
(1) configure the network yum source)
1. First, create a yum. repo file in the/etc/yum/repos. d/directory (the name can also be self-prepared, and the suffix is. repo.
Vim/etc/yum. repos. d/yum. repo
2. open the file and add the following content (no need to add ):
[Server]
Name = Server... name of the Server
Baseurl = the file address of your yum source address... yum Library
Enable = 1... apply this server
Gpgcheck = 0 ...... disable verification.
Here we recommend an address: http://mirrors.ustc.edu.cn/centos/5/updates/?basearch/, that is
[Server]
Name = Server... name of the Server
Baseurl = http://mirrors.ustc.edu.cn/centos/5/updates/?basearch/ ...... yum file address
Enable = 1... apply this server
Gpgcheck = 0 ...... disable verification.
If the file cannot be saved, assign the permission.
Save and enter yum list for test.
(2) configure the local yum source)1. Create a mount point/mnt/cdrom
[Root @ ccc] # mkdir (create a new subdirectory)/mnt/cdrom
[Root @ ccc] # mount/dev/sr0/mnt/cdrom mount/dev/cdrom to the CD
Mount: block device (device)/dev/cdrom is write-protected, mounting read-only (success if this prompt is displayed)
2. Set
[Server]
Name = Server... name of the Server
Baseurl = file: // The file address of the mnt/cdrom/... yum Library
Enable = 1... apply this server
Gpgcheck = 0 ...... disable verification.
Test passed
Add:
Configuration File Content Overview:
The repository name in [] is used. If the file already exists, the repository name is used by default. You can enter any name for manual input.
Name repository description, any
Baseurl is the YUM source address, because it is configured with FTP, HTTP, FILE, etc.
Enabled: whether to enable this repository. 1 indicates the repository is enabled, and 0 indicates the repository is disabled.
Gpgcheck whether to check the GPG signature (used to verify whether the package to be installed is officially REDHAT)