[root@ localhost Server]# rpm -ivh dhcp-3.0.5-13.el5.i386.rpm[root@ localhost Server]# rpm -ivh tftp-server-0.42-3.1.i386.rpm
[root@localhost ~]# si_mkbootserverWARNING: this script may modify the following files:--> /etc/services--> /etc/inetd.conf--> /etc/xinetd.d/tftpAnd can restart inetd, xinetd or tftp servers.Do you wish to continue (y/[n])? yOk, continuing...Checking for a tftp server... found.Checking if tftp server is H. Peter Anvin's tftp server... yup - right on !Checking for a running inetd... Not found.Checking for a running xinetd... 16428.Looking for update -inetd... not found.Backing up /etc/xinetd.d/tftp...Moving /etc/xinetd.d/tftp to /etc/xinetd.d/tftp.si_mkbootserver.bak0...done.Restaring xinetd ...Stopping xinetd: [ OK ]Starting xinetd: [ OK ]done.Looking for a tftp client... found.Checking for loopback interface... up.Does tftp server work ... yes.Looking for a pxe daemon... which: no pxe in (/usr/ local /sbin:/usr/ local /bin:/sbin:/bin:/usr/sbin:/usr/bin)not found.
WARNING: your bootserver will be configured without a pxe daemon!( ignore this warning if you're using a recent distro)done.What is the path to the pxelinux bootloader [/usr/lib/syslinux/pxelinux.0]? #直接回车Copying /usr/lib/syslinux/pxelinux.0 to /var/lib/tftpboot/X86PC/UNDI/linux-install/linux.0 ... done.Linking /var/lib/tftpboot/pxelinux.bin to /var/lib/tftpboot/X86PC/UNDI/linux-install/linux.0 ...done.Copying /var/lib/tftpboot/X86PC/UNDI/linux-install/pxelinux.cfg to /var/lib/tftpboot/pxelinux.cfg...Ok, configuration complete.
Once you're DHCP server is configured, you should be all set.Do you want to run si_mkdhcpserver to configure your DHCP server ([y]/n)? y 输入“y”Welcome to the SystemImager "si_mkdhcpserver" command. This command willprepare this computer to be a DHCP server by creating a dhcpd.conf filefor use with your ISC DHCP server (v2 or v3).If there is an existing file, it will be backed up with the.beforesystemimager extension.Continue ? (y/[n]): y
Trying to probe your DNS domain. Please wait...Type your response or hit <Enter> to accept [defaults]. If you don'thave a response, such as no first or second DNS server, just hit<Enter> and none will be used.What is your DHCP daemon major version number (2 or 3)? [3]:What is the name of your DHCP daemon config file? [/etc/dhcpd.conf]:What is your domain name ? [localdomain]:What is your network number? [192.168.1.0]: 172.16.0.0What is your netmask? [255.255.0.0]:What is the starting IP address for your dhcp range? [172.16.0.1]: 172.16.0.11What is the ending IP address for your dhcp range? [172.16.255.254]: 172.16.0.200What is the IP address of your first DNS server? []:What is the IP address of your default gateway? [172.16.255.254]: 172.16.0.1What is the IP address of your image server? [172.16.255.254]: 172.16.0.10What is the IP address of your boot server? [172.16.255.254]: 172.16.0.10What is the IP address of your log server? []:Use tmpfs staging on client? (If unsure, choose "n" ) [n]:Do you want to use Flamethrower (multicast) to install your clients? [n]:What... is the air-speed velocity of an unladen swallow? []:Wrong!!! ( with a Monty Python(TM) accent...)Press <Enter> to continue ...
Ahh, but seriously folks...Here are the values you have chosen:#######################################################################ISC DHCP daemon version: 3ISC DHCP daemon config file: /etc/dhcpd.confDNS domain name : localdomainNetwork number: 172.16.0.0Netmask: 255.255.0.0Starting IP address for your DHCP range: 172.16.0.11Ending IP address for your DHCP range: 172.16.0.200First DNS server:Second DNS server:Third DNS server:Default gateway: []Image server: 172.16.0.10Boot server: 172.16.0.10Log server:Log server port:Flamethrower directory port:Use tmpfs staging on client: nSSH files download URL:#######################################################################Are you satisfied? (y/[n]): y
The dhcp server configuration file (/etc/dhcpd.conf) file has beencreated for you. Please verify it for accuracy.If this file does not look satisfactory, you can run this command againto re- create it: "si_mkdhcpserver"WARNING!: If you have multiple physical network interfaces, be sure toedit the init script that starts dhcpd to specify the interface thatis connected to your DHCP clients. Here's an example:Change "/usr/sbin/dhcpd" to "/usr/sbin/dhcpd eth1" .Depending on your distribution, you may be able to set this with the"INTERFACES" variable in "/etc/default/dhcp" , "/etc/default/dhcp3-server" ,or similar, or in your dhcpd initialization script ( "/etc/init.d/dhcpd" ,"/etc/init.d/dhcp3-server" , or similar).Also, be sure to start or restart your dhcpd daemon. This can usuallybe done with a command like "/etc/init.d/dhcpd restart" or similar.Would you like me to restart your DHCP server software now? (y/[n]): yStarting dhcpd: [ok]
[root@localhost ~]# si_addclientsWelcome to the SystemImager "si_addclients" utility--------------------------------------------------------------------------------This utility has 3 sections."Section 1" will ask you for your hostname information."Section 2" will allow you to create softlinks from each client hostname toyour "master" script in the "/var/lib/systemimager/scripts" directory.Example: www297.sh -> web_server_image_v1.master"Section 3" will ask you for IP address information that will be combinedwith the hostname information provided in Section 1 to create entries in"/etc/hosts" for each of these same clients. New entries will be appendedto the end of "/etc/hosts" . If you specify new hostnames for existing IPaddresses, those entries will be re-written in place to reflect the newhost names.Continue ? ([y]/n): y #输入“y”,继续。
si_addclients -- Section 1 (hostname information)--------------------------------------------------------------------------------The next series of questions will be used to create a range of hostnames.You will be asked for your domain name , the base host name , a beginningnumber, and an ending number.For example, if you answer:domain name = systemimager.orghost range = www7-www11,www20Then the result will be a series of hostnames that looks like this:www7.systemimager.orgwww8.systemimager.orgwww9.systemimager.orgwww10.systemimager.orgwww11.systemimager.orgwww20.systemimager.orgWhat is your domain name ? []: vfast.comWhat is the hosts range that you want me to use? []: node11-node200I will work with hostnames: node11-node200in the domain: vfast.comAre you satisfied? (y/[n]): y
si_addclients -- Section 2 (soft links to master script)--------------------------------------------------------------------------------Would you like me to create soft links to a "master" script so that hosts:node11-node200can be autoinstalled with one of the available images? ([y]/n): yHere is a list of available autoinstall scripts:vfast_backupWhich script would you like these hosts to be installed with ?[vfast_backup]:Your soft links have been created.Press <Enter> to continue ...
si_addclients -- Section 3 (adding or modifying /etc/hosts entries)--------------------------------------------------------------------------------Your target machines need to be able to determine their host names from theirIP addresses, unless their host name is specified in a local .cfg file.The preferred method for doing this is with DNS. If you have a working DNSthat has IP address to hostname resolution properly configured for yourtarget machines, then answer "n" here.If you don't have a working DNS, or you want to override the information inDNS, then answer "y" here to add entries to the "/etc/hosts" file on yourimage server. After adding these entries, the /etc/hosts file will becopied to "/var/lib/systemimager/scripts" where it can be retrieved by yourtarget machines.I will ask you for your clients' IP addresses one subnet at a time .Would you like me to continue ? (y/[n]): ysi_addclients -- Section 3 (adding or modifying /etc/hosts entries -- continued...)--------------------------------------------------------------------------------Hostnames range is : node11-node200What is the IPs address range (e.g. 10.0.0.1-10.0.0.100,10.0.0.101)?[]: 172.16.0.11-172.16.0.200I will work with IP addresses: 172.16.0.11-172.16.0.200and hostnames: node11-node200Are you satisfied? (y/[n]): yUse of uninitialized value in concatenation (.) or string at /usr/sbin/si_addclients line 552.These entries have been added to /etc/hosts, and /etc/hosts has been copiedto /var/lib/systemimager/scripts for use by your auto-install clients.Press <Enter> to continue ...si_addclients: successfully completed.
[root@localhost ~]# si_mkclientnetboot --netboot --clients node11-node200[netboot] using the kernel and initrd.img for architecture: i386[netboot] using the flavor: standard[root@localhost ~]#
[root@localhost ~]# /etc/init.d/systemimager-server-rsyncd startStarting rsync daemon for systemimager: already running.[root@localhost ~]# chkconfig systemimager-server-rsyncd on[root@localhost ~]# chkconfig dhcpd on[root@localhost ~]# chkconfig xinetd on
本文出自 “学习吧!Linux” 博客,谢绝转载!