




版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、概述本文以Redhat6.5为基础,通过配置网络安装服务器,实现Redhat Linux的网络安装。主要用到的软件(服务)有DHCP,TFTP,NFS,Kickstart等。本文只列出具体步骤,不含原理说明。1. 基础配置1.1 更改IP地址rootlocalhost # vi /etc/sysconfig/network-scripts/ifcfg-eth0rootlocalhost # cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0HWADDR=08:00:27:53:44:fbTYPE=EthernetUUID=82af
2、feef-922e-40b2-b89f-a5df8e9fa236ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=noneIPADDR=0NETMASK=GATEWAY=IPV6INIT=noUSERCTL=norootlocalhost # ifup eth0Active connection state: activatedActive connection path: /org/freedesktop/NetworkManager/ActiveConnection/11.2 更改hostnmer
3、ootlocalhost # vi /etc/sysconfig/networkrootredhatnis # cat /etc/sysconfig/networkNETWORKING=yesHOSTNAME=redhatnisrootlocalhost # vi /etc/hostsrootlocalhost # cat /etc/hosts localhost localhost.localdomain localhost4 localhost4.localdomain4:1 localhost localhost.localdomain localhost6 local
4、host6.localdomain60 redhatnis1.3 关闭SELINUX及防火墙(iptables)rootlocalhost # vi /etc/selinux/configrootredhatnis # cat /etc/selinux/config |grep disa#disabled - SELinux is fully disabled.SELINUX=disabledrootlocalhost # chkconfig |grep iptaiptables 0:off1:off2:on3:on4:on5:on6:offrootlocalhost #
5、 chkconfig -level 2345 iptables offrootlocalhost # shutdown -ry 02. 软件安装122.1 挂载安装光盘rootredhatnis # mount /dev/sr0 /mntmount: block device /dev/sr0 is write-protected, mounting read-onlyrootredhatnis # df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_root-lv_root 20G 6.2G 12G 35% /tmpfs
6、 940M 72K 940M 1% /dev/shm/dev/sda1 485M 39M 421M 9% /boot/dev/sr0 3.6G 3.6G 0 100% /mnt2.2 配置YUM源rootredhatnis # cd /etc/yum.repos.drootredhatnis yum.repos.d# vi installmedia.reporootredhatnis yum.repos.d# cat installmedia.repo InstallMedianame=Red Hat Enterprise Linux 6.5baseurl=file:/mnt/Serveren
7、abled=1gpgcheck=0rootredhatnis yum.repos.d# yum listLoaded plugins: product-id, refresh-packagekit, security, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.InstallMedia | 3.9 kB 00:00 . Installed PackagesConsoleKit.
8、x86_64 0.4.1-3.el6 anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.52.3 安装所需软件rootredhatnis # yum install -y -q xinetd tftp tftp-server ftp vsftpd dhcp nfs-utilsThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.3. 配置DHCP Serverrootred
9、hatnis # cd /etc/dhcprootredhatnis dhcp# vi dhcpd.conf rootredhatnis dhcp# cat dhcpd.conf # DHCP Server Configuration file.# see /usr/share/doc/dhcp*/dhcpd.conf.sample# see 'man 5 dhcpd.conf'#allow booting;allow bootp;#Boot 所需文件filename "pxelinux.0"#TFTP服务器IP next-server 192.168.7.
10、30; subnet netmask option subnet-mask ;#IP地址范围range 1 00; default-lease-time 21600;max-lease-time 43200;rootredhatnis dhcp# service dhcpd startStarting dhcpd: OK rootredhatnis dhcp# chkconfig -level 345 dhcpd onrootredhatnis dhcp# chkconfig
11、 |grep dhcpddhcpd 0:off1:off2:off3:on4:on5:on6:off4. 通过FTP(vsftpd)方式上传ISO镜像rootredhatnis # cd /etc/vsftpd/rootredhatnis vsftpd# vi ftpusersrootredhatnis vsftpd# cat ftpusers |grep root#rootrootredhatnis vsftpd# vi user_listrootredhatnis vsftpd# cat user_list |grep root#rootrootredhatnis # service vs
12、ftpd startStarting vsftpd for vsftpd: OK rootredhatnis # chkconfig -level 345 vsftpd on此处上传ISO镜像rootredhatnis # ll /tmp |grep iso-rw-r-r- 1 root root 3853516800 Feb 16 08:40 rhel-server-6.5-x86_64-dvd.iso5. 配置NFSrootredhatnis # mkdir /isorootredhatnis # mv /tmp/rhel-server-6.5-x86_64-dvd.iso /isoroo
13、tredhatnis # vi /etc/exports rootredhatnis # cat /etc/exports /iso *(ro)/mnt *(ro)rootredhatnis # service rpcbind statusrpcbind (pid 931) is running.rootredhatnis # service rpcidmapd statusrpc.idmapd (pid 1435) is running.rootredhatnis # service nfs startStarting NFS services: OK Starting NFS quotas
14、: OK Starting NFS mountd: OK Starting NFS daemon: OK Starting RPC idmapd: OK rootredhatnis # showmount -eExport list for redhatnis:/mnt */iso *rootredhatnis # chkconfig -level 345 nfs onrootredhatnis # chkconfig |grep nfsnfs 0:off1:off2:off3:on4:on5:on6:off6. 配置TFTP Serverrootredhatnis # mkdir /tftp
15、bootrootredhatnis # vi /etc/xinetd.d/tftprootredhatnis # cat /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,
16、#and to start the installation process for some operating systems.service tftpsocket_type= dgramprotocol= udpwait= yesuser= rootserver= /usr/sbin/in.tftpdserver_args= -s /tftpbootdisable= noper_source= 11cps= 100 2flags= IPv47. 复制相关文件rootredhatnis # mount -t iso9660 -o loop,ro /iso/rhel-server-6.5-x
17、86_64-dvd.iso /mntrootredhatnis # cp -pr /mnt/images /isorootredhatnis # cp -pr /mnt/Packages/syslinux-4.02-8.el6.x86_64.rpm /isorootredhatnis # ll /isototal 3764068dr-xr-xr-x 3 root root 4096 Nov 12 2013 images-rw-r-r- 1 root root 3853516800 Feb 16 14:10 rhel-server-6.5-x86_64-dvd.iso-r-r-r- 1 root
18、 root 879224 Jan 4 2013 syslinux-4.02-8.el6.x86_64.rpm rootredhatnis # ll /iso/images/total 185548-r-r-r- 1 root root 380928 Nov 12 2013 efiboot.img-r-r-r- 1 root root 37976064 Nov 12 2013 efidisk.img-r-r-r- 1 root root 145731584 Nov 12 2013 install.img-r-r-r- 1 root root 5898240 Nov 12 2013 product
19、.imgrootredhatnis # cd /isorootredhatnis iso# rpm2cpio syslinux-4.02-8.el6.x86_64.rpm |cpio -dimvrootredhatnis iso# lsimages rhel-server-6.5-x86_64-dvd.iso syslinux-4.02-8.el6.x86_64.rpm usrrootredhatnis iso# cp ./usr/share/syslinux/pxelinux.0 /tftpbootrootredhatnis iso# cp ./images/pxeboot/vmlinuz,
20、initrd.img /tftpbootrootredhatnis iso# cd /tftpboot/rootredhatnis tftpboot# cp /boot/grub/splash.xpm.gz ./8. 创建default文件rootredhatnis tftpboot# mkdir pxelinux.cfgrootredhatnis tftpboot# cd pxelinux.cfgrootredhatnis pxelinux.cfg# cp /mnt/isolinux/isolinux.cfg ./defaultrootredhatnis pxelinux.cfg# vi d
21、efaultrootredhatnis pxelinux.cfg# cat default default linuxprompt 1timeout 60menu background splash.jpgmenu title Welcome to Red Hat Enterprise Linux 6.5!menu color border 0 #ffffffff #00000000menu color sel 7 #ffffffff #ff000000menu color title 0 #ffffffff #00000000menu color tabmsg 0 #ffffffff #00
22、000000menu color unsel 0 #ffffffff #00000000menu color hotsel 0 #ff000000 #ffffffffmenu color hotkey 7 #ffffffff #ff000000menu color scrollbar 0 #ffffffff #00000000label linux menu label Install or upgrade an existing system menu default kernel vmlinuz append ks=nfs:0:/iso/ks.cfg initrd=i
23、nitrd.imglabel vesa menu label Install system with basic video driver kernel vmlinuz append initrd=initrd.img xdriver=vesa nomodesetlabel rescue menu label Rescue installed system kernel vmlinuz append initrd=initrd.img rescuelabel local menu label Boot from local drive localboot 0xfffflabel memtest
24、86 menu label Memory test kernel memtest append -rootredhatnis pxelinux.cfg# cd .rootredhatnis tftpboot# lltotal 36676-r-r-r- 1 root root 33383449 Feb 16 15:07 initrd.img-rw-r-r- 1 root root 26828 Feb 16 14:59 pxelinux.0drwxr-xr-x 2 root root 4096 Feb 16 15:04 pxelinux.cfg-rw-r-r- 1 root root 1341 F
25、eb 16 15:06 splash.xpm.gz-r-xr-xr-x 1 root root 4128944 Feb 16 15:07 vmlinuz9. 创建Kickstart 配置文件系统安装完后会在/root下生产anaconda-ks.cfg文件,也可以通过Kickstart Configurator软件来配置生成该文件。rootredhatnis iso# vi ks.cfgrootredhatnis iso# cat ks.cfg#platform=x86, AMD64, or Intel EM64T#version=DEVEL# Firewall configurationfi
26、rewall -disabled# Install OS instead of upgradeinstall# Use NFS installation medianfs -server=0 -dir=/iso# Root passwordrootpw -iscrypted $1$vL3kPJ85$zV/nWDQ1ZGuxLQCXQJgiR/# System authorization informationauth -useshadow -passalgo=sha512# Use text mode installtextfirstboot -disable# System keyboardkeyboard us# System languagelang en_US# SELinux configurationselinux -disabled# Installati
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年六盘水市中医医院招聘考试真题
- 内蒙古工业大学招聘事业编制工作人员笔试真题2024
- 河北雄安雄州人才发展集团有限公司招聘笔试真题2024
- 房屋出租合同补充协议书9篇
- 城市公共交通突发事件应急预案措施
- 燃气管道施工中的环境保护措施
- 2025年安全培训考试试题附答案AB卷
- 2024-2025公司项目部管理人员安全培训考试试题带答案
- 2024-2025员工三级安全培训考试试题附参考答案(培优)
- 2024-2025项目部安全培训考试试题附完整答案(必刷)
- 防伪包装技术
- X互联网公司WLAN无线网络优化方案全解
- 圆柱钢模计算书
- 合成宝石特征x
- 查摆问题及整改措施
- 年度研发费用专项审计报告模板(共22页)
- 隧道工程隧道支护结构设计实用教案
- 中央民族大学人类学博士考试人类学理论与方法真题
- 得力打卡机破解Excel工作表保护密码4页
- 炭阳极焙烧炉7室运行实践
- 分层教学在小学英语教学中的实践与探索(精编版)
评论
0/150
提交评论