1, in the maintenance process, the need for a unified installation of some software, there may be some machines only have an intranet, some machines with external network, can be installed directly from Yum, how to do?
A: The Yum cache is enabled on a machine with an external network, so the software installation package is also cached locally when installing the software, and how to modify the Yum configuration:
#vim/etc/yum.conf
Keepcache=1//1 means cache is enabled and defaults to 0, which means not enabling
#yum install software name//installed package will be cached under/var/cache/yum/base/packages, updated package will be cached to/var/cache/yum/updates/packages
#yum Install Yum-downloadonly
#yum-y install--downloadonly software name//download package only, do not install
2, other intranet machine how to install software?
A very simple way to copy all the files in the/var/cache/yum/directory of this machine to the same directory under another machine
Such as:
Rsync-ave ' Ssh-p '/var/cache/yum/192.168.84.156:/var/cache/yum/
If the destination server changes the port number of SSH for security reasons, change the above 22 to the appropriate port number
3. Implementation
# YUM-C Update//updates only from cache
# Yum-c Install < package name >//Installation from cache only
Note:
Emptying the Yum cache
# Yum Clean headers
To delete all packages in the cache, use the command:
# Yum Clean Package
Intranet-only server with Yum installation software