一步一步学习RHEL7之环境搭建

1、配置IP地址
linux

    RHEL7中弱化了setup的功能,对于网络管理来讲,network服务的功能弱化,主要经过NetworkManager对网络进行管理
缓存

    RHEL7经过nmtui修改网络配置(RHEL7默认安装,前提是须要开启NetworkManager.service才能够使用)
网络

    首先,肯定Networkmanager服务正常运行
ide

     [root@localhost ~]#systemctl status NetworkManagerui

         NetworkManager.service - Network Managerurl

         Loaded: loaded (/usr/lib/systemd/system/NetworkManager.service;enabled; vendor preset: enabled)spa

         Active: active (running)since 二 2016-01-26 20:05:49CST; 43min agorest

    若是没有启动,手动启动ci

    [root@localhost ~]#systemctl restart  NetworkManagerget

    查看IP地址

    [root@localhost ~]#ifconfig

   修改IP地址

   [root@localhost ~]#nmtui-edit eno16777735

  激活网络配置                                      

  [root@localhost ~]#nmtui

或者

[root@localhost ~]#systemctl restart network


2、关闭防火墙并设置开机自动关闭

[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.

 

3、关闭selinux并设置开机自动关闭

[root@localhost ~]#setenforce 0                          #临时关闭

 

开机自动关闭:

[root@localhost ~]# sed-i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config

4、设置光盘开机自动挂载

[root@localhost ~]#echo "/dev/sr0 /mnt iso9660 defaults 0 0"  >> /etc/fstab

5、配置好本地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                                              #生成缓存列表

相关文章
相关标签/搜索