Link to home
Start Free TrialLog in
Avatar of lolaferrari
lolaferrariFlag for United Kingdom of Great Britain and Northern Ireland

asked on

kickstart

I have rpms that i want to include in post install. However, when i run the rpm it asks [Y/n] to install.
How can I include these in the post install of kickstart in a ksh file to install without manually entering y?
ASKER CERTIFIED SOLUTION
Avatar of jgiordano
jgiordano
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of farzanj
when using kickstart, try using rpm -ivh name.rpm

Make sure you install in the order that there is no dependency problem.


Include in the post section
%post
rpm -ivh ...


Order is very important
Avatar of lolaferrari

ASKER

even with rpm -ivh - you still get prompted for "do you want to install these packages" [Y/n] - yum -y looks like the option i want!
Good.  Then jgiordano already have told you this. Although you can take a look at my actual kickstart and I never had to do so.
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth  --useshadow  --enablemd5 
# System bootloader configuration
bootloader --append="rhgb quiet" --location=mbr --driveorder=cciss/c0d0
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all  --drives=cciss/c0d0
# Use graphical install
graphical
# Firewall configuration
firewall --enabled --ssh  
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use network installation
url --url=ftp://192.168.0.254/
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
network --bootproto=dhcp --device=eth1 --onboot=on
# Reboot after installation
reboot
#Root password
rootpw --iscrypted $1$bJl9.QoF$Q5iQSRun2ePabEAU3WkqD1

# SELinux configuration
selinux --disabled
# Do not configure the X Window System
skipx
# System timezone
timezone --isUtc America/Toronto
# Install OS instead of upgrade
install
# Disk partitioning information
part / --bytes-per-inode=4096 --fstype="ext3" --size=5120
part /localservices --bytes-per-inode=4096 --fstype="ext3" --size=102400
part /usr --bytes-per-inode=4096 --fstype="ext3" --size=11264
part /var --bytes-per-inode=4096 --fstype="ext3" --size=11264
part /tmp --bytes-per-inode=4096 --fstype="ext3" --size=5120
part swap --bytes-per-inode=4096 --size=2048
part /suid --bytes-per-inode=4096 --fstype="ext3" --size=300

%post
/bin/touch /root/success
echo "RUNS WITHOUT FULL PATH" > /root/success 2> /root/failure
/bin/touch ./success
/bin/echo "RUNS WITH FULL PATH" >> /root/success 2>> /root/failure
cd /rpms  2>> /root/failure
rpm -Uvh /rpms/kernel-2.6.18-194.11.3.el5.x86_64.rpm
rpm -Uvh /rpms/kernel-headers-2.6.18-194.11.3.el5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-1.6.2.11-2_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-addons-core-1.6.2.1-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-addons-mysql-1.6.2.1-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-configs-1.6.2.11-2_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-core-1.6.2.11-2_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-dahdi-1.6.2.11-2_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-doc-1.6.2.11-2_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk16-voicemail-1.6.2.11-2_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/asterisk-sounds-core-en-gsm-1.4.19-1_centos5.noarch.rpm
rpm -ivh --nodeps /rpms/compat-libevent-11a-3.2.1-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/dahdi-firmware-2.0.2-1_centos5.noarch.rpm
rpm -ivh --nodeps /rpms/dahdi-firmware-hx8-2.06-1_centos5.noarch.rpm
rpm -ivh --nodeps /rpms/dahdi-firmware-oct6114-064-1.05.01-1_centos5.noarch.rpm
rpm -ivh --nodeps /rpms/dahdi-firmware-oct6114-128-1.05.01-1_centos5.noarch.rpm
rpm -ivh --nodeps /rpms/dahdi-firmware-tc400m-MR6.12-1_centos5.noarch.rpm
rpm -ivh --nodeps /rpms/dahdi-linux-2.4.0-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/dahdi-tools-2.4.0-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/distcache-1.4.5-14.1.x86_64.rpm
rpm -ivh --nodeps /rpms/htdig-3.2.0b6-11.el5.x86_64.rpm
rpm -ivh --nodeps /rpms/httpd-2.2.3-43.el5.centos.3.x86_64.rpm
rpm -ivh --nodeps /rpms/ImageMagick-6.2.8.0-4.el5_5.2.i386.rpm
rpm -ivh --nodeps /rpms/ImageMagick-6.2.8.0-4.el5_5.2.x86_64.rpm
rpm -ivh --nodeps /rpms/kernel-2.6.18-194.11.3.el5.x86_64.rpm
rpm -ivh --nodeps /rpms/kernel-headers-2.6.18-194.11.3.el5.x86_64.rpm
rpm -ivh --nodeps /rpms/kmod-dahdi-linux-2.4.0-1_centos5.2.6.18_194.11.3.el5.x86_64.rpm
rpm -ivh --nodeps /rpms/kmod-dahdi-linux-fwload-vpmadt032-2.4.0-1_centos5.2.6.18_194.11.3.el5.x86_64.rpm
rpm -ivh --nodeps /rpms/libedit-3.0-2.20090905cvs.el5.centos.x86_64.rpm
rpm -ivh --nodeps /rpms/libextractor-0.5.22-2.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/libmcrypt-2.5.8-0.el5.centos.x86_64.rpm
rpm -ivh --nodeps /rpms/libmpeg2-0.5.1-2.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/libopenr2-1.2.0-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/libpri-1.4.11.4-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/libss7-1.0.2-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/libtonezone-2.4.0-1_centos5.x86_64.rpm
rpm -ivh --nodeps /rpms/memcached-1.4.5-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/mod_ssl-2.2.3-43.el5.centos.3.x86_64.rpm
rpm -ivh --nodeps /rpms/mysql-5.0.77-4.el5_5.3.x86_64.rpm
rpm -ivh --nodeps /rpms/nmap-5.21-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-AnyEvent-5.240-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/perl-common-sense-3.0-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-DBI-1.611-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-EV-3.9-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-Guard-1.021-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-JSON-2.17-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/perl-JSON-XS-2.27-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-Net-SSLeay-1.36-1.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-TermReadKey-2.30-3.el5.rf.x86_64.rpm
rpm -ivh --nodeps /rpms/perl-YAML-0.71-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-5.2.14-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-cli-5.2.14-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-common-5.2.14-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-gd-5.2.10-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-mbstring-5.2.14-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-mcrypt-5.2.14-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-pear-Auth-SASL-1.0.2-4.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-date-1.4.6-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Date-1.4.7-2.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-db-1.7.13-2.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-excel-0.9.0-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-File-1.2.2-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-file-1.2.2-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-HTTP-Request-1.4.2-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Log-1.9.13-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-log-1.9.3-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Mail-1.1.14-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-mail_mime-1.3.1-1.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Mail-Mime-1.4.0-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-MDB2-2.4.1-2.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-MDB2-Driver-mysql-1.4.1-3.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Net-Sieve-1.1.5-2.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Net-SMTP-1.2.10-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Net-Socket-1.0.8-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-Net-URL-1.0.15-1.el5.centos.noarch.rpm
rpm -ivh --nodeps /rpms/php-pear-ole-0.5-2.el5.rf.noarch.rpm
rpm -ivh --nodeps /rpms/php-pecl-apc-3.0.19-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-pecl-Fileinfo-1.0.4-3.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-pecl-mailparse-2.1.1-5.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-pecl-memcache-3.0.4-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-soap-5.2.14-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/php-xml-5.2.10-1.el5.remi.x86_64.rpm
rpm -ivh --nodeps /rpms/strace-4.5.18-5.el5_5.5.x86_64.rpm
rpm -ivh --nodeps /rpms/t1lib-5.1.0-9.el5.kb.x86_64.rpm
rpm -ivh --nodeps /rpms/yum-kmod-1.1.16-14.el5.centos.1.noarch.rpm

%packages
@base
@development-libs
@development-tools
@core
@admin-tools
@java-development
@server-cfg
@system-tools
@legacy-software-support
@java
@editors
keyutils
kexec-tools
trousers
fipscheck
device-mapper-multipath
imake
bridge-utils
audit
netpbm-progs
ImageMagick
php-pear
nmap
strace
lynx

Open in new window