Julian Lyndon-Smith
2009-Jan-20 20:58 UTC
[asterisk-users] Using centos and kickstart to build a minimum installation
Using centos 5.2, I want to use a kickstart file to select packages in order to have an unattended install onto a bare-metal server. Is there any way of finding out which packages I need to compile, build and run asterisk ? I generally want to build all modules in asterisk and the wct4xxp zaptel module I want to be able to not select any groups in the kickstart file, but only select individual packages so as to minimise the footprint and installation time ;) Anyone done anything similar before that would care to share ? Julian ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
Steve Howes
2009-Jan-20 21:06 UTC
[asterisk-users] Using centos and kickstart to build a minimum installation
On 20 Jan 2009, at 20:58, Julian Lyndon-Smith wrote:> Using centos 5.2, > > I want to use a kickstart file to select packages in order to have an > unattended install onto a bare-metal server. > > Is there any way of finding out which packages I need to compile, > build > and run asterisk ? > > I generally want to build all modules in asterisk and the wct4xxp > zaptel module > > I want to be able to not select any groups in the kickstart file, but > only select individual packages so as to minimise the footprint and > installation time ;) > > Anyone done anything similar before that would care to share ?Just strip down trixbox / pbx in a flash etc. Should give you a fairly good idea.
Steve Edwards
2009-Jan-20 22:25 UTC
[asterisk-users] Using centos and kickstart to build a minimum installation
On Tue, 20 Jan 2009, Julian Lyndon-Smith wrote:> Using centos 5.2, > > I want to use a kickstart file to select packages in order to have an > unattended install onto a bare-metal server.I started (but have not finished) a live pen drive install. I've snipped out some bits specific to this project, but you're welcome to crib off it. # # Filename: example.ks # # Version: 000 # # Edit date: 2008-06-11 # # Facility: example.com # # Abstract: This kickstart script creates the CD image. # # Environment: Unix, sh # # Author: Steven L. Edwards # # Modified by # # 000 2008-06-11 SLE Create. lang en_US.UTF-8 keyboard us network --bootproto=dhcp --device=eth0 network --bootproto=dhcp --device=eth1 rootpw example firewall --enabled --port=22:tcp authconfig --enablemd5 --enableshadow selinux --disabled timezone --utc America/Los_Angeles # US english # US keyboard # use DHCP to set up networking # set the password for root # disable the firewall # use MD5 and shadow passwords # list the repositories repo --name=base --baseurl=http://localhost/yum/base repo --name=extras --baseurl=http://ftp.telus.net/pub/centos/5/extras/$basearch repo --name=live --baseurl=http://www.nanotechnologies.qc.ca/propos/linux/centos-live/$basear ch/live repo --name=updates --baseurl=http://localhost/yum/updates # repo --name=base --baseurl=http://ftp.telus.net/pub/centos/5/os/$basearch # repo --name=base --baseurl=http://isoredirect.centos.org/centos/5/os/$basearch # repo --name=extras --baseurl=http://isoredirect.centos.org/centos/5/extras/$basearch # repo --name=updates --baseurl=http://ftp.telus.net/pub/centos/5/updates/$basearch # repo --name=updates --baseurl=http://isoredirect.centos.org/centos/5/updates/$basearch # packages %packages authconfig bash chkconfig comps-extras kernel passwd policycoreutils rootfiles syslinux xkeyboard-config # more packages dhcdbd dhclient dhcp emacs-nox lynx mailx memtest86+ ntp openssh openssh-clients openssh-server wget %post echo Post package customization in chroot PATH=$PATH:/sbin/ # housekeeping TIMESTAMP=$(date +"Created by example.ks on %F at %T") # clean up install rm --force /root/.cshrc rm --force /root/.tcshrc echo Configuring the timezone ( printf "# %s\n\n" "$TIMESTAMP" printf "\tARC=false\n" printf "\tUTC=true\n" printf "\tZONE=\"America/Los_Angeles\"\n" printf "\n# (end of /etc/sysconfig/clock)\n" ) >/etc/sysconfig/clock cp /usr/share/zoneinfo/America/Los_Angeles /etc/localtime chmod u=rw,g=r,o=r /etc/localtime echo Configuring syslogging ( printf "# %s\n\n" "$TIMESTAMP" printf "# log everything to messages\n" printf "\t*.*\t\t\t\t/var/log/messages\n" printf "\n# (end of /etc/syslog.conf)\n" ) >/etc/syslog.conf echo Configure networking ( printf "# %s\n\n" "$TIMESTAMP" # printf "\tDOMAIN=${DOMAINNAME}\n" # printf "\tGATEWAY=${GATEWAY}\n" printf "\tHOSTNAME=localhost.localdomain\n" printf "\tNETWORKING=yes\n" printf "\tNETWORKING_IPV6=no\n" printf "\n# (end of /etc/sysconfig/network)\n" ) >/etc/sysconfig/network echo Configure ntp ( printf "# %s\n\n" "$TIMESTAMP" printf "\t0.pool.ntp.org\n" printf "\t1.pool.ntp.org\n" printf "\t2.pool.ntp.org\n" printf "\t3.pool.ntp.org\n" printf "\n# (end of /etc/ntp/step-tickers)\n" ) >/etc/ntp/step-tickers chkconfig --add ntpd chkconfig --level 2345 ntpd on echo Link for using emacs as edit rm --force /usr/local/bin/edit ln --symbolic /usr/bin/emacs-nox /usr/local/bin/edit %post --nochroot echo Post package customization not in chroot PATH=$PATH:/sbin/ PROJECT_DIR=/home/sedwards/example.com/ cp ${PROJECT_DIR}/bashrc ${INSTALL_ROOT}/etc/ cp ${PROJECT_DIR}/emacs ${INSTALL_ROOT}/root/.emacs cp ${PROJECT_DIR}/asterisk.tar.gz ${INSTALL_ROOT}/root/ %post echo Post package customization in chroot PATH=$PATH:/sbin/ tar\ --gzip\ --directory /\ --extract\ --file /root/asterisk.tar.gz\ ${END_OF_LIST} chkconfig --add asterisk chkconfig --add zaptel # this is where --shell kicks in -- at the end of the ks # (end of example.ks) Thanks in advance, ------------------------------------------------------------------------ Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Ex Vito
2009-Jan-26 05:46 UTC
[asterisk-users] Using centos and kickstart to build a minimum installation
> > Anyone done anything similar before that would care to share ? >Here is a snippet of our standard ks file for automated installs: %packages --nobase @core sendmail sendmail-cf ntp vixie-cron crontabs at logrotate telnet bind-utils lsof wget which unzip man bc nc sharutils # Up till now, just regular unix tools -- useful in a running system, not really # required for running / building asterisk... # The packages needed to build asterisk follow gcc ncurses-devel libtermcap-devel kernel-devel gcc-c++ openssl-devel newt-devel zlib-devel make unixODBC-devel libtool-ltdl-devel sox # sox is obviously "not needed" and unixODBC-devel + libtool-ltdl-devel allowed us # to have the ODBC funcs in asterisk... I'm not really sure why c++ is there, I wouldn't # say it's needed. # Then, for mISDN we still have: # needed For mISDN flex usbutils Cheers, -- exvito