HOW TO USE YUM TO DOWNLOAD A PACKAGE WITHOUT INSTALLING IT
To download packages with all their dependencies without installing them.
HOW TO CREATE A LOCAL YUM REPOSITORY CONTAINING MANUALLY DOWNLOADED RPM PACKAGES
For this purpse, you can use both the downloadonly plugin for yum and the yumdownloader utility.
Create a directory for storing downloaded packages
[root@dbpilot ~] mkdir /oracle/prerequesits
Install the downloadonly plugin for yum
# (RHEL5)
# yum install yum-downloadonly
# (RHEL6)
# yum install yum-plugin-downloadonly
# (RHEL7)
# In RHEL7 downloadonly is included in the yum itseft
Download package you need to the previously created directory. For instance, the vim package.
# (RHEL5 and RHEL6)
# yum install --downloadonly --downloaddir=/oracle/prerequesits vim
# (RHEL7)
# yum install --downloadonly --downloaddir=/oracle/prerequesits vim
[root@dbpilot ~] yum reinstall --downloadonly --downloaddir=/oracle/prerequesits vim
Loaded plugins: ulninfo
Resolving Dependencies
--> Running transaction check
---> Package vim-enhanced.x86_64 2:7.4.160-1.el7 will be reinstalled
--> Finished Dependency Resolution
Dependencies Resolved
============================================================================================================
Package Arch Version Repository Size
============================================================================================================
Reinstalling:
vim-enhanced x86_64 2:7.4.160-1.el7 OEL73_x64_NETWORK_REPO 1.0 M
Transaction Summary
============================================================================================================
Reinstall 1 Package
Total download size: 1.0 M
Installed size: 2.2 M
Background downloading packages, then exiting:
vim-enhanced-7.4.160-1.el7.x86_64.rpm | 1.0 MB 00:00:00
exiting because "Download Only" specified
Verify that downloaded vim package exists in the directory
[root@dbpilot ~] ls /oracle/prerequesits
vim-enhanced-7.4.160-1.el7.x86_64.rpm
In the RHEL7, if your package is already installed on a host you have to use the reinstall option to download it. Otherwise it fails.
Install the package by the following command
[root@dbpilot ~] yum install yum-utils
Download package you need to the previously created directory. For instance, the mlocate package.
[root@dbpilot ~] yumdownloader --destdir=/oracle/prerequesits --resolve mlocate
--> Running transaction check
---> Package mlocate.x86_64 0:0.26-6.el7 will be reinstalled
--> Finished Dependency Resolution
mlocate-0.26-6.el7.x86_64.rpm | 112 kB 00:00:00
Verify that downloaded mlocate package exists in the directory
[root@dbpilot ~] ls /oracle/prerequesits
mlocate-0.26-6.el7.x86_64.rpm vim-enhanced-7.4.160-1.el7.x86_64.rpm
Tags In
- Accounts
- Auditing
- AWR
- Bash Scripts
- Datapump
- Default Category
- Demos
- Directory Objects
- Environment Variables
- Initialization Parameters
- Iptables
- Java Program
- Memory Usage
- Metadata API
- Networker
- NLS Settings
- Optimizer Statistics
- ORA-00942
- ORA-01031
- ORA-01720
- ORA-28001
- ORA-31671
- Oracle Database
- Oracle Enterprise Manager
- Performance Tunning
- Postfix
- Privilegies
- Processes
- Queries
- Red Hat Enterprise Linux
- Redo Logs
- Sessions
- SQLPlus
- Statspack
- Tablespaces
- UTL_FILE
- UTL_FILE_DIR
- Wait Events
- Yum