导读 介绍完CentOS7以后,我们开始了解6和7这两个系统到底有什么区别,熟悉了CentOS6系统以后不会用7?其实不难,接下来我们介绍两个系统到底有哪些区别
init 技术
2 没有网络的多用户模式
-------
启动需要脚本 ————>串行,可能会卡死,启动慢
进程为 1 的 init 就是 cs6
upstart 技术
CentOS6采用了Upstart技术代替INIT进行引导,但是为了简便管理员的操作,操作习惯还是和INIT一样。
So,Upstart技术作为一个过渡技术,因为竞争对手太强大,而被淘汰。
代表系统:CentOS6,Ubuntu14,从CentOS7,Ubuntu15开始使用systemd
Systemd技术
新系统都会采用的技术(RedHat7,CentOS7,Ubuntu15等);
设计目标是克服INIT固有的缺点,提高系统的启动速度;
和INIT兼容,降低迁移成本;
最主要优点:并行启动
Pid为1的进程
[root@centos7~]#ps -ef |head -2
UID PID PPID C STIME TTY TIME CMD root10011:13?00:00:01/usr/lib/systemd/systemd--
switched-root--system--deserialize 21
pid 1 是system
B 任务看到A任务启动了才启动。system 伪造让两个系统同时启动
要虚拟化,升级内核,boot 1024
cobbler 管理界面
补充安装软件包
yum -y install free nmap lrzsz dos2unix telnet screen vim lsof
自动话安装时添加软件
CentOS6和CentOS7的异同
区别1:网卡名称eth0和enp5s0
传统的Linux的网络接口命令为为eth0、eth1.
从CentOS7/RHEL7起,引入了一致和可预测的网络设备命名网络接口的方法。即使添加或移除网络设备,接口名称仍然保持固定,而无需重新枚举,和坏掉的硬件可以无缝替换。
但是这个新的特性对我们自动化运维造成了干扰!
因此,先进的技术向我们屈服了…
CentOS7修改网卡名称为eth0
已经安装完系统修改
http://oldboy.blog.51cto.com/2561410/1722101
上面方法,只适合第一次安装,很繁琐
自动化安装时,直接配置
区别2:网络配置相关命令
 ip: yum -y install iproute
 CentOS7主推使用ip命令。
     ifconfig: yum -y install net-tools
     setup: yum -y install setuptool 废弃命令
     nmtui:替代 setup 命令
安装完改网卡名字,没用
区别3:主机名与字符集
修改主机名
   hostname CentOS7
         /etc/hostname
         hostnamectl set-hostname CentOS7
修改字符集
   LANG=zh_CN.UTF-8 
         /etc/locale.conf 
         localectl set-locale LANG=zh_CN.UTF-8
区别4:兼容的/etc/rc.local
Please note that you must run ' chmod +x /etc/rc.d/rc.local' to ensure that this script will be executed during boot.
[root@lewen ~]# systemctl get-default
multi-user.target
区别5:管理服务
systemct:融合service和chkconfig的功能于一体。
systemctl start crond.service 启动服务。
systemctl stop crond.service 停止服务。
systemctl restart crond.service 重启服务。
systemctl reload crond.service. 重载服务。
systemctl status crond.service 查看服务运行状态。
systemctl list-unit-files 查看所有开机服务。
systemctl enable crond.service 开机自启动。
systemctl disable crond.service 开机不启动。
systemctl is-enabled crond.service 检查是否开机自启动。

原文来自:https://www.cnblogs.com/wenyule/p/10464270.html

本文地址:https://www.linuxprobe.com/centos6-centos7.html编辑:问题终结者,审核员:逄增宝

Linux命令大全:https://www.linuxcool.com/

Linux系统大全:https://www.linuxdown.com/

红帽认证RHCE考试心得:https://www.rhce.net/