Package preparation: xinetd, tftp-server, dhcp, httpd, system-config-kickstart, syslinux, nfs test environment: Local Address: 192.168.46.98 local Gateway: 192.168.46.254 configure DHCP server: Sample: Success :--------------------------------------------------------------------
Package preparation: xinetd, tftp-server, dhcp, httpd, system-config-kickstart, syslinux, nfs
Test environment:
Local Address: 192.168.46.98
Local Gateway: 192.168.46.254
Configure the DHCP server:
Sample:
--------------------------------------------------------------------------------
Subnet 192.168.46.0 netmask 255.255.255.0 {
Range 192.168.46.100 192.168.46.105;
Option routers 192.168.46.254;
Default-lease-time 600;
Max-lease-time 7200;
Next-server 192.168.46.98;/* point to the tftp server */
Filename = "pxelinux.0";}/* relative path of the ftp root directory */
--------------------------------------------------------------------------------
Reference file:
Ddns-update-style interim;/* Dynamic dns update mode supported by dhcp */
Ignore client-updates;/* ignore client DNS dynamic updates */
Authoritative;/* Authorize */
Allow booting;/* supports PXE startup */
Allow bootp;/* supports boottp */
Subnet 192.168.129.0 netmask 255.255.255.0 {/* scope */
Range 192.168.129.30 192.168.129.78;/* IP address segment range */
Option routers 192.168.129.1;/* gateway */
Option subnet-mask limit 255.0;/* subnet mask */
Option domain-name-servers 203.103.24.68;/* DNS server address */
Default-lease-time 21600;/* lease period, seconds */
Max-lease-time 43200;/* maximum lease period, in seconds */
Next-server 192.168.129.22;/* TFTPServer IP */
Filename "/pxelinux.0";/* Bootstrap file */
Mount the system disk to/mnt
Configure the tftpboot root directory)
# Cp/mnt/images/pxeboot/vmlinuz/mnt/images/pxeboot/initrd. img/var/lib/tftpboot
# Cp/mnt/isolinux/boot. msg/mnt/isolinux/splash.jpg/var/lib/tftpboot
# Cp/usr/share/syslinux/pxelinux.0/var/lib/tftpboot/
# Mkdir/var/lib/tftpboot/pxelinux. cfg
# Cp-p/media/cdrom/isolinux. cfg/var/lib/tftpboot/pxelinux. cfg/default
Default Configuration in TFTP
# Vi/var/lib/tftpboot/pxelinux. cfg/default
--------------------------------------------------------------------------------
Default linux
# Prompt 1
Timeout 600
Display boot. msg
Menu background splash.jpg
Menu title Welcome to Red Hat Enterprise Linux 6.4!
Menu color border 0 # ffffffff #00000000
Menu color sel 7 # ffffffff # ff000000
Menu color title 0 # ffffffff #00000000
Menu color tabmsg 0 # ffffffff #00000000
Menu color unsel 0 # ffffffff #00000000
Menu color hotsel 0 # ff000000 # ffffffff
Menu color hotkey 7 # ffffffff # ff000000
Menu color scrollbar 0 # ffffffff #00000000
Label local
Localboot 0
Label linux
Kernel vmlinuz
Append initrd = initrd. img devfs = nomount ks = http: // 192.168.46.98/ks. cfg
--------------------------------------------------------------------------------
NFS shared directory Configuration
# Vi/etc/exports
--------------------------------------------------------------------------------
/Mnt 192.168.46.0/255.255.255.0 (ro, sync)
--------------------------------------------------------------------------------
Configure the Kickstart file ks. cfg
# Cd/var/www/html
# Vi ks. cfg
--------------------------------------------------------------------------------
# Platform = x86, AMD64, or Intel EM64T
# Version = DEVEL
# Firewall configuration
Firewall -- enabled -- ssh
# Install OS instead of upgrade
Install
# Use NFS installation media
Nfs -- server = 192.168.46.98 -- dir =/mnt
# Root password
# Rootpw -- iscrypted $1 $ kC9vxUwe $ l. U7ZGNt9Yjcvt2YHy3J50
# System authorization information
Auth -- useshadow -- passalgo = sha512
# Use text mode install
Text
# System keyboard
Keyboard us
# System language
Lang en_US
# SELinux configuration
Selinux -- disabled
# Do not configure the X Window System
Skipx
# Installation logging level
Logging -- level = info
# Reboot after installation
Reboot
# System timezone
Timezone -- isUtc Asia/Shanghai
# Network information
Network -- bootproto = dhcp -- device = eth0 -- onboot = on
# System bootloader configuration
Bootloader -- location = mbr
# Clear the Master Boot Record
Zerombr
# Partition clearing information
Clearpart -- all -- initlabel
# Disk partitioning information
Part/boot -- asprimary -- fstype = "ext4" -- size = 128
Part swap -- asprimary -- fstype = "swap" -- size = 2048
Part/-- asprimary -- fstype = "ext4" -- size = 8000
Part/data -- asprimary -- fstype = "ext4" -- size = 1
% Packages
@ Base
@ Chinese-support
% End
--------------------------------------------------------------------------------
KS file reference: http://www.linuxidc.com/Linux/2013-07/87299.htm
Enable Service
Tftp is included in xinetd, so it must be enabled in the configuration file
# Vi/etc/xinetd. d/tftp
--------------------------------------------------------------------------------
Service tftp
{
Socket_type = dgram
Protocol = udp
Wait = yes
User = root
Server =/usr/sbin/in. tftpd
Server_args =-s/var/lib/tftpboot
Disable = no
Per_source = 11
CPIs = 100 2
Flags = IPv4
}
--------------------------------------------------------------------------------
Enable
# Service dhcpd start
# Service xinetd start
# Service httpd start
# Service nfs start
For more information about Hadoop, see Hadoop topic page http://www.linuxidc.com/topicnews.aspx? Tid = 13