server端的安装:
1.zypper in tftp vsftpd nfs-kernel-server
2。配置dhcp部分:
vi /etc/dhcpd.conf
# this can explicitely be specified
#deny unknown-clients;
#allow booting;
#allow bootp;
option broadcast-address 192.168.1.255;
option domain-name "linux";
option domain-name-servers 210.21.196.6;
option routers 192.168.1.237;
# a minimal /etc/dhcpd.conf example
# at first, edit /etc/sysconfig/dhcpd to configure all network interfaces
# that the server should listen on (DHCPD_INTERFACE)
# if you don't use dynamical DNS updates:
#
# this statement is needed by dhcpd-3 needs at least this statement.
# you have to delete it for dhcpd-2, because it does not know it.
#
# if you want to use dynamical DNS updates, you should first read
# read /usr/share/doc/packages/dhcp-server/DDNS-howto.txt
ddns-update-style none;
ddns-updates off;
# this subnet is served by us
authoritative ;
max-lease-time 72000; # 1 week
default-lease-time 6000;
# these addresses will be given out dynamically
server-name "192.168.1.237";
#next-server 192.168.1.237;
filename "pxelinux.0";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.123 192.168.1.188;
default-lease-time 14400;
max-lease-time 172800;
}
host pxe-1{
hardware ethernet 44:37:E6:9B:6D:E3;
fixed-address 192.168.1.100;
}
#############################################################
修改配置文件/etc/sysconfig/dhcpd里面依赖的端口,设定一下。如:eth0
3.配置tftp部分
vi /etc/xinetd.d/tftp
# default: off
# description: tftp service is provided primarily for booting or when a \
# router need an upgrade. Most sites run this only on machines acting as
# "boot servers".
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
flags = IPv4
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
}
4.配置PXE下面的目录
ls /tftpboot/
/tftpboot/:
总计 21
drwxr-xr-x 5 root root 184 2008-09-25 09:59 .
drwxr-xr-x 25 root root 784 2008-09-25 15:24 ..
-rw-r--r-- 1 root root 523 2008-09-25 09:59 message ----from SuSE DVD //source/suse101/boot/i386/loader/message
-rw-r--r-- 1 root root 13148 2008-09-24 22:44 pxelinux.0 ----from /usr/share/syslinux/pxelinux.0
drwxr-xr-x 2 root root 72 2008-09-25 07:16 pxelinux.cfg ----mkdir
drwxr-xr-x 2 root root 96 2008-09-24 22:41 sles10 ----mkdir
/tftpboot/pxelinux.cfg:
总计 4
drwxr-xr-x 2 root root 72 2008-09-25 07:16 .
drwxr-xr-x 5 root root 184 2008-09-25 09:59 ..
-rw-r--r-- 1 root root 870 2008-09-25 07:12 default ----from SuSE DVD //source/suse101/boot/i386/loader/isolinux.cfg
/tftpboot/:
总计 9537
drwxr-xr-x 2 root root 96 2008-09-24 22:41 .
drwxr-xr-x 5 root root 184 2008-09-25 09:59 ..
-r--r--r-- 1 root root 8494631 2008-09-24 22:41 initrd ----from SuSE10 DVD //source/suse101/boot/i386/loader/
-r--r--r-- 1 root root 1258892 2008-09-24 22:41 linux ----from SuSE10 DVD //source/suse101/boot/i386/loader/
/tftpboot/config:
总计 36
drwxr-xr-x 2 root root 80 2008-09-25 13:51 .
drwxr-xr-x 6 root root 208 2008-09-25 13:50 ..
-rw-r--r-- 1 root root 33188 2008-09-25 13:51 autoinst.xml ---from command "yast2 autoyast" or edit root/autoinst.xml
############################################ 破烂的分割线 ############################################################
kook:/tftpboot # cat message (这个将是客户端的显示界面)
Welcome to SUSE Linux Enterprise Server 9 SP3 and Server 10 SP1 !!!!
0fTo start the installation enter 'sles10' and press <return>.07
Available boot options:
sles10 - Installation SuSE 10 SP1
sles9 - Installation SuSE 9 SP3
noacpi - Installation - ACPI Disabled
nolapic - Installation - nolapic
failsafe - Installation - Safe Settings
rescue - Rescue System
memtest - Memory Test
'noacpi' or 'failsafe' may be necessary on some tricky hardware.
Have a lot of fun...
############################################ 破烂的分割线 ############################################################
kook:/tftpboot # cat pxelinux.cfg/default
default sles10
display message
# sles10
label sles10
kernel /sles10/linux
append initrd=/sles10/initrd install=nfs://192.168.65.100/source/suse101 splash=silent showopts
# sles9
label sles9
kernel /sles9/linux
append initrd=/sles9/initrd install=nfs://192.168.65.100/source/suse903 splash=silent showopts
# noacpi
label noacpi
kernel linux
append initrd=initrd splash=silent showopts acpi=off
# nolapic
label nolapic
kernel linux
append initrd=initrd splash=silent showopts nolapic
# failsafe
label failsafe
kernel linux
append initrd=initrd splash=silent showopts apm=off acpi=off mce=off barrier=off ide=nodma idewait=50 i8042.nomux psmouse.proto=bare irqpoll pci=nommconf
# rescue
label rescue
kernel linux
append initrd=initrd splash=silent rescue=1 showopts
# memory test
label memtest
kernel memtest
prompt 1
timeout 600
implicit 0
5.配置nfs部分
编辑/etc/exports
vi /etc/exports
/source/suse101 *(fsid=0,ro,sync,root_squash)
/source/suse903 *(fsid=0,ro,sync,root_squash)
启动服务:
rcnfsserver start
rcxinetd start
rcdhcpd start
rcnfsserver start
rcvsftpd start
1.zypper in tftp vsftpd nfs-kernel-server
2。配置dhcp部分:
vi /etc/dhcpd.conf
# this can explicitely be specified
#deny unknown-clients;
#allow booting;
#allow bootp;
option broadcast-address 192.168.1.255;
option domain-name "linux";
option domain-name-servers 210.21.196.6;
option routers 192.168.1.237;
# a minimal /etc/dhcpd.conf example
# at first, edit /etc/sysconfig/dhcpd to configure all network interfaces
# that the server should listen on (DHCPD_INTERFACE)
# if you don't use dynamical DNS updates:
#
# this statement is needed by dhcpd-3 needs at least this statement.
# you have to delete it for dhcpd-2, because it does not know it.
#
# if you want to use dynamical DNS updates, you should first read
# read /usr/share/doc/packages/dhcp-server/DDNS-howto.txt
ddns-update-style none;
ddns-updates off;
# this subnet is served by us
authoritative ;
max-lease-time 72000; # 1 week
default-lease-time 6000;
# these addresses will be given out dynamically
server-name "192.168.1.237";
#next-server 192.168.1.237;
filename "pxelinux.0";
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.123 192.168.1.188;
default-lease-time 14400;
max-lease-time 172800;
}
host pxe-1{
hardware ethernet 44:37:E6:9B:6D:E3;
fixed-address 192.168.1.100;
}
#############################################################
修改配置文件/etc/sysconfig/dhcpd里面依赖的端口,设定一下。如:eth0
3.配置tftp部分
vi /etc/xinetd.d/tftp
# default: off
# description: tftp service is provided primarily for booting or when a \
# router need an upgrade. Most sites run this only on machines acting as
# "boot servers".
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
flags = IPv4
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
}
4.配置PXE下面的目录
ls /tftpboot/
/tftpboot/:
总计 21
drwxr-xr-x 5 root root 184 2008-09-25 09:59 .
drwxr-xr-x 25 root root 784 2008-09-25 15:24 ..
-rw-r--r-- 1 root root 523 2008-09-25 09:59 message ----from SuSE DVD //source/suse101/boot/i386/loader/message
-rw-r--r-- 1 root root 13148 2008-09-24 22:44 pxelinux.0 ----from /usr/share/syslinux/pxelinux.0
drwxr-xr-x 2 root root 72 2008-09-25 07:16 pxelinux.cfg ----mkdir
drwxr-xr-x 2 root root 96 2008-09-24 22:41 sles10 ----mkdir
/tftpboot/pxelinux.cfg:
总计 4
drwxr-xr-x 2 root root 72 2008-09-25 07:16 .
drwxr-xr-x 5 root root 184 2008-09-25 09:59 ..
-rw-r--r-- 1 root root 870 2008-09-25 07:12 default ----from SuSE DVD //source/suse101/boot/i386/loader/isolinux.cfg
/tftpboot/:
总计 9537
drwxr-xr-x 2 root root 96 2008-09-24 22:41 .
drwxr-xr-x 5 root root 184 2008-09-25 09:59 ..
-r--r--r-- 1 root root 8494631 2008-09-24 22:41 initrd ----from SuSE10 DVD //source/suse101/boot/i386/loader/
-r--r--r-- 1 root root 1258892 2008-09-24 22:41 linux ----from SuSE10 DVD //source/suse101/boot/i386/loader/
/tftpboot/config:
总计 36
drwxr-xr-x 2 root root 80 2008-09-25 13:51 .
drwxr-xr-x 6 root root 208 2008-09-25 13:50 ..
-rw-r--r-- 1 root root 33188 2008-09-25 13:51 autoinst.xml ---from command "yast2 autoyast" or edit root/autoinst.xml
############################################ 破烂的分割线 ############################################################
kook:/tftpboot # cat message (这个将是客户端的显示界面)
Welcome to SUSE Linux Enterprise Server 9 SP3 and Server 10 SP1 !!!!
0fTo start the installation enter 'sles10' and press <return>.07
Available boot options:
sles10 - Installation SuSE 10 SP1
sles9 - Installation SuSE 9 SP3
noacpi - Installation - ACPI Disabled
nolapic - Installation - nolapic
failsafe - Installation - Safe Settings
rescue - Rescue System
memtest - Memory Test
'noacpi' or 'failsafe' may be necessary on some tricky hardware.
Have a lot of fun...
############################################ 破烂的分割线 ############################################################
kook:/tftpboot # cat pxelinux.cfg/default
default sles10
display message
# sles10
label sles10
kernel /sles10/linux
append initrd=/sles10/initrd install=nfs://192.168.65.100/source/suse101 splash=silent showopts
# sles9
label sles9
kernel /sles9/linux
append initrd=/sles9/initrd install=nfs://192.168.65.100/source/suse903 splash=silent showopts
# noacpi
label noacpi
kernel linux
append initrd=initrd splash=silent showopts acpi=off
# nolapic
label nolapic
kernel linux
append initrd=initrd splash=silent showopts nolapic
# failsafe
label failsafe
kernel linux
append initrd=initrd splash=silent showopts apm=off acpi=off mce=off barrier=off ide=nodma idewait=50 i8042.nomux psmouse.proto=bare irqpoll pci=nommconf
# rescue
label rescue
kernel linux
append initrd=initrd splash=silent rescue=1 showopts
# memory test
label memtest
kernel memtest
prompt 1
timeout 600
implicit 0
5.配置nfs部分
编辑/etc/exports
vi /etc/exports
/source/suse101 *(fsid=0,ro,sync,root_squash)
/source/suse903 *(fsid=0,ro,sync,root_squash)
启动服务:
rcnfsserver start
rcxinetd start
rcdhcpd start
rcnfsserver start
rcvsftpd start