CentOS 6和 CentOS 7的区别【转】
虽然,redhat 8在今年已经推出了,但是centos 8还没有推出。而且公司好多都在用centos 6和7
来了解一下6和7的区别吧
整体说明
1.系统
项目CentOS 6CentOS7 . 安装过程6 一步一步7 随意 . 默认的文件系统ext4xfs3. 启动流程串行并行 . 运行级别runleveltarget . 内核2.6.323.10.0 . 开机自启动服务chkconfigsystemctl enable/disable rsyncd . 开启或关闭服务/etc/init.d/network stop/startsystemctl start/stop rsyncd . 网卡命名eth0 eth1ens33 . 普通用户uid>=>= .修改主机名hostname和/etc/sysconfig/networkhostnamectl和/etc/hostname .修改字符集/etc/sysconfig/i18nlocalectl 和/etc/locale.conf .软件包名字tree-1.6.-.el6.x86_64 el6 C6tree-1.6.-.el7.x86_64 el7 C7 .管理网卡主要服务:networkNetworkManager network .防火墙:iptablesfirewalld .查看内存free -h可用内存需要看bufer/cache这一行的可用内存直接看 ava ./etc/fstab/根分区和/boot分区默认都是检查/根分区和/boot分区默认都是不检查
2.服务软件
项目CentOS6 CentOS7
.rsync直接使用rsync用户即可需要使用fake super = yes .数据库yum源中默认是MySQLyum源中默认是MariaDB .时间同步ntpdate 或ntpd服务chrony
详细操作
1 默认的文件系统
CentOS 7.5
[root@shell ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 xfs 48G .1G 41G % /
devtmpfs devtmpfs 477M 477M % /dev
tmpfs tmpfs 488M 488M % /dev/shm
tmpfs tmpfs 488M 7.7M 480M % /run
tmpfs tmpfs 488M 488M % /sys/fs/cgroup
/dev/sda1 xfs 1014M 124M 891M % /boot
tmpfs tmpfs 98M 98M % /run/user/
CentOS 6.10
[root@oldboyedu ~]# df -hT
Filesystem Type Size Used Avail Use% Mounted on
/dev/vda1 ext4 40G .3G 36G % /
tmpfs tmpfs 939M 939M % /dev/shm
[root@oldboyedu ~]# free -m
total used free shared buffers cached
Mem:
-/+ buffers/cache:
Swap:
2. 启动流程
3. 运行级别
CentOS 6.x CentOS 7.x
runlevel运行级别
targetrunlevel0.
targetpoweroff.
targetrunlevel1.
targetrescue.
targetrunlevel2.
targetmulti-user.
targetrunlevel3.
targetmulti-user.
targetrunlevel4.
targetmulti-user.
targetrunlevel5.
targetgraphical.
targetrunlevel6
.targetreboot.target
详细:CentOS 6.x
- 0 - halt (Do NOT set initdefault to this)
- 1 - Single user mode
- 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
- 3 - Full multiuser mode 命令行模式
- 4 - unused
- 5 - X11 桌面模式
- 6 - reboot (Do NOT set initdefault to this)
详细:CentOS 7.x
- poweroff.target
- rescue.target
- multi-user.target
- multi-user.target
- multi-user.target
- graphical.target
- reboot.target
4.查看与修改
CentOS 6.x
修改/etc/inittab 文件 重启生效
CentOS 7.x
systemctl get-default #查看运行级别
systemctl set-default graphical.target #设置运行级别
5.内核版本
CentOS 6.x
2.6.32
[root@oldboyedu ~]# uname -r
2.6.-754.11..el6.x86_64
[root@oldboyedu ~]# rpm -qa tree
tree-1.5.-.el6.x86_64
CentOS 7.x
3.10.0
[root@shell ~]# uname -r
3.10.-.el7.x86_64
[root@shell ~]# rpm -qa tree
tree-1.6.-.el7.x86_64
6. 开机自启动服务
如何让1个软件/服务 可以开机自启动
https://www.jianshu.com/p/fc26d73fe050
CentOS 6.x
chkconfig iptables on/off #让防火墙开机自启动/关闭自启动
CentOS 7.x
systemctl enable/disable rsyncd #让rsyncd开机自启动/关闭自启动
7. 开启或关闭服务
CentOS 6.x
/etc/init.d/sshd restart/stop/start/reload # 重启/关闭/开启/平滑重启sshd服务
CentOS 7.x
systemctl restart/stop/start/reload sshd #重启/关闭/开启/平滑重启sshd服务
8. 网卡命名
9. 普通用户uid
用户CentOS 6.xCentOS 7.x普通用户uid>=500>=1000
10.修改主机名
CentOS 6.x
[root@oldboyedu ~]# hostname oldboyedu-ecs
[root@oldboyedu ~]# hostname
oldboyedu-ecs
[root@oldboyedu ~]# cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=oldboyedu-ecs
CentOS 7.x
hostnamectl set-hostname oldboyedu-CentOS7
[root@oldboyedu-centos7 ~]# cat /etc/hostname
oldboyedu-centos7
11.修改字符集
CentOS 6.x
[root@oldboyedu ~]# export LANG=zh_CN.UTF-
[root@oldboyedu ~]#
[root@oldboyedu ~]# echo 'LANG=zh_CN.UTF-8' >/etc/sysconfig/i18n
[root@oldboyedu ~]# source /etc/sysconfig/i18n
[root@oldboyedu ~]# cat /etc/sysconfig/i18n
LANG=zh_CN.UTF-
CentOS 7.x
[root@oldboyedu-centos7 ~]# localectl set-locale LANG=zh_CN.UTF-
[root@oldboyedu-centos7 ~]# cat /etc/locale.conf
LANG=zh_CN.UTF-
12.软件包名字
软件包版本tree-1.6.0-10.el6.x86_64el6 C6tree-1.6.0-10.el7.x86_64el7 C7
13.管理网卡主要服务
CentOS 6.x network服务
CentOS 7.x NetworkManager network
14.防火墙
iptables
firewalld
15.查看内存free -h
可用内存需要看bufer/cache这一行的
可用内存直接看 ava
16./etc/fstab
/根分区和/boot分区默认都是检查 CentOS 6.x
/根分区和/boot分区默认都是不检查 CentOS 7.x
转自
作为Linux运维,你知道CentOS 6和 CentOS 7的区别吗? https://www.toutiao.com/i6727071857842848267/
CentOS 6和 CentOS 7的区别【转】的更多相关文章
- CentOS下载及版本选择-CentOS LiveCD、LiveDVD和BinDVD区别
1.CentOS系统镜像有两个,安装系统只用到第一个镜像即CentOS-6.x-i386-bin-DVD1.iso(32位)或者CentOS-6.x-x86_64-bin-DVD1.iso(64位), ...
- CentOS 7 镜像文件各个版本区别
CentOS ISO 镜像文件的功能 引导安装 CentOS ISO 镜像文件包含有安装程序,官方称其为 Anaconda,用来引导安装 CentOS 提供 CentOS 的安装文件 镜像文件不一定包 ...
- (转)CentOS之7与6的区别
CentOS之7与6的区别 原文:http://www.cnblogs.com/Csir/p/6746667.html http://blog.csdn.net/u012562943/article/ ...
- centos系统与ubuntu系统的区别
centos和ubuntu简述 CentOS(Community ENTerprise Operating System)是Linux发行版之一,它是来自于Red Hat Enterprise Lin ...
- CentOS / Redhat : Configure CentOS as a Software Router with two interfaces
CentOS / Redhat : Configure CentOS as a Software Router with two interfaces Linux can be easily co ...
- CentOS查看系统信息-CentOS查看命令
一:查看cpu more /proc/cpuinfo | grep "model name" grep "model name" /proc/cpuinfo 如 ...
- In Place Upgrade of CentOS 6 to CentOS 7
Note: This is not the most highly recommended method to move from CentOS 6 to CentOS 7 ... but it ca ...
- CentOS 七 vs CentOS 6的不同
CentOS 七 vs CentOS 6的不同 CentOS 7 vs CentOS 6的不同(1)桌面系统[CentOS6] GNOME 2.x[CentOS7] GNOME 3.x(GNOME ...
- centos 6 与 centos 7 服务开机启动、关闭设置的方法
简单说明下 centos 6 与 centos 7 服务开机启动.关闭设置的方法: centos 6 :使用chkconfig命令即可. 我们以apache服务为例: #chkconfig --add ...
随机推荐
- Spring 实战 第4版 读书笔记
第一部分:Spring的核心 1.第一章:Spring之旅 1.1.简化Java开发 创建Spring的主要目的是用来替代更加重量级的企业级Java技术,尤其是EJB.相对EJB来说,Spring提供 ...
- HTMLTestRunner 用PyCharm执行测试成功但无法生成报告问题
在pythoncharm中运行时,运行成功,但是没有生成测试报告这个问题 代码: if __name__ == '__main__': # 创建测试套件suite suite = unittest.T ...
- 大数据之kafka-05.讲聊聊Kafka的版本号
今天聊聊kafka版本号的问题,这个问题实在是太重要了,我觉得甚至是日后能否用好kafka的关键.上一节我们介绍了kafka的几种发行版,其实不论是哪种kafka,本质上都内嵌了最核心的Apache ...
- Class.getDeclaredFields()和Class.getFields()的区别。 Class.getMethods()和Class.getDeclaredMethods()的区别。
package www.cn.extend; /** Animal * 2019/07/04 * @author Administrator * */ public class Animal { pu ...
- 进程间通信之数据传输--FIFO
One of the fundamental features that makes Linux and other Unices useful is the “pipe”. Pipes allow ...
- Pthon面向对象-异常处理
Pthon面向对象-异常处理 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.异常概述 1>.错误(Error) 逻辑错误: 算法写错了,例如加法写成了减法. 笔误: 例如 ...
- Python入门篇-functools
Python入门篇-functools 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 一.reduce方法 reduce方法,顾名思义就是减少 reduce(function,se ...
- 洛谷 P2921 在农场万圣节Trick or Treat on the Farm题解
题意翻译 题目描述 每年,在威斯康星州,奶牛们都会穿上衣服,收集农夫约翰在N(1<=N<=100,000)个牛棚隔间中留下的糖果,以此来庆祝美国秋天的万圣节. 由于牛棚不太大,FJ通过指定 ...
- Linux 文件监控之谁动了我的奶酪
有时候配置文件会被莫名其妙的修改,但是找不到修改他的进程,从而无法抓住罪魁祸首,这时候就诞生了摄像头.呃呃,应该是audit 比如我要监控一个文件test.txt [root@hsun /]# aud ...
- HDU3109: Worms(字符串变换类 DP)
pro:开始有一个字母虫,然后字母虫在每一天可以选择自己身上的部分字母变换,变换规则形如A->BC. 现状给定最终字母虫的字符串,求最少用了多少天. 如有规则A->BC,B->AC, ...