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 -2UID 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-defaultmulti-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.linuxprobe.com/?p=174295