1.3 Linux系统7基本环境配置

Linux系统7 基本了解

红帽公司于2014年6月11日正式发布企业Linux 7版本,该版本在裸服务器、虚拟机、IaaS 和 PaaS 方面都得到了加强,更可靠以及更强大的数据中心环境可满足各种商业的要求。RHEL 7 为企业提供一个内聚的、统一的基础设施架构以及最新的服务环境,包括 Linux 容器、大数据以及跨物理系统、虚拟机和云的混合云平台。 

 更新:1.显著提升Docker的兼容性;2.默认文件系统从EXT4改为XFS;3.系统管理进一步简化;4.新版本内核3.10提供更多文件系统的支持;5支持2TB以上的硬盘作为系统引导盘

启动级别的切换

[root@lhz ~]# systemctl isolate multi-user.target   或者   systemctl isolate runlevel3.target     切换到第三级别

[root@lhz ~]# systemctl isolate graphical.target   或者   systemctl isolate runlevel5.target 

设置默认启动级别:

[root@lhz ~]# systemctl set-default multi-user.target

[root@lhz ~]# systemctl set-default graphical.target    

 查看当前默认启动级别:

[root@lhz ~]# systemctl get-default

一、配置IP地址

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

RHEL7通过nmtui修改网络配置(RHEL7默认安装,前提是需要开启NetworkManager.service 才可以使用)

首先,确定Networkmanager服务正常运行

[root@lhz ~]# systemctl status NetworkManager

如果没有启动,手动启动

[root@lhz ~]# systemctl restart  NetworkManager

修改IP地址

[root@lhz ~]# nmtui-edit eno16777736

 激活网络配置                                      

[root@lhz ~]# systemctl restart network

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

[root@lhz ~]# systemctl stop firewalld

[root@lhz ~]# 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@lhz ~]# setenforce 0                          #临时关闭

 开机自动关闭:

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

 四、设置光盘开机自动挂载(忽略,具体根据实际情况处理

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

 五、配置网络yum

[root@lhz ~]# rm -rf /etc/yum.repos.d/*

[root@lhz ~]# cat > /etc/yum.repos.d/rhel7.repo <<EOF

> [rhel7-source]

> name=rhel-source

> baseurl=http://mirrors.ustc.edu.cn/centos/7/os/x86_64/          (本地配置:file:///mnt

> enabled=1

> gpgcheck=0

> EOF

 [root@lhz ~]# yum clean all                                      #清空yum缓存

 [root@lhz ~]# yum list                                              #生成缓存列表

 

posted on 2017-05-30 16:02  思_行  阅读(263)  评论(0编辑  收藏  举报