CentOS 6.x 的服务启动管理命令
手动:service 服务名称 start|stop|restart|...
自动:chkconfig --level 35 服务名称 on|off
chkconfig命令 管理软件自启动的工具
查看所有服务的自启动状态
chkconfig --list
chkconfig --list 服务名
修改服务的开机自启状态
chkconfig --level N 服务名称 on|off
N指的是(运行级别,0-6级别)
CentOS 7.x 的服务启动管理命令
手动:systemctl start|stop|restart|... 服务名
自动:systemctl enable|disabled 服务名
6.x 和 7.x 安装的源码软件的管理:
手动:使用安装的绝对路径进行管理:
/usr/local/apache2/bin/apachectl start|stop|restart|… (可用别名)
自动:
自己编写管理该软件的脚本,将脚本放在PATH环境变量所在目录
ip、关闭防火墙、关闭SELinux、挂载光盘(自动挂载)、yum源(或网络yum源)
6.x 关闭防火墙:iptables
查看规则:iptables -L
临时关闭:serv