Configure Kickstart unattended installation centos5.9

Source: Internet
Author: User
Due to the frequent use of linux systems during daily work and study, you cannot avoid frequent installation of the system. However, repeated parameter settings during installation are a headache, so I decided to configure a virtual machine that can automatically install the system, which will save the trouble of one-step security... information &
Due to the frequent use of linux systems during daily work and study, you cannot avoid frequent installation of the system. However, repeated parameter settings during installation are a headache, therefore, we decided to configure a virtual machine that can automatically install the system. In this way, we will not need to install the system step by step. here we have sorted out the configuration process to facilitate future use, if you need it, you can use it. thank you for your criticism. As for what kickstart is, I will not talk about it here. if you are not familiar with it, you can find related documents. Installation platform: vmware workstation 9 system: centos 5.9 (kernel 2.6.18-348. el5) Memory: 512 M
Www.2cto.com configuration process 1. configure the yum source using the local DVD image to install the required software # cd/etc/yum. repos. d/# mv CentOS-Base.repo CentOS-Base.repo.bak // disable the source pointing to the network, it is recommended to change the name here, easy to use when you change back # sed's/enabled = 0/enable = 1/g' CentOS-Media.repo // This is the centos system for the convenience of the user by default added source configuration file, to use a local image as a source, you only need to mount the disc and enable the configuration file. Next, you need to attach the local CD file to test the yum source. # Mkdir/media/cdrom # mount/dev/cdrom/media/cdrom/# yum clean all # yum list the displayed Package list test shows that the local yum source can be used normally. You can install the required software below # yum-y install vsftpd tftp ** kickstart * dhcp
Www.2cto.com 2. copy the documents required for PXE startup.
The PXE boot image file is provided by the syslinux software package and is already provided on the installation CD. if this software package is not available, you can download the rpmto install it on the syslinux homepage: http://syslinux.zytor.com.
If syslinux is installed, a pxelinux.0 file is generated, and the pxelinux.0 file is copied to the '''/tftpboot ''' directory. # Rpm-ql syslinux | grep pxelinux.0 # cp/usr/share/syslinux/pxelinux.0/tftpboot/# mkdir/tftpboot/pxelinux. cfg # cp/media/cdrom/isolinux/*/tftpboot/# mv/tftpboot/isolinux. cfg/tftpboot/pxelinux. cfg/default modify/tftpboot/pxelinux. cfg/default file # chmod u + w/tftpboot/pxelinux. cfg/default // file read-only by default # vim/tftpboot/pxelinux. the content of the default file after cfg/default editing is as follows: default linux // by default, the kernel marked in label linux is used to start prompt 1 // The boot prompt is displayed. if it is 0, no prompt is displayed, start timeout 60 directly by pressing the parameter in defaul. // you can set the display boot time-out period by yourself. msg // display the content of this file F1 boot. msg F2 options. msg F3 general. msg F4 param. msg F5 rescue. msg label linux kernel vmlinuz append ks = ftp://192.168.1.110/ks.cfg Initrdinitrd = initrd. img // set the path of the ks. cfg file, which will be mentioned later. Label text kernel vmlinuz append initrd = initrd. img text label ks kernel vmlinuz append ks initrd = initrd. img label local localboot 1 label memtest86 kernel memtest append-www.2cto.com 3. configure DHCP service # rpm-ql dhcp | grep -- color dhcpd. conf. sample # cp/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample/etc/dhcpd. conf
Cp: overwrite '/etc/dhcpd. Conf '? // Whether to overwrite the original configuration file. select yes here and enter y. Modify the content of the modified configuration file in the main configuration file dhcpd. conf # vim/etc/dhcpd. conf. all comments have been deleted. Ddns-update-style interim; ignore client-updates; allow booting; // defines that pxe can start allow bootp; // define support for bootp subnet 192.168.1.0 netmask 255.255.255.0 {// network segment and mask option routers 192.168.1.1; // vro IP, you can write the gateway IP option subnet-mask 255.255.255.0; range dynamic-bootp 192.168.1.200 192.168.1.250; default-lease-time 21600; max-lease-time 43200; next-server 192.168.1.110; // server IP address. Filename "pxelinux.0"; // boot file after PXE obtains the IP address to start the DHCP service: if the error check/var/log/message # service dhcpd restart # chkconfig -- level 35 dhcpd on 4. modify the tftp parameters and start the service, # vi/etc/xinetd. d/tftp change the selected yes to no to start tftp # service xinetd restart www.2cto.com 5. configure kickstart to generate ks. run the command # system-config-kickstart in the terminal to set the installation method in the graphic interface that is opened. here, I use the ftp-based Bootloader installation option, you can modify it as needed. here I use the default partition parameter to set network settings. here I select the DNCP firewall and SElinux settings, which can be set as needed. here I use the default click "File -- save file" stores the configuration file in/var/ftp and modifies the newly generated ks. cfg file ............. the contents that do not need to be modified have been omitted ............... # Partition clearing information clearpart -- all -- initlabel key -- skip // add this row to skip the input serial number ............. the contents that do not need to be modified have been omitted ............... because the system I currently use does not select a service for the software package. cfg file cannot select to follow the soft package, if you need to install additional software package can install the system is documented in the installation information file/root/anaconda-ks.cfg copy the relevant soft package name, copy to the newly created ks. cfg.
The format of www.2cto.com is % packages @ base @ core @ dialup @ editors @ gnome-desktop @ games @ graphical-internet @ graphics @ hyperv @ office @ printing @ sound-and-video @ text- internet @ base-x is not described here. Next, mount the disc to the/var/ftp/pub directory, and finally determine the status of each service # service iptables stop // disable the firewall # setenforce 0 // disable selinux # chkconfig tftp on // TFTP service enabling command # chkconfig dhcpd on # chkconfig vsftpd on # service xinetd restart // The TFTP service belongs to its sub-service # service dhcpd restart # service vsftpd restart is normal in the service you can perform the following test. You can create a new virtual machine and start it over the network to achieve automatic installation. The installation process takes about half an hour. after the installation is complete, you will be prompted to restart the system. then you can use the set password to log on to the system.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.