我是靠谱客的博主 单薄大神,最近开发中收集的这篇文章主要介绍centos 6 7 differences 区别,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

命令centos6centos7
ifconfig有 yum install -y net-tools
服务管理chkconfig
/etc/init.d/服务
systemctl
systemctl start service_name
自启动
[CentOS6]
$ chkconfig service_name on/off
[CentOS7]
$ systemctl enable service_name
$ systemctl disable service_name
而对于启动脚本的存放位置,也不再是/etc/init.d/(这个目录也是存在的),而是/usr/lib/systemd/system/.
kernel2.63.10
网卡eth0成为了可预见性的命名规则
文件系统ext4xfs
强制停止
[CentOS6]
$ kill -9 <PID>
[CentOS7]
$ systemctl kill --signal=9 sshd
主机名cat /etc/sysconfig/networkcat /etc/hostname
防火墙iptables被firewalld取代
开机执行文件/etc/rc.local可放置开机要执行的脚本文件默认这个文件没有执行权限 x
官方推荐不使用这个文件(自己写服务),但是你可以加+x继续使用。
内核参数配置文件/etc/sysctl.conf/usr/lib/sysctl.d/00-system.conf

/etc/sysctl.d/<name>.conf
文件结构
[CentOS6] /bin, /sbin, /lib, and /lib64在 /
[CentOS7] /bin, /sbin, /lib, and /lib64移到/usr下
IP地址MAC地址
[CentOS6]
$ ifconfig -a
[CentOS7]
$ ip address show
关闭
[CentOS6]$ shutdown -h now
[CentOS7]
$ poweroff
$ systemctl poweroff
防火墙
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
继续使用老版防火墙:
systemctl stop firewalld
systemctl disable firewalld
yum installed -y iptables-services
systemctl enable iptables
systemctl start iptables
参考:
https://putty.biz/760
http://cuidehua.blog.51cto.com/5449828/1858374
http://pengjiezhang.blog.51cto.com/1506442/1868140

转载于:https://www.cnblogs.com/elesos/p/6894976.html

最后

以上就是单薄大神为你收集整理的centos 6 7 differences 区别的全部内容,希望文章能够帮你解决centos 6 7 differences 区别所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(69)

评论列表共有 0 条评论

立即
投稿
返回
顶部