This section describes the complete anaconda installation program. Strictly speaking, the full anaconda server requires dhcp, tftp, nfs, dns, vftpd, or http servers. Although dns is not involved in this section, but it can also complete the basic anaconda, which has been used in CentOS before. Now it is necessary to organize it again... [Root @ yang ~] # Mount/dev/cdrom/mnt // mount the Red Hat off disk and use it as the yum library. The Red Hat 5.4 disc can be straight
This section describes the complete anaconda installation program. Strictly speaking, the full anaconda server requires dhcp, tftp, nfs, dns, vftpd, or http servers. Although dns is not involved in this section, but it can also complete the basic anaconda, which has been used in CentOS before. Now it is necessary to organize it again...
[Root @ yang ~] # Mount/dev/cdrom/mnt // mount the Red Hat off disk and use it as the yum database. The Red Hat 5.4 disc can be used directly without performing the createrepo operation.
Mount: block device/dev/cdrom is write-protected, mounting read-only
[Root @ yang ~] # Cat/etc/yum. repos. d/local. repo
[Cdrom]
Name = dvd for rhel5.4
Baseurl = file: // mnt/Server
Gpgcheck = 0
[Root @ yang ~] # Yum-y install dhcp tftp-server // install dhcp and tftp servers. dhcp solves Address Allocation Problems, and tftp is used to transmit kernel initialization flash disks.
[Root @ yang ~] # Cat/etc/dhcpd. conf // dhcp configuration file
Option domain-name "yang.com"; // defines the default domain name. If a dns server exists, it can be linked.
Default-lease-time 6000; // default address lease expiration time, Global Options
Max-lease-time 11400; // maximum address lease expiration time, Global Options
Authourtative; // defines the server as an authoritative dhcp server in the network.
Next-server 192.168.0.200; // the nfs server address used in pxe
Ddns-update-style ad-hoc; // The style parameter must be ad-hoc, interim, or none.
Log-facility local7; // log type. Use the custom log local7 in/etc/syslog. conf.
Subnet 192.168.0.0 netmask 255.255.255.0 {// use dhcp In the 192.168.0.0/24-bit Network
Range 192.168.0.10 192.168.0.100; // ip address range of the dhcp server
Option domain-name-servers 192.168.0.200; // IP address of the dns server provided by the client
Option domain-name "yang.com"; // domain name provided for the client
Option netbios-name-servers 192.168.0.200; // IP address of the netbios server provided by the client
Option routers 192.168.0.1; // The gateway address provided for the client
Option broadcast-address 192.168.0.255; // broadcast address provided by the client
Default-lease-time 6000; // default address lease expiration time, partial options
Max-lease-time 11400; // maximum address lease expiration time, partial options
Filename "/pxelinux.0"; // specify the Initial Startup file to be loaded when the client starts. The file is located in the root directory of the tftp server.
}
Local Nic Configuration:
[Root @ yang ~] # Ifconfig | grep 'inet addr'
Inet addr: 10.0.0.200 Bcast: 10.20.255.255 Mask: 255.0.0.0
Inet addr: 192.168.0.200 Bcast: 192.158.0.255 Mask: 255.255.255.0
Inet addr: 127.0.0.1 Mask: 255.0.0.0
Tftp Server Configuration:
[Root @ yang ~] # Cd/tftpboot/
[Root @ yang tftpboot] # copy all files on the close disk to the directory cp-rv/mnt/isolinux /*. //
[Root @ yang tftpboot] # mkdir pxelinux. cfg // create a pxelinux. cfg directory, copy isolinux. cfg to the directory, and rename it as default
[Root @ yang tftpboot] # cp isolinux. cfg./pxelinux. cfg/default
[Root @ yang tftpboot] # cp/usr/lib/syslinux/pxelinux.0. // This file is the Boot Image
Start the tftp server and dhcp server, and set the auto-start upon startup:
[Root @ yang ~] # Service dhcpd start
Starting dhcpd: [OK]
[Root @ yang ~] # Chkconfig dhcpd on
[Root @ yang ~] # Chkconfig xinetd on
[Root @ yang ~] # Chkconfig tftp on
Configure the nfs server and start it:
[Root @ yang ~] # Cat/etc/exports
/Mnt 192.168.0.0/24 (ro, sync, no_root_squash) // The no_root_squash option indicates that if the root user accesses the NFS shared directory, the root permission is granted to the shared directory.
[Root @ yang ~] # Service portmap restart
Stopping portmap: [OK]
Starting portmap: [OK]
[Root @ yang ~] # Service nfs start
Starting NFS services: [OK]
Starting NFS quotas: [OK]
Starting NFS daemon: [OK]
Starting NFS mountd: [OK]
[Root @ yang ~] # Chkconfig portmap on
[Root @ yang ~] # Chkconfig nfs on