Kickstart unattended RHEL5 installation (graphic version)

Source: Internet
Author: User
Before Kickstart's unattended installation of RHEL5 (detailed graphic version), a text version is released. Now, a detailed graphic version is compiled so that everyone can implement Rhel5 unattended installation. Test environment: RedHat5.3 disable iptables and Selinux services required: DhcpVsftpTftpXinted I. Set up the Yum Source: Detailed Method see: http://www.linuxidc.com/Linux/2011-07

Before Kickstart's unattended installation of RHEL5 (detailed graphic version), a text version is released. Now, a detailed graphic version is compiled so that everyone can implement Rhel5 unattended installation.

Test environment: RedHat 5.3Disable iptables and Selinux
Required services: Dhcp Vsftp Tftp Xinted

1. Set up the Yum Source:
For detailed method, see: http://www.linuxidc.com/Linux/2011-07/38493.htm (using the second method, the CD image to build YUM)
Ii. Install the Vsftp service:
----------------------------------------------
[Root @ rhce ~] # Yum install vsftpd *-y
[Root @ rhce ~] # Chkconfig vsftpd on
[Root @ rhce ~] # Service vsftpd restart
Disable vsftpd: [failed]
Start vsftpd For vsftpd: [OK]
-----------------------------------------------
3. copy the file required for PXE startup:
1. Copy necessary files:
----------------------------------------------
[Root @ rhce ~] #Cp/usr/lib/syslinux/pxelinux.0/tftpboot/
[Root @ rhce ~] #Mkdir/tftpboot/pxelinux. cfg
[Root @ rhce ~] #Cp/cdrom/isolinux. cfg/tftpboot/pxelinux. cfg/default
[Root @ rhce ~] #Cp/cdrom/images/pxeboot/initrd. img/tftpboot/
[Root @ rhce ~] #Cp/cdrom/images/pxeboot/vmlinuz/tftpboot/
----------------------------------------------
2. Modify the/tftpboot/pxelinux. cfg/default file.
----------------------------------------------
[Root @ rhce ~] # Chmod u + w/tftpboot/pxelinux. cfg/Default // default file read-only
[Root @ rhce ~] # Vim/tftpboot/pxelinux. cfg/default
Default linux
Prompt 1
Timeout 6// Timeout. The default value is 600. You can leave it unchanged.
Display boot. msg
F1 boot. msg
F2 options. msg
F3 general. msg
F4 param. msg
F5 rescue. msg
Label linux
Kernel vmlinuz
Append initrd = initrd. imgKs = ftp: // 192.168.1.8/ks. cfg // ks. cfg is the configuration file for kickstart installation. The system is installed according to ks. cfg. We will configure him later
... Is omitted below
------------------------------------------------
4. install and configure the DHCP service:
1. Install the DHCP service:
------------------------------------------------
[Root @ rhce ~] # Yum list dhcp *
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
Dhcpv6-client.i386 1.0.10-16. el5 installed
Available Packages
Dhcp. i386. 0.5-18. el5 cdrom
Dhcp-devel.i386. 0.5-18. el5 cdrom
Dhcpv6.i386 1.0.10-16. el5 cdrom
[Root @ rhce ~] # Yum install dhcp. i386 dhcp-devel.i386-y
--------------------------------------------------
2. Generate the main configuration file dhcpd. conf:
--------------------------------------------------
[Root @ rhce ~] #Rpm-ql dhcp | more
... Omitted above
/Usr/share/doc/dhcp-3.0.5/api + protocol
/Usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample
... Is omitted later
[Root @ rhce ~] # Cp/usr/share/doc/dhcp-3.0.5/dhcpd. conf. sample/etc/dhcpd. conf
Cp: overwrite "/etc/dhcpd. conf "? Y
--------------------------------------------------
3. Modify the main configuration file dhcpd. conf.
--------------------------------------------------
[Root @ rhce ~] # Vim/etc/dhcpd. conf
Ddns-update-style interim;
Ignore client-updates;
Subnet192.168.1.0Netmask255.255.255.0{// Network segment and mask.
# --- Default gateway
Option routers192.168.1.8; // the IP address of the router, which can be the IP address of the gateway.
Option subnet-mask limit 255.0;
Filename"Pxelinux.0"; // boot file after PXE obtains the IP address
Next-server 192.168.1.8; // the IP address of the server.
# Option nis-domain "domain.org ";// Cancel
# Option domain-name "domain.org ";// Cancel
Option domain-name-servers192.168.1.8; // DNS Server IP Address
Option time-offset-18000; # Eastern Standard Time
# Option netbios-node-type 2;
Range dynamic-bootp192.168.1.100 192.168.1.200; // ip address pool range.
Default-lease-time 21600;
When you omit the configuration file, pay attention to the semicolon (;) next to each sentence.
---------------------------------------------------
4. Start the DHCP service:If the error check/var/log/message is enabled
---------------------------------------------------
[Root @ rhce ~] # Service dhcpd restart
Start dhcpd: [OK]
---------------------------------------------------
5. Generate the kickstart configuration file:
1. Install the kickstart package:
---------------------------------------------------
[Root @ rhce ~] # Yum list * kic *
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Available Packages
Pykickstart. noarch 0.43.3-1. el5 cdrom
System-config-kickstart.noarch 2.6.19.8-2. el5 cdrom
[Root @ rhce ~] # Yum install system-config-kickstart.noarch
---------------------------------------------------
2. Generate the ks. cfg installation configuration file:
1) graphical interface configuration :(Run the system-config-kickstart command in the terminal.)

: The project to be modified in the basic configuration

: The project to be modified in the installation method

: Partition information. Create a partition table for the target workstation.

: Network configuration, click "add network device" -- "OK"

: Click "file-save file" and click "save"
2) modify the newly generated ks. cfg file: We have not configured the software package for installation because the system does not have this part.
----------------------------------------------------
[Root @ rhce ~] # Cat/root/Anaconda-ks.cfg // installation information automatically recorded when installing the system
... Omitted above
% Packages
@ Office
@ Editors
@ Text-internet
@ Gnome-desktop
@ Dialup
The part after "// % pachages" is omitted later to record the installation status of the software package during system installation. Copy It To The ks. cfg file.
[Root @ rhce ~] # Vim ks. cfg
... Omitted above
# Partition clearing information
Clearpart -- none
Key -- skip // skip the Input Serial Number step
... Omitted in the middle
% Packages// Here and later content is copied from/root/anaconda-ks.cfg
@ Office
@ Editors
@ Text-internet
@ Gnome-desktop
@ Dialup
... Is omitted below
----------------------------------------------------
3. Copy the configuration file to the specified location:
We set it in the/tftpboot/pxelinux. cfg/default file.Ks = ftp: // 192.168.1.8/ks. cfg
Copy the file to this location:
----------------------------------------------------
[Root @ rhce ~] # Cp ks. cfg/var/ftp//// Var/ftp directory is the root directory of the VSFTP Service
----------------------------------------------------

Related Article

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.