Today in my class, my boss sent two old servers and asked my colleagues and I to install the system. There is no USB flash drive on hand, and a new optical drive is taken, and the optical drive is broken .. We thought of using kicskstart to install the system. Just a laptop, the real machine is RedHat6.2 (it is also feasible to create a virtual machine on a laptop). Let's start to provide services. Device: 1 laptop, 1 rack-mounted vintage server (although old, Xeon E5), 1 Red Hat system disc or ISO Image File System: RedHat6.2
Today in my class, my boss sent two old servers and asked my colleagues and I to install the system. There is no USB flash drive on hand, and a new optical drive is taken, and the optical drive is broken ..
We thought of using kicskstart to install the system. Just a laptop, the real machine is RedHat6.2 (it is also feasible to create a virtual machine on a laptop). Let's start to provide services.
Device: 1 laptop, 1 rack-mounted vintage server (although old, Xeon E5), 1 Red Hat system disc or ISO Image File
System: RedHat 6.2
The installation steps are as follows:
1) install Httpd:
Yum install-y httpd *
2) mount the Rhel6.x CD and copy all the content under the CD to/var/www/html:
Mount/dev/cdrom/media
Cp-rf/media/*/var/www/html
3) install tftp-server, start the tftp service, and start the xinetd process at the same time:
1. rps-ivh tftp-server-xxx.rpm
2. vim/etc/xinetd. d/tftp
# Default: off
# Description: The tftp server servers files using the trivial file transfer \
# Protocol. The tftp prorocol is often used to boot diskless \
# Workstations, download configuration files to network-aware printers ,\
# And to start the installation process for some operatiing systems.
Service tftp
{
Socket_type = dgram
Protocol = udp
Wait = yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-s/tftpboot
Disable = no # The value of disable is changed to no
Per_source = 11
CPIs = 100 2
Flags = IPV4
}
3. service xinetd restart
Enable the TFTP function and change YES to NO.
4) supports PXE startup.
Create a tftpboot folder, as shown below (if it already exists, you do not need to create a folder)
Mkdir/tftpboot (note: the tftp configuration file depends on the path of the above configuration file)
Copy the pxelinux.0 file to the tftpboot Folder:
Cp/usr/lib/syslinux/pxelinux.0/tftpboot
Copy/image/pxeboot/initrd. img and vmlinux on the first Linux installation CD to/tftpboot /.
Cp/var/www/html/image/pxeboot/initrd. img/tftpboot
Cp/var/www/html/pxeboot/vmlinux/tftpboot
Copy the isolinux/*. msg on the first CD to the/tftpboot directory:
Cp/var/www/html/isolinux/*. msg/tftpboot
Create a new pxelinux. cfg directory in tftpboot as follows:
Mkidr pxelinux. cfg
Copy the isolinux. cfg file on the first installation CD to the pxelinux. cfg directory, and change the file to default:
Cd pxelinux. cfg
Cp/var/www/html/isolinux. cfg/tftpboot/pxelinux. cfg/default
#### Default file parameters ########
Default linux
Prompt 1
Timeout 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 = http: // 192.168.1.200/ks. cfg
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-
########## Default file default parameters ##################
5) install the Dhcp service and modify the configuration:
Yum install-y dhcp
Copy it to the directory specified by the configuration template and rename it:
Cp/usr/share/doc/dhcp-x.0.1/dhcpd. conf. sample/etc/dhcpd. conf
Modify the configuration file and add a line: filename "/pxelinux.0"
[Root @ localhost isolinux] # vim/etc/dhcpd. conf
Ddns-update-style interim;
Ignore clinet-updates;
Next-server192.168.1.14; # PXE Server IP Address
Filename "/pxelinux.0 ";
...
...
Finally, start the DHCP service as follows:
Service dhcpd start
6) install Kickstart and configure KickStart
First, install the KickStart toolkit. The command is as follows:
Rpm-ivh system-config-kickstart-*. rpm
Configure kickstart in the Gnone environment. The command is as follows:
System-config-kickstart
7) Save to/var/www/html/ks. cfg
Reboot and pay attention to the red parameters in the default file.
For more information about RedHat, see RedHat topic page http://www.linuxidc.com/topicnews.aspx? Tid = 10