linux网络如何安装,Linux网络安装全过程

《Linux网络安装全过程》由会员分享,可在线阅读,更多相关《Linux网络安装全过程(8页珍藏版)》请在人人文库网上搜索。

1、linux下网络安装需具备3个条件:1.dhcp服务器:用于客户端引导时分配IP地址2.ftp、nfs、httpd服务器:用于保存操作系统的rpm包3.tftp服务器:用于客户端的tftp引导。我的方案是DHCP+NFS+TFTP配置步骤:1、DHCP首先,查看DHCP是否安装 rpm -qa|grep dhcpd,如果没有安装进入光盘,Rehat/RPMS/下,查找ls dhcp*然后安装rpm -ivh dhcp*注意:如果安装时,提示警告,意思是说key文件,需要你导入key,这个key文件在光盘的根目录下。rpm -import RPM-GPG-KEY 命令导入,安装完毕后,对DHCP。

2、的主配置文件进行配置。DHCP服务的配置文件是/etc/dhcpd.conf,初始安装该配置文件为空,将/usr/share/doc/dhcp-3.0pl2/dhcpd.conf.sample拷贝到/etc下并改名为dhcpd.conf进行配置: 根据你个人的要求修改IP地址及IP地址池。注意,必须加入:allow bootp;(必须有分号)allow booting;以及filename /linux-install/pxelinux.0如下:ddns-update-style interim;ignore client-updates;allow booting;allow bootp;s。

3、ubnet 192.168.3.0 netmask 255.255.255.0 option routers 192.168.3.1;option subnet-mask 255.255.255.0;option domain-name domain.org;option domain-name-servers 202.96.128.66;option time-offset -18000; # Eastern Standard Timerange dynamic-bootp 192.168.3.2 192.168.3.100;filename /linux-install/pxelinux.。

4、0; 用来指定tftp根目录的启动文件。default-lease-time 21600;max-lease-time 43200;2、NFS首先看是否安装,方法同上,rootlocalhost /# rpm -qa |grep nfsnfs-utils-1.0.6-70.EL4system-config-nfs-1.2.8-1nfs-utils-lib-1.0.6-3如果没有安装,则rpm -ivh nfs*然装完后,对nfs 进行配置,配置文件 vi /etc/exports,在文件中加入/linuxos *(ro,sync) linuxos为NFS的目录,用来存放操作系统/tftproo。

5、t/linux-install *(ro,sync)3、TFTP首先安装tftp,rpm -ivh tftp*TFTP服务的配置文件是/etc/xinetd.d/tftp,RedHat默认安装已经生成了该文件 service tftp disable = no socket_type = dgram protocol = udp wait = yes user = root server = /usr/sbin/in.tftpd server_args = -s /tftpboot per_source = 11 cps = 100 2 flags = IPv4 这里将 /tftpboot 定。

6、义为 tftp 服务的默认目录,您可以自行修改。保存之后重启 /etc/init.d/xinetd 服务,即可开启 tftp 服务。mkdir /tftpbootmkdir /tftpboot/linux-install如何测试 tftp 是否成功开启?在 tftp 目录下创建一个文件,比如 1.txt 。在 Shell 中连接 tftp 服务:tftp 127.0.0.1tftpget 1.txt若服务成功开启,则能看到成功下载文件的提示。并在当前目录下找到1.txt文件。如果希望同事可以有多个操作系统进行选择安装则可以在linuxos目录下再建立多个操作系统的目录,例如:rhle-4-as。

7、,rhle-5-as此时,注意,如果不会手工配置,可以用图形工具。查看是否安装了redhat-config-netboot RPM 软件包,如果没有安装,则安装,rpm -ivh redhat-config-netboot输入redhat-config-netboot若首次启动网络引导工具,从首次指南中选择网络安装。否则,从拉下菜单中选择配置 = 网络安装,然后点击添加。所示的对话框就会出现。点击了确定后,引导安装程序所必需的 initrd.img 和 vmlinuz 文件从所提供的安装树的 images/pxeboot/ 中被传输到 tftp 服务器(你运行网络引导工具的那一个)上的 /tf。

8、tpboot/linux-install/rhle-4-as/ 目录中也可以用pxeos来进行配置rootlocalhost linux-install# lspxelinux.0 pxelinux.cfg rhel-4-as rhel-5-as rootlocalhost linux-install# cd pxelinux.cfg/rootlocalhost pxelinux.cfg# lsdefault pxeos.xmlrootlocalhost pxelinux.cfg# vi pxeos.xml如果是是要多种版本的linux选择性安装,可以编辑vi /tftpboot/linux-。

9、install/pxelinux.cfg/defaultroothost1 # vi /tftpboot/linux-install/pxelinux.cfg/defaultdefault local timeout 600prompt 1display msgs/boot.msg 启动选择的菜单F1 msgs/boot.msgF2 msgs/general.msgF3 msgs/expert.msgF4 msgs/param.msgF5 msgs/rescue.msgF7 msgs/snake.msglabel locallocalboot 1label 0localboot 1label 1kernel centos/vmlinuzappend initrd=centos/initrd.img ramdisk_size=6801 method=nfs:192.168.10.232:/linuxos/centos ip=dhcplabel 2kernel rhel-4-as/vmlinuzappend initrd=rhel-4-as/initrd.img ramdisk_size=7000 method=nfs:192.168.10.232:/linuxos/rhel-4-as ip=dhcp至此,试验成功。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值