Kickstart unattended rhel5 Installation

Source: Internet
Author: User
Kickstart unattended rhel5 installation (graphic version)

A text version sent before 21:56:48 is now a detailed graphic version, so that everyone can implement rhel5 unattended installation.

Test environment: RedHat 5.3 disable iptables and SELinux

Required services: DHCP vsftp TFTP xinted


1. Set up the yum Source:

For detailed method, see: http://iminmin.blog.51cto.com/689308/162666 (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.

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. IMG Ks = ftp: // 192.168.1.8/KS. cfg // ks. cfg is the Kickstart installation configuration file, which 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;

Subnet 192.168.1.0 netmask 255.255.255.0 {// network segment and mask.

# --- Default Gateway

Option routers 192.168.1.8; // router IP address, which can be a gateway IP Address

Option subnet-mask limit 255.0;
Filename "pxelinux.0"; // The boot file after the IP address is obtained by PXE.

Next-server 192.168.1.8; // the IP address of the server.
# Option Nis-domain "domain.org"; // deregister
# Option domain-name "domain.org"; // deregister

Option domain-name-servers 192.168.1.8; // DNS Server IP Address

Option time-offset-18000; # Eastern Standard Time

# Option NetBIOS-node-type 2;

Range dynamic-BOOTP 192.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 Dhcp Service: if an 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)

Figure 1: The project to be modified in the basic configuration

Figure 2: items to be modified in the installation method

Figure 3: partition information: Create a partition table for the target workstation



Figure 4: network configuration, click "add network device"-"OK"



Figure 5: 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 no serial number is installed during installation.

----------------------------------------------------

[Root @ rhce ~] # Cat/root/anaconda-ks.cfg // installation information automatically recorded during system installation

... 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 Ks = ftp: // 192.168.1.8/KS. cfg in the/tftpboot/pxelinux. cfg/default file.

Copy the file to this location:

-------------------------------------------------- [Root @ rhce ~] # The CP ks. cfg/var/FTP // var/FTP directory is the root directory of the vsftp service.

----------------------------------------------------

6. Copy the Linux installation file:

When configuring the KS. cfg file, we set the path to/pub,





------------------------------------------------------ [Root @ rhce ~] # Umount/dev/HDC

[Root @ rhce ~] # Mount/dev/HDC/var/FTP/pub/

Mount: block device/dev/HDC is write-protected, mounting read-only

---------------------------------------------------- 7. Confirm the status of the related service:

------------------------------------------------------

[Root @ rhce ~] # Service iptables stop

Clear firewall rules: [OK]

Set chains to accept policy: Filter [OK]

Uninstalling the iiptables module: [OK]

[Root @ rhce ~] # Setenforce 0 // disable SELinux

[Root @ rhce ~] # Chkconfig TFTP on // TFTP service enabling command

[Root @ rhce ~] # Chkconfig DHCPD on

[Root @ rhce ~] # Chkconfig vsftpd on

[Root @ rhce ~] # Service xinetd restart // the TFTP service belongs to its sub-Service

Stop xinetd: [OK]

Start xinetd: [OK]

[Root @ rhce ~] # Service DHCPD restart

Disable DHCPD: [OK]

Start DHCPD: [OK]

[Root @ rhce ~] # Service vsftpd restart

Disable vsftpd: [OK]

Start vsftpd For vsftpd: [OK]

------------------------------------------------------

8. Test Workstation:

Skip DHCP and start the computer through TFTP

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.