天天看点

Centos 6和Centos 7的区别

cat /etc/redhat-release 查看系统版本

1.查看内核版本 uname -a(centos6.x) uname -r(centos7.x)

2.启动加载器

[CentOS6] GRUB Legacy (+efibootmgr)

[CentOS7] GRUB2

3.防火墙 iptables(centos6) firewalld(centos7)

4. *默认数据库 MySQL(centos6 )mariadb(centos7)

5.文件结构

[CentOS6] /bin, /sbin, /lib, and /lib64在/下

[CentOS7] /bin, /sbin, /lib, and /lib64移到/usr下

6. 主机名 hostname xxx 临时改 vi /etc/hostname 永久改

[CentOS6] /etc/sysconfig/network

[CentOS7] /etc/hostname

修改主机名用命令即可 hostnamectl set-hostname xxxx

7. hostname xxx 临时改 vi /etc/hostname 永久改

8. 服务相关 service xx restart 和 systemctl restart xx

继续阅读