CACHING ALL PACKAGES AFTER YUM HAS INSTALLED IT
Yum
0
REQUEST
I want to keep all packages installed by yum in a custom directory. Later I want to use them for setting up a repository.
RELATED
SOLUTION
To change default yum cache location, set the cachedir parameter to a directory you want in /etc/yum.conf.
Then set keepcache=1 to cache packages after successful installation.
Then set keepcache=1 to cache packages after successful installation.
TESTCASE
Get details about the current values of yum parameters
[root@dbpilot ~] cat /etc/yum.conf |grep -v "#"
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
Create a directory for storing packages
[root@dbpilot ~] mkdir /oracle/cache
Modify the configuration file according to your needs
[root@dbpilot ~] cat /etc/yum.conf |grep -v "#"
[main]
cachedir=/oracle/cache/$basearch/$releasever
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
Install required packages
[root@dbpilot ~] ls -l /oracle/cache/
total 0
[root@dbpilot ~] yum install vim-enhanced mlocate -y
Confirm that packages are cached in the custom directory after successful installation
[root@dbpilot ~] rpm -qa |egrep "vim-enhanced|mlocate"
vim-enhanced-7.4.160-1.el7.x86_64
mlocate-0.26-6.el7.x86_64
[root@dbpilot ~] cd /oracle/cache/x86_64/7Server/OEL73_x64_NETWORK_REPO/packages/
[root@dbpilot ~] ls
mlocate-0.26-6.el7.x86_64.rpm vim-enhanced-7.4.160-1.el7.x86_64.rpm
Here OEL73_x64_NETWORK_REPO is my repository name
[root@dbpilot ~] cat /etc/yum.repos.d/local.repo
[OEL73_x64_NETWORK_REPO]
name="Oracle Linux 7.3.0.0.0 for x86 64 bit : V834394-01.iso V834395-01.iso V834396-01.iso"
baseurl=http://dbpilot.net/oel/7.3/Packages/
enabled=1
gpgcheck=0
REFERENCES
How to change the location of yum cache from the default /var/cache/yum?
Version : 17:16 05.02.2018
Platform : Oracle Linux Server 7.3
Platform : Oracle Linux Server 7.3
Tags In
Related Posts
Leave a Reply Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Categories
- Linux (8)
- Iptables (2)
- Memory Usage (1)
- Postfix (1)
- Yum (4)
- Networker (2)
- Oracle (63)
- Account (2)
- AWR (2)
- Database Errors (6)
- Database Performance (9)
- Datapump (3)
- Enterprise Manager (24)
- Enterprise Manager Metrics (4)
- Environments (4)
- High CPU Usage (2)
- High IO Load (4)
- Initialization Parameters (5)
- job_queue_processes (1)
- Processes (3)
- NLS (1)
- Objects (1)
- Objects DDL (2)
- OJVM/PSU/DRU Patches (1)
- PL/SQL (5)
- UTL_FILE (4)
- Prerequisites (1)
- Privileges (1)
- Profile (1)
- Queries (2)
- Redologs (1)
- Resource Limits (1)
- Segment Shrink (1)
- Session (6)
- Spfile (3)
- SQL PLUS (1)
- Spooling (1)
- Standard Queries (7)
- Statistics (2)
- Temporary Tablespace (2)
Tags
/etc/sudoers
Account
Agent
Agent 12c Deinstall
Agent 13c Deployment
Automated Maintenance Tasks
AWR
BLOCKING SESSION
Database Auditing
Database Directory
Database Performance
Datapump
DBMS_SYSTEM
Enterprise Manager
Enterprise Manager Metrics
Failed Logins (Historical) Metric
Failed Logins Metric
Gather Statistics Job
GET_ENV
High IO Load
Idle Sessions
Initialization Parameters
LOCKED(TIMED)
OEM
OEM 12.1.0.4
OEM 13.1.0.0.0
OMS
Processes
Repository
Retrieve Object DDL
ROW LOCK
Scheduler
Schema Statistics
Scripts
Sessions
spfile
SQL_ID
Standard Query
TRANSACTION
User Grants
UTL_FILE
WAITING SESSION
Window Group
Window Name
Yum