ArcherWong博客
首页
博客
centos笔记-关于软件启动关闭等操作的命令
作者:ArcherWong
分类:linux
时间:2019-01-03 21:35:59
阅读:356
关于centos服务的命令经常会遇到这几种 - service - systemctl - /etc/init.d/ # 1 service和/etc/init.d/ service是一个脚本命令,分析service可知是去/etc/init.d目录下执行相关程序。service和chkconfig结合使用。 服务配置文件存放目录/etc/init.d/ 命令使用: ``` service start nginx /etc/init.d/nginx restart ``` # 2 systemctl centos7 上面启动服务以及关闭服务已经不是以前的`service stop/start xxxx`了而是systemctl命令,不过用service他会有一个提醒你用systemctl,所以大可不必担心。 ``` 列出正在运行的服务状态——systemctl 启动一个服务——systemctl start postfix.service 关闭一个服务——systemctl stop postfix.service 重启一个服务:——systemctl restart postfix.service 显示一个服务的状态——systemctl status postfix.service 在开机时启用一个服务——systemctl enable postfix.service 在开机时禁用一个服务——systemctl disable postfix.service 查看服务是否开机启动——systemctl is-enabled postfix.service;echo $? 查看已启动的服务列表——systemctl list-unit-files|grep enabled ```
标签:
上一篇:
centos笔记-vsftpd配置
下一篇:
centos笔记-排查服务是否可用
文章分类
css
elasticsearch
git
golang
guacamole
javascript
letsencrypt
linux
nginx
other
php
python
vue
web
阅读排行
golang笔记---关联数组(map)
centos7.3配置guacamole
letsencrypt证书-管理工具certbot
golang笔记---template模板语法
nginx笔记-proxy_cache缓存详解
友情链接
node文件
laravel-vue
ArcherWong的博客园