• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Install RPM Package During Kickstart Installation

By admin

The purpose of this post is to Install a specific package that can’t be installed while using Kickstart during the %Packages stage, instead, it can be installed on the %Post Installation Stage.

There are 2 cases here:

A) Trying to install a package during Kickstart installation (which package is in the media ), fails with a message like the below:

You have specified the package 'XXXX' should be installed. 
This package does not exist. Would you like to continue or abort your installation?

B) If a package is needed but not present in the installation media, it could be provided from another source ( like an FTP or HTTPD server), the package can be added in the %Post Installation Stage to get installed with the Kickstart file.

This workaround here is to install the package during the %Post Installation Stage. Create lines as shown below at the end of the ks.cfg file:

A) If the package is already in the installation media it should be added in the %Post Installation Stage.

# First way:
%post --log=/root/my-post-log # To get a log of the installation
mount /dev/cdrom /mnt # mont the disk/imagen on the %Post Installation Stage.
rpm -Uvh /mnt/Packages/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm

%end

B) Providing the package from a external site( add it on %Post Installation Stage.).

# Second way copy the package from a http server that you installed or from another place.
%post --log=/root/my-post-log # To get a log of the installation
cd /var/tmp |/usr/bin/wget http://10.157.XX.XX/OL6.3_x86_64/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm
rpm -ivh /libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm

%end
Note: If the package has some required dependencies that also are needed. Those dependencies may be added in the same %Post Installation Stage of the ks.cfg file or in the %Package stage if them doesn’t fail there.

After reboot the installation can be checked with the log file created during the %Post Installation Stage, it to confirm the package installation.

Example

# cat /root/my-post-log
mount: block device /dev/sr0 is write-protected, mounting read-only
warning: /mnt/Packages/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ##################################################
libtool-ltdl-devel ##################################################
--2016-07-28 16:23:35-- http://10.157.XX.XX/OL6.3_x86_64/libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm
Connecting to 10.157.XX.XX:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 165708 (162K) [application/x-rpm]
Saving to: 'libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm'

0K .......... .......... .......... .......... .......... 30% 30.0M 0s
50K .......... .......... .......... .......... .......... 61% 19.5M 0s
100K .......... .......... .......... .......... .......... 92% 32.2M 0s
150K .......... . 100% 28.4M=0.006s

2016-07-28 16:23:35 (26.1 MB/s) - 'libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm' saved [165708/165708]

warning: libtool-ltdl-devel-2.2.6-15.5.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
Preparing... ##################################################
package libtool-ltdl-devel-2.2.6-15.5.el6.x86_64 is already installed

Also is possible to confirm the installation with RPM command:

# rpm -qa | grep libtool
libtool-ltdl-2.2.6-15.5.el6.x86_64
libtool-ltdl-devel-2.2.6-15.5.el6.x86_64

Filed Under: CentOS/RHEL

Some more articles you might also be interested in …

  1. How to blacklist a local disk using the “find_multipaths” directive in CentOS/RHEL 6
  2. How to Configure Automatic Package Updates on the Server in CentOS/RHEL 8
  3. How to display a Custom Kernel Name in GRUB Menu CentOS/RHEL 6
  4. FATAL: Error inserting rds_rdma
  5. Failed to start LSB: Bring up/down networking – On restarting network service CentOS/RHEL (DHCP client)
  6. “dracut-initqueue[286]: Warning: dracut initqueue timeout – starting timeout scripts” – CentOS/RHEL 7 booting issue
  7. Windows Active Directory Account Shows Inconsistent UID/GID In Different Linux SSSD Clients (CentOS/RHEL)
  8. Using initcall_debug to find kernel calls are taking a long time during boot in CentOS/RHEL
  9. How To Add Timestamps To dmesg Kernel Boot Log in CentOS/RHEL
  10. How to extract RAR files in CentOS/RHEL 7 and 8

You May Also Like

Primary Sidebar

Recent Posts

  • SQL script to find tables that are fragmented
  • TRUNCATE TABLE not releasing space from tablespace
  • How to reclaim entire space of an oracle database table with “Truncate Table” statement
  • Oracle SQL Script to Report Tablespace Free and Fragmentation
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary