linux网络安装



 



pxe安装首先需要机器可以支持(pxe),(boot)



对此需要安装server, ftp,yum,dhcp,tftp等服务器;



首先挂在光盘:  mount /dev/cdrom /mnt/cdrom/



进到 cd /mnt/cdrom/Server目录下



再次之前可以查看一下vsftp包安装了没有,如没有安装在进行安装,如下说明没有安装



[root@server Server]# rpm -qa |grep vsftp



[root@server Server]#



安装 vsftp包: rpm –ivh vsftp*



[root@server Server]# rpm -ivh vsftp*



warning: vsftpd-2.0.5-12.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186



Preparing...                ########################################### [100%]



   1:vsftpd                 ########################################### [100%]



如此说明已经安装,



[root@server ~]# mount /dev/cdrom /mnt/cdrom/



[root@server ~]# cd /mnt/cdrom/Server



[root@server Server]# rpm -qa |grep vsftp



[root@server Server]# rpm -ivh vsftp*



 



ftp(安装用的源文件) 首先在ftp下建一个库用来存放源文件



ftp在var目录下所以进到 [root@server ~]# cd /var/ftp



在这个目录下有一个pub目录   进到这个目录下



把/mnt/cdrom下的文件全部拷到该目录下  



[root@server pub]# cp /mnt/cdrom/. ./



 



yum服务器



在/etc/yum.repos.d/有一个文件rhel-debuginfo.repo 把它里面的内容拷到server.repo里



[root@server yum.repos.d]# cp rhel-debuginfo.repo server.repo



然后对server.repo进行编辑[root@server yum.repos.d]# vim server.repo



在未编辑之前如下图:



linux不联网安装wireshark_开发工具



对这六行进行复制,向下进行三次粘贴  



然后进行修改,修改后如下图:



 



linux不联网安装wireshark_linux_02



file:///mnt/cdrom改为 ftp://192.168.100.27/pub就可以



完成后测试ftp可用不可用,如下图:



linux不联网安装wireshark_网络_03



如上图说明可以用。



 



Tftp服务器



在装之前先搜索一下看tftp包安装了没有,



[root@server ~]# yum list |grep tftp



Failed to set locale, defaulting to C



This system is not registered with RHN.



RHN support will be disabled.



tftp-server.i386                        0.42-3.1              installed         



tftp.i386                               0.42-3.1              rhel-Server       



这个说明我的已经安装,如果没有安装,执行下列命令;



[root@server ~]#yum install tftp*     如果提示y/n选y



之后开始编写文件tftp脚本tftp是在/etc/xinetd.d/下如:



[root@server ~]# vi /etc/xinetd.d/tftp



# default: off



# description: The tftp server serves files using the trivial file transfer \



#        protocol. The tftp protocol is often used to boot diskless \



#        workstations, download configuration files to network-aware printers, \



#        and to start the installation process for some operating systems.



service tftp



{



        socket_type             = dgram



        protocol                = udp



        wait                    = yes



        user                    = root



        server                  = /usr/sbin/in.tftpd



        server_args             = -s /tftpboot



        disable                 = no



        per_source              = 11



        cps                     = 100 2



        flags                   = IPv4



}



~    



进去之后把disable这一项改为no



然后进入根目录                       [root@server ~]# cd ..



在该目录里有一个tftpboot目录



进入到该目录里                       [root@server /]# cd tftpboot/



[root@server tftpboot]# ll



total 8



drwxr-xr-x 4 root root 4096 Aug 25 01:14 linux-install



[root@server tftpboot]#



在此目录下需要创建一个目录 pxelinux.cfp [root@server tftpboot]# mkdir pxelinux.cfg



安装系统时还需要一些文件如:pxelinux.0 initrd.img vmlinuz



所以需要把这些考到该目录下:



[root@server tftpboot]# cp /usr/lib/syslinux/pxelinux.0  ./



[root@server tftpboot]# cp /mnt/cdrom/p_w_picpaths/pxeboot/initrd.img ./



[root@server tftpboot]# cp /mnt/cdrom/p_w_picpaths/pxeboot/vmlinuz ./



[root@server tftpboot]# cp /mnt/cdrom/isolinux/isolinux.cfg pxelinux.cfg/default



 



再次我们还要编辑一个文件就是pxelinux.cfg/default这个文件



[root@server tftpboot]# vi pxelinux.cfg/default



default linux



prompt 1



10



display boot.msg



F1 boot.msg



F2 options.msg



F3 general.msg



F4 param.msg



F5 rescue.msg



label linux



 kernel vmlinuz



ks=ftp://192.168.100.37/pub/ks.cfg ksdevice=eth0



label text



 kernel vmlinuz



 append initrd=initrd.img text



label ks



 kernel vmlinuz



 append ks initrd=initrd.img



label local



 localboot 1



label memtest86



 kernel memtest



 append -



红色为修改的部分,修改之后保存。



 



Dhcp服务器



同样需要安装dhcp包如下:



[root@server ~]#yum install dhcp



安装之后需要编写dhcpd.conf 这个文件在/etc下



[root@server ~]# vi /etc/dhcpd.conf                   进去之后是:



#



# DHCP Server Configuration file.



#    see /usr/share/doc/dhcp*/dhcpd.conf.sample



#



它说看see /usr/share/doc/dhcp*/dhcpd.conf.sample这个文件所以 进这个文件:



 



linux不联网安装wireshark_linux不联网安装wireshark_04



 



进去之后如图:



 



linux不联网安装wireshark_开发工具_05



需要把它修改为:



 



linux不联网安装wireshark_操作系统_06



进行到这里基本上差不多了,然后再安装一个软件包



 



[root@server Server]# yum install system-config-kickstart-2.6.19.8-2.el5.noarch.rpm



然后把服务器都启动起来:



 



linux不联网安装wireshark_网络_07



然后再图形界面下执行system-config-kickstart



 



linux不联网安装wireshark_操作系统_08



会出现如下图:



 



linux不联网安装wireshark_开发工具_09



然后根据自己的需要选择需要安装的条目如下图:



 



linux不联网安装wireshark_操作系统_10

 

 

linux不联网安装wireshark_linux不联网安装wireshark_11

 

linux不联网安装wireshark_linux_12

 

linux不联网安装wireshark_网络_13

 

linux不联网安装wireshark_linux不联网安装wireshark_14

 

linux不联网安装wireshark_网络_15



 



linux不联网安装wireshark_网络_16



 



linux不联网安装wireshark_linux_17



 



linux不联网安装wireshark_操作系统_18



 



linux不联网安装wireshark_linux_19



 



linux不联网安装wireshark_操作系统_20



这是本人在本机上使用虚拟机安装的所以选择如下:



 



linux不联网安装wireshark_linux不联网安装wireshark_21



 



linux不联网安装wireshark_网络_22



设置完成后安装如下:



 



linux不联网安装wireshark_操作系统_23



 



linux不联网安装wireshark_操作系统_24



 



linux不联网安装wireshark_开发工具_25



 



linux不联网安装wireshark_linux_26



 



linux不联网安装wireshark_linux不联网安装wireshark_27



如此说明安装已经完成!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!