centos 常用命令
1. 查看版本
lsb_release -a
2. 修改 alias
vi .bashrc
3. --version
查看某个命令的版本号
4. systemctl
systemctl list-unit-files 所有可用单元
systemctl list-unit 列出所有运行中单位元
sytemctl --failed
systemctrl is-enabled mysqld.service 检查某个单元是否启用
systemctrl status mysqld.service
systemctrl start httpd.service
systemctrl restart httpd.service
systemctrl stop httpd.service
systemctrl reload hpptd.service
systemctl status httpd.service
systemctrl enable httpd.serve 激活服务
systemctl disable httpd.servide 禁止服务
systemctrl kill httpd 杀死服务
systemctl list-unit-fils --type=mount 查看类型是 mount 的服务
systemctrl is-active tmp.mount
5. 安装 httpd 服务器
先判断httpd的服务 systemctl status httpd.service
如果没有的话,就直接安装: yum -y install httpd httpd-devel