安装时必须创建的分区
- /boot
- /
- swap 交换分区,虚拟内存
swap创建标准:物理内存1.5~2倍,如果物理内存超过4G,一般直接把swap创建4G就够了
一、配置IP地址
RHEL7中弱化了setup的功能,对于网络管理来说,network服务的功能弱化,主要通过NetworkManager对网络进行管理
RHEL7通过nmtui修改网络配置(RHEL7默认安装,前提是需要开启NetworkManager.service 才可以使用)
首先,确定Networkmanager服务正常运行
[root@localhost ~]#systemctl status NetworkManager
●NetworkManager.service - Network Manager
Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service;enabled; vendor preset: enabled)
Active: active (running)since 二 2016-01-26 20:05:49CST; 43min ago
如果没有启动,手动启动
[root@localhost ~]#systemctl restart NetworkManager
查看IP地址
[root@localhost ~]#ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.62 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::20c:29ff:fe0c:e042 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:0c:e0:42 txqueuelen 1000 (Ethernet)
RX packets 6184 bytes 6682795(6.3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 4609 bytes 508159 (496.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
修改IP地址
[root@localhost ~]#nmtui-edit eno16777736
激活网络配置
[root@localhost ~]# nmtui 激活
或者
[root@localhost ~]#systemctl restart network
二、关闭防火墙并设置开机自动关闭
[root@localhost ~]#systemctl stop firewalld
[root@localhost ~]#systemctl disable firewalld
Removed symlink/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed symlink/etc/systemd/system/basic.target.wants/firewalld.service.
三、关闭selinux并设置开机自动关闭
[root@localhost ~]#setenforce 0 #临时关闭
开机自动关闭:
[root@localhost ~]# sed-i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config
四、设置光盘开机自动挂载
[root@localhost ~]# echo"/dev/sr0 /mnt iso9660 defaults 0 0" >> /etc/fstab
五、配置好本地yum源
[root@localhost ~]# rm-rf /etc/yum.repos.d/*
[root@localhost ~]# cat> /etc/yum.repos.d/rhel7.repo <<EOF
> [rhel7-source]
> name=rhel-source
> baseurl=file:///mnt
> enabled=1
> gpgcheck=0
> EOF
[root@localhost ~]# yumclean all #清空yum缓存
[root@localhost ~]# yumlist #生成缓存列表