Redhat6.5基于网络安装服务器配置

  • 格式:doc
  • 大小:47.50 KB
  • 文档页数:8

下载文档原格式

  / 23
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

概述

本文以Redhat6.5为基础,通过配置网络安装服务器,实现Redhat Linux的网络安装。主要用到的软件(服务)有DHCP,TFTP,NFS,Kickstart等。本文只列出具体步骤,不含原理说明。

1.基础配置

1.1更改IP地址

[root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

HWADDR=08:00:27:53:44:fb

TYPE=Ethernet

UUID=82affeef-922e-40b2-b89f-a5df8e9fa236

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

IPADDR=192.168.7.30

NETMASK=255.255.255.0

GATEWAY=192.168.7.1

IPV6INIT=no

USERCTL=no

[root@localhost ~]# ifup eth0

Active connection state: activated

Active connection path: /org/freedesktop/NetworkManager/ActiveConnection/1

1.2更改hostnme

[root@localhost ~]# vi /etc/sysconfig/network

[root@redhatnis ~]# cat /etc/sysconfig/network

NETWORKING=yes

HOSTNAME=redhatnis

[root@localhost ~]# vi /etc/hosts

[root@localhost ~]# cat /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.7.30 redhatnis

1.3关闭SELINUX及防火墙(iptables)

[root@localhost ~]# vi /etc/selinux/config

[root@redhatnis ~]# cat /etc/selinux/config |grep disa

# d isabled - SELinux is fully disabled.

SELINUX=disabled

[root@localhost ~]# chkconfig |grep ipta

iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off

[root@localhost ~]# chkconfig --level 2345 iptables off

[root@localhost ~]# shutdown -ry 0

2.软件安装

2.1挂载安装光盘

[root@redhatnis ~]# mount /dev/sr0 /mnt

mount: block device /dev/sr0 is write-protected, mounting read-only

[root@redhatnis ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/vg_root-lv_root 20G 6.2G 12G 35% /

tmpfs 940M 72K 940M 1% /dev/shm

/dev/sda1 485M 39M 421M 9% /boot

/dev/sr0 3.6G 3.6G 0 100% /mnt

2.2配置YUM源

[root@redhatnis ~]# cd /etc/yum.repos.d

[root@redhatnis yum.repos.d]# vi installmedia.repo

[root@redhatnis yum.repos.d]# cat installmedia.repo

[InstallMedia]

name=Red Hat Enterprise Linux 6.5

baseurl=file:///mnt/Server

enabled=1

gpgcheck=0

[root@redhatnis yum.repos.d]# yum list

Loaded plugins: product-id, refresh-packagekit, security, subscription-manager

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

InstallMedia

| 3.9 kB 00:00 ...

Installed Packages

ConsoleKit.x86_64 0.4.1-3.el6 @anaconda-RedHatEnterpriseLinux-201311111358.x86_64/6.5

2.3安装所需软件

[root@redhatnis ~]# yum install -y -q xinetd tftp tftp-server ftp vsftpd dhcp nfs-utils

This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.

3.配置DHCP Server

[root@redhatnis ~]# cd /etc/dhcp

[root@redhatnis dhcp]# vi dhcpd.conf

[root@redhatnis 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 所需文件