运维初学者必备之centos7常用操作指令详解
简介:
CentOS(Community Enterprise Operating System)是Linux发布版之一,它是来自于Red Hat Enterprise Linux依照开放源代码规定发布的源代码所编译而成。由于出自同样的源代码,因此有些要求高度稳定性的服务器以CentOS替代商业版的Red Hat Enterprise Linux使用。
centos7发布时间:2016 年 12 月 12 日, CentOS 维护人员 Karanbir Singh 高兴的宣布,期待已久的基于 Red Hat Enterprise Linux 的 CentOS Linux 7 (1611) 系统发布。
centos6停止维护更新日期:2020年11月30日
centos7停止维护更新日期:2024年6月30日
centos8停止维护更新日期:2029年5月31日,后更改为2021年12月31日(正在使用的同学须留意)
centos官网:https://wiki.centos.org/About/Product
一、centos7常用工作指令:
1.centos6.x和centos7.x命令对比:
centos6.x | centso 7.x | 详解 |
---|---|---|
ifconfig | ip addr | 查看网卡信息命令 |
service network status | systemctl status network | 查看网络服务状态 |
service network stop | systemctl stop network | 关闭网络服务 |
service network start | systemctl start network | 开启网络服务 |
service network restart | systemctl restart network | 重启网络服务 |
service iptables restart | systemctl restart firewalld | 重启防火墙服务 |
service crond restart | systemctl restart crond | 重启定时任务 |
checkconfig iptables off | systemctl disable firewalld | 设置防火墙开启不启动 |
chenckconfig iptables on | systemcctl enable firewalld | 设置防火墙开机启动 |
hostname node -1 (临时修改) | hostnamectl set-hostname node-1(永久修改) | 修改主机名 |
2.网络服务命令:
命令 | 详解 |
---|---|
ip addr | 查看网卡信息命令 |
systemctl status network | 查看网络服务状态 |
systemctl stop network | 关闭网络服务 |
systemctl start network | 启动网络服务 |
systemctl restart network | 重启 |