# # Kickstart file used to install latest iRedMail on CentOS 5, works on # both i386 and x86_64. # # Provided by iRedMail project: # http://www.iredmail.org/ # # Please post your questions/issues in support forum: # http://www.iredmail.org/forum/ # ############ # ChangeLog # # - 2011-08-28 Update to iRedMail-0.7.3. # - 2011-06-28 Supports Scientific Linux 5.x. # - 2011-06-10 Update to iRedMail-0.7.2. # - 2011-04-25 Don't require 2nd disk. # Don't try to enable CDROM as yum repository with netinstall CD. # Allow to install via other installation medias. # - 2011-04-18 Initialize release. # # Used for interactive installation. #interactive # Install OS instead of upgrade install # Installation method. #cdrom # For RHEL 5.x #key --skip # System authorization information auth --useshadow --enablemd5 # System keyboard #keyboard us # System language. It will affect both installation interface and # system after installation complete. #lang en_US # Installation logging level: debug, info, warning, error, critical. logging --level=critical # SELinux configuration selinux --disabled # Do not configure the X Window System #skipx # System timezone. Do not use '--utc' option here. #timezone Asia/Hong_Kong # Use graphical/text install #text graphical # Enable/Disable services, seperated by comma. # Options: --enabled/disabled services --enabled=network # ------------------- # ---- Test only ---- # ------------------- # System bootloader configuration #bootloader --location=mbr # Clear the Master Boot Record #zerombr # Partition clearing information #clearpart --all --initlabel #Root password: redhat #rootpw --iscrypted $1$h7EtIFv4$R9JQ4aCOVN7E9ml3A2SXv. # Run the Setup Agent on first boot firstboot --disable # Network information network --onboot=yes --bootproto=query --hostname='iredos.iredmail.org' # Disk partitioning information #part swap --bytes-per-inode=4096 --fstype="swap" --size=512 #part / --bytes-per-inode=4096 --fstype="ext3" --grow --size=1 # ------------------- # For more kickstart options, please refer: # http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/Installation_Guide-en-US/s1-kickstart2-options.html # ------------------------------------------- # Packages. # ------------------------------------------- %packages --excludedocs basesystem kernel openssh-server openssh-clients # ------------------------ # Required packages. # ------------------------ # Required by postfix (/etc/pam.d/smtp.postfix) policycoreutils selinux-policy selinux-policy-targeted # ------------------------ # Addition packages. # ------------------------ man man-pages wget mailx unzip bzip2 dhclient vim-minimal system-config-network-tui iptables tmpwatch vixie-cron crontabs patch which kbd dos2unix logwatch # ------------------------ # Removed packages. # ------------------------ -Deployment_Guide-en-US -GConf2 -NetworkManager -OpenIPMI -acpid -amtu -anacron -apmd -apr-utils -at -atk -attr -audit -audit-libs-python -authconfig -autofs -bc -bluez-gnome -bluez-libs -bluez-utils -cairo -ccid -conman -coolkey -cpuspeed -crash -cryptsetup-luks -cups -dbus-python -dhcpv6_client -dmraid -dosfstools -dump -ecryptfs-utils -exim -finger -firstboot-tui -ftp -gnu-efi -gpm -gtk2 -hdparm -hesiod -htmlview -ifd-egate -ipsec-tools -iptstate -irqbalance -ksh -libnotify -libselinux-python -libwnck -lsof -mailcap -mgetty -microcode_ctl -mkbootdisk -mtools -mtr -nano -nc -net-snmp-libs -nfs-utils -nfs-utils-lib -notification-daemon -nscd -nss_ldap -pam_smb -pango -paps -parted -pax -pcsc-lite -pinfo -pm-utils -portmap -postgresql-libs -ppp -psacct -pygobject2 -quota -rdate -rdist -redhat-lsb -redhat-menus -rhel-instnum -rmt -rp-pppoe -rsh -setools -smartmontools -sos -specspo -syslinux -system-config-securitylevel-tui -talk -tcsh -telnet -wireless-tools -yp-tools -ypbind -yum-updatesd # Post macro. %post --nochroot # Mount CD-ROM, will be used after chroot. mkdir -p /mnt/sysimage/mnt/ mount -t iso9660 /tmp/cdrom /mnt/sysimage/mnt %post # Change tty, we need interactive mode. chvt 3 exec < /dev/tty3 > /dev/tty3 echo -e '\n' cat </dev/null export REPOFILE_CDROM='/etc/yum.repos.d/cdrom.repo' export REPONAME_CDROM='CDROM' export REPOURL_CDROM='' if [ -d /mnt/repodata ]; then # Red Hat, CentOS. export REPOURL_CDROM='file:///mnt' elif [ -d /mnt/SL/repodata ]; then # Scientific Linux. export REPOURL_CDROM='file:///mnt/SL' fi if [ X"${REPOURL_CDROM}" != X"" ]; then echo '* Enable CDROM as local yum repository.' cat > ${REPOFILE_CDROM} </dev/null 2>&1 echo '* Active network.' /etc/init.d/network restart echo '* Downloading iRedMail ...' cd /root/ wget -c --referer 'kickstart' --progress=bar:force 'http://iredmail.googlecode.com/files/iRedMail-0.7.3.tar.bz2' echo '* Uncompressing iRedMail ...' tar xjf iRedMail-*.tar.bz2 rm -f iRedMail-*.tar.bz2 cd /root/iRedMail-*/ echo "* Sleeping 10 seconds before starting iRedMail installer." for i in 10 9 8 7 6 5 4 3 2 1; do echo -n " ${i}s" && sleep 1 done echo '.' echo '* Start iRedMail installer.' bash iRedMail.sh # Clear yum repo metadata. yum clean all >/dev/null rm -f ${REPOFILE_CDROM} >/dev/null echo "* Sleeping 10 seconds before switching to OS installation console." for i in 10 9 8 7 6 5 4 3 2 1; do echo -n " ${i}s" && sleep 1 done echo '.' # Return to default installation tty. grep -E '(\|testInVM)' /proc/cmdline >/dev/null 2>&1 if [ X"$?" == X"0" ]; then # For text installation mode. chvt 1 exec < /dev/tty1 > /dev/tty1 else # For graphical installation mode. chvt 6 exec < /dev/tty6 > /dev/tty6 fi