Configuring the Local Yum Source and the Installation Tool
Configuring a Local Yum Source
Configure the local source if the server cannot obtain dependencies from the Internet using yum commands.
- Back up the original Yum source configuration files of the system.
1mv /etc/yum.repos.d /etc/yum.repos.d-bak
- Create the /etc/yum.repos.d directory for the new Yum source.
1mkdir /etc/yum.repos.d - Switch to the directory created.
1cd /etc/yum.repos.d
- Create a file named local.repo and edit it.
- Create a file named local.repo.
1vim local.repo - Press i to enter the insert mode and add the following content to the local.repo file:
[local] name=local.repo baseurl=file:///mnt enabled=1 gpgcheck=0
The file is edited as follows:
The file path specified by baseurl indicates the directory to which the image is mounted, that is, the /mnt directory.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Create a file named local.repo.
- Make the local source take effect.
1yum makecache
Installing the Tool
Install the tools that need to be used in the subsequent steps:
1
|
yum -y install git wget |
Parent topic: Constructing a MySQL Docker Image