CentOS 7 启动、重启、chkconfig等命令已经合并为systemctl
2016-01-07 17:54
671 查看
CentOS 7系统服务启动、重启、设置服务启动项命令以合并为,systemctl . 现在用service 或/etc/init.d/命令,重启,重新启动,停止等没效果,因为命令合并为systemctl. 新命令具体内容如下:
以启动httpd和设置Apache httpd为服务启动为例子:
centos7之前的命令是这样:
service httpd start 启动Apache httpd
service httpd restart 重新启动
service httpd stop 停止服务
chkconfig –levels 235 httpd on 开机启动httpd
或是:
/etc/init.d/ httpd start 启动
/etc/init.d/ httpd restart 重新启动
/etc/init.d/ httpd stop 停止服务
centos7吧这些命令全部合并了,使用也更加方便,当然也是习惯问题,如果习惯了之前命令,centos新命令还得适应适应,其实很简单,只要这样记忆,使用就比较方便了.
systemctl 动作 服务名.service
一些centos7 systemctl命令简单实用实例:
systemctl start httpd.service /启动Apache httpd
systemctl restart httpd.service /重新启动
systemctl stop httpd.service /停止服务
systemctl enable httpd.service /开机启动httpd
systemctl disable httpd.service /禁止开机启动httpd
以启动httpd和设置Apache httpd为服务启动为例子:
centos7之前的命令是这样:
service httpd start 启动Apache httpd
service httpd restart 重新启动
service httpd stop 停止服务
chkconfig –levels 235 httpd on 开机启动httpd
或是:
/etc/init.d/ httpd start 启动
/etc/init.d/ httpd restart 重新启动
/etc/init.d/ httpd stop 停止服务
centos7吧这些命令全部合并了,使用也更加方便,当然也是习惯问题,如果习惯了之前命令,centos新命令还得适应适应,其实很简单,只要这样记忆,使用就比较方便了.
systemctl 动作 服务名.service
一些centos7 systemctl命令简单实用实例:
systemctl start httpd.service /启动Apache httpd
systemctl restart httpd.service /重新启动
systemctl stop httpd.service /停止服务
systemctl enable httpd.service /开机启动httpd
systemctl disable httpd.service /禁止开机启动httpd
相关文章推荐
- CentOS6.6 kickstart文件
- 在VirtualBox下安装CentOS教程
- linux下的cron和crontab
- Linux之getopt函数
- gettimeofday()函数的使用方法 转载
- JDK安装以及配置Linux
- Linux 配置samba 服务
- MySQL安装以及配置Linux
- centos错误提示:您在 /var/spool/mail/root 中有邮件
- Linux——Pip命令
- linux软件源码安装管理
- 最全面的linux信号量解析
- Centos7安装Mysql
- SSH 远程控制 Linux
- 一键完成RHCE6.0上午的考试
- 优化Linux的内核参数来提高服务器并发处理能力
- centos7 安装R语言遇到的各种坑
- Linux useradd 命令
- kvm虚拟机vnc和spice配置
- linux时间类型localtime_r (转载)