国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux無盤工作站架設實例

2020-10-28 19:00:06
字體:
來源:轉載
供稿:網友

摘要 
架設Linux無盤工作站實例,服務器和客戶端都使用Linux。主要涉及:DHCP TFTP SYSLINUX NFS(2003-03-12 08:52:24) 

-------------------------------------------------------------------------------------- 


客戶端是支持PXE方式啟動的刀片,用Linux作為服務器,服務器配置如下: 


1) 安裝DHCP服務器dhcpd 


2) 配置/etc/dhcpd.conf文件,下面是我機器上的文件 


max-lease-time -1; 
default-lease-time -1; #注:IP地址永不過期 
option subnet-mask 255.0.0.0; 
option routers 10.0.0.1; 
option domain-name-servers 10.10.10.10; 
# option netbios-name-servers 10.10.10.10; 
option broadcast-address 10.255.255.255; 
# option dhcp-class-identifier "PXEClient"; 
# option vendor-encapsulated-options 01:04:00:00:00:00:ff; 
# option option-135 "start"; 

subnet 10.0.0.0 netmask 255.0.0.0 { 
range 10.10.12.131 10.10.12.150; 

host blade01 { 
hardware ethernet 00:e0:43:00:02:00; 
fixed-address 10.10.12.131; 
filename "/tftpboot/pxelinux.0"; #注:啟動映象文件 


host blade02 { 
hardware ethernet 00:e0:43:00:02:02; 
fixed-address 10.10.12.132; 
filename "/tftpboot/pxelinux.0"; 


host blade03 { 
hardware ethernet 00:e0:43:00:02:04; 
fixed-address 10.10.12.133; 
filename "/tftpboot/pxelinux.0"; 


host blade04 { 
hardware ethernet 00:e0:43:00:02:06; 
fixed-address 10.10.12.134; 
filename "/tftpboot/pxelinux.0"; 


host blade05 { 
hardware ethernet 00:e0:43:00:02:08; 
fixed-address 10.10.12.135; 
filename "/tftpboot/pxelinux.0"; 




說明:dhcp客戶得到IP地址后用TFTP協議從服務器上下載啟動映象文件。我用syslinux 

工具包里邊的pxelinux來作為遠程啟動的loder. 

3) 配置tftp server 

使用pxelinux作引導工具需要支持TSIZE參數的tftp server。可從http://www.kernel.org/pub/software/network/tftp/下載。 

通過xinetd來使用tftp服務,我的/etc/xinetd.conf文件如下 


...... 
service tftp 

socket_type = dgram 
protocol = udp 
wait = yes 
user = root 
server = /usr/sbin/in.tftpd 



4) 配置PXELINUX 

先安裝syslinux軟件包。可從http://www.kernel.org/pub/linux/utils/boot/syslinux/下載。 

將pxelinux.0拷貝到/tftpboot/目錄下,然后建立/tftpboot/syslinux.cfg/目錄。該目錄下存放配置文件。 

pxelinux使用ip地址的十六進制表示來作為該ip地址的配置文件的文件名。如blade01的 

ip地址為10.10.12.131,配置文件名為0A0A0C83,內容為: 


default linux 

label linux 
kernel vmlinuz 
append ip=dhcp root=/dev/nfsroot nfsroot=10.10.11.120:/remote/blade01 vga=normal 


5) 配置nfs 

為每個刀片建立一個根目錄,在該刀片的pxelinux配置文件里指定了從這個nfs export的目錄啟動。 

該根目錄里應把標準的目錄都建好,另外需要重新mount的usr, home, public等目錄也要export。 

我的 /etc/exports文件: 


# /etc/exports: the access control list for filesystems which may be exported 
# to NFS clients. See exports(5). 

/remote/blade01 blade01(rw,async,no_root_squash) 
/remote/blade02 blade02(rw,async,no_root_squash) 
/remote/blade03 blade03(rw,async,no_root_squash) 
/remote/blade04 blade04(rw,async,no_root_squash) 
/remote/blade05 blade05(rw,async,no_root_squash) 
/remote/root *(rw,async,no_root_squash) 
/remote/home *(rw,async,no_root_squash) 
/usr *(ro,async,no_root_squash) 
/sbin *(ro,async,no_root_squash) 
/bin *(ro,async,no_root_squash) 
/lib *(ro,async,no_root_squash) 
/home *(ro,async,no_root_squash) 


6)為每個刀片修改它的/etc/fstab文件,以blade01為例,它的nfs root是/remote/blade01 
/remote/blade01/etc/fstab文件如下: 
# /etc/fstab: static file system information. 


10.10.11.120:/remote/blade01 / nfs defaults,intr 0 1 
10.10.11.120:/remote/root /root nfs defaults,intr 0 1 
10.10.11.120:/remote/home /home nfs defaults,intr 0 1 
10.10.11.120:/bin /bin nfs defaults,intr 0 1 
10.10.11.120:/usr /usr nfs defaults,intr 0 1 
10.10.11.120:/sbin /sbin nfs defaults,intr 0 1 
10.10.11.120:/lib /lib nfs defaults,intr 0 1 
none /proc proc defaults,intr 0 1 


同時還要為每個刀片修改它的網絡配置文件,配置ip地址,啟動兩塊網卡等等。。 

7) 編譯內核 

刀片用的內核,應該支持Kernel Level Auto Configuration的DHCP協議,支持NFS,支持NFS ROOT, 

假設編譯好的內核為vmlinuz,將它拷貝到/tftpboot/目錄下。 

參考文檔: 

http://syslinux.zytor.com/pxe.php 
http://syslinux.zytor.com/faq.php 
http://www.cn-cio.org/xx/show.php?article_id=1680 
http://www-900.ibm.com/developerWorks/cn/linux/l-tip-prompt/l-pex/index.shtml 
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 湟源县| 长岛县| 鲁山县| 蕲春县| 金昌市| 乐昌市| 广昌县| 应用必备| 洱源县| 焉耆| 中江县| 屯昌县| 中宁县| 舒兰市| 靖州| 铁岭县| 延庆县| 荔波县| 盐亭县| 花垣县| 济宁市| 志丹县| 唐海县| 潜江市| 连南| 广宗县| 马鞍山市| 邢台县| 珲春市| 大埔县| 台山市| 泗水县| 稷山县| 江华| 南溪县| 辰溪县| 大悟县| 桃园市| 巴塘县| 保定市| 囊谦县|