How to build a local yum source and a yum Source
1. Download the source to the local device, such as zabbix.
[Root @ hadoop1 wyl] # wget-c-r-np https://repo.zabbix.com/zabbix/3.0/rhel/6/x86_64/
As shown in the following figure:
The directory structure is the same as that on the official website.
2. You can use proxy software agents such as Nginx and Apache. This time, you can use the Python SimpleHTTPServer proxy.
[Root @ hadoop1 wyl] # cd repo.zabbix.com [root @ hadoop1 repo.zabbix.com] # python-m SimpleHTTPServer 8899 &>/dev/null & [1] 9897
3. Configure the repo file in yum.
[Root @ hadoop1 yum. repos. d] # cat zabbixlocal. repo [zabbixlocal] name = Zabbix Official Repository-$ basearchbaseurl = https: // 192.168.14.7: 8899/zabbix/3.0/rhel/6/x86_64/enabled = 1 gpgcheck = 1 gpgkey = file: // etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
4. verify whether the yum source has taken effect.
Run the following two commands first.
Yum clean all clear yum local cache
Yum makecache caches software package information on the server locally, improving the speed of searching and installing software.
[Root @ hadoop1 opt] # yum list | grep "zabbix"