以 apache/httpd 服务作为例子

任务

Red Hat / Fedora

Ubuntu

Ubuntu 
(with sysv-rc-conf or sysvconfig)

立即启动/停止某服务

service httpd start

invoke-rc.d apache start

service apache start

启动时自动加载

chkconfig httpd on

update-rc.d apache defaults

sysv-rc-conf apache on

启动时不加载

chkconfig httpd off

update-rc.d apache purge

sysv-rc-conf apache off

https://help.ubuntu.com/community/SwitchingToUbuntu/FromLinux/RedHatEnterpriseLinuxAndFedora

安装sysv-rc-conf
$ sudo apt-get install sysv-rc-conf

用法:
sysv-rc-conf --list [service name]
sysv-rc-conf [--level <runlevels>] <service name> <on|off>

译者按:从Fedora16开始,Redhat不再推荐ntsysv、chkconfig、service,而是建议使用新的服务管理工具systemctl (貌似功能强大) ,尽管旧指令也是可以用的。

http://docs.fedoraproject.org/en-US/Fedora/16/html/System_Administrators_Guide/ch-Services_and_Daemons.html

对比表,以 apache / httpd 为例

任务 旧指令 新指令
使某服务自动启动 chkconfig --level 3 httpd on
systemctl enable httpd.service
使某服务不自动启动 chkconfig --level 3 httpd off
systemctl disable httpd.service
检查服务状态 service httpd status
systemctl status httpd.service (服务详细信息) 
systemctl is-active httpd.service (仅显示是否 Active)
显示所有已启动的服务 (谁知道?
systemctl list-units --type=service           
启动某服务 service httpd start
systemctl start httpd.service
停止某服务 service httpd stop
systemctl stop httpd.service
重启某服务 service httpd restart
 
systemctl restart httpd.service

Ubuntu 和 Redhat / Fedora 服务管理命令对比表(附Fedora16新的服务管理工具systemctl )的更多相关文章

  1. 参考termux中包管理命令的伪装修改的arch版包管理命令

    #!/bin/bash set -e -u show_help() { echo "This help message is useless, please read the content ...

  2. Linux 笔记 - 第十三章 Linux 系统日常管理之(三)Linux 系统日志和服务

    博客地址:http://www.moonxy.com 一.前言 日志文件记录了系统每天发生的各种各样的事情,比如监测系统状况.排查问题等.作为系统运维人员可以通过日志来检查错误发生的原因,或者受到攻击 ...

  3. (转)CentOS下开机启动查看管理命令:chkconfig用法

    CentOS下开机启动查看管理命令:chkconfig用法   CentOS下开机启动查看管理的命令是:chkconfig   1. 开机启动列表查看: chkconfig --list     说明 ...

  4. Linux系列教程(七)——Linux帮助和用户管理命令

    上篇博客我们介绍了Linux文件搜索命令,其中find是用的最多的也是功能最强大的文件或目录搜索命令,和另一个搜索命令locate的区别是,find命令是全盘搜索,刚创建的文件也能搜索的到,而loca ...

  5. ORACLE 12c RAC的常用管理命令

    ORACLE 12c RAC的常用管理命令 一.查询 1.RAC查询 1.1.查询节点 [grid@swnode1 ~]$ su - grid [grid@swnode1 ~]$ /u01/app/1 ...

  6. Linux常用命令之帮助和用户管理命令

    目录 1.帮助命令 一.获得命令或配置文件帮助信息:man 二.获得shell内置命令的帮助信息:help 三.获得命令的中文帮助信息:--help 2.用户管理命令 一.添加新用户:useradd ...

  7. Linux系列教程(七)——Linux常用命令之帮助和用户管理命令

    上篇博客我们介绍了Linux文件搜索命令,其中find是用的最多的也是功能最强大的文件或目录搜索命令,和另一个搜索命令locate的区别是,find命令是全盘搜索,刚创建的文件也能搜索的到,而loca ...

  8. Redhat/Fedora 或类似系统, 配置网络的工具介绍

    在Redhat早期的版本中, 有linuxconf .redhat-config-network .netconfig 等工具: 在Redhat/Fedora 最新的版本有 system-config ...

  9. Linux-进程管理命令

    目录 进程管理命令-ps(静态) 进程管理命令-top(动态) 什么是中断 管理进程状态 kill命令 killall命令 pkill命令 pidof 和 pgrep 补充 关于优先级PR和NI 后台 ...

随机推荐

  1. Leetcode: Sentence Screen Fitting

    Given a rows x cols screen and a sentence represented by a list of words, find how many times the gi ...

  2. scott/tiger登录时提醒ora-28000 the account is locked

    scott/tiger登录时提示ora-28000 the account is locked在plsql developer中要是以scott/tiger登录时提示ora-28000 the acc ...

  3. Quartus II USB-Blaster驱动解决

    Quartus II USB-Blaster驱动解决 之前安装Quartus II 13.0,但FPGA开发板链接的USB-Blaster链接无法被Quartus识别,改装Quartus II 11. ...

  4. 。。。欢乐捕鱼App WeX5 连接打包代理服务失败,请检查代理服务地址是否正确。。。

    今天学习了WeX5,第一次使用,使用它打包一个Web App 欢乐捕鱼的时候,在最终打包生成Native App的时候突然报错了,说:"连接打包代理服务失败,请检查代理服务地址是否正确&qu ...

  5. python for mysql

    # -*- coding: utf-8 -*- '''python coded by written in 2016/8/31 Used for get win os log for each win ...

  6. jQuery入门教程

    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,博客地址为http://www.cnblogs.com/jasonnode/ .网站上有对应每一 ...

  7. linux 下链接无线网络

    无线网卡配置此页由Linux Wiki用户Chenxing于2008年11月27日 (星期四) 09:28的最后更改. 在1233456的工作基础上.本文介绍在Linux命令行界面中手动配置无线网卡的 ...

  8. python之三层菜单递归

    首先非常感谢11期的学长薜保库提供了一种非常实用函数递归方法,让实现三层菜单如此简单,不过对所遍历的嵌套字典或列表格式有所要求.有特定的环境下非常实用. 主要针对中国的各省市区进行展示,采用了百度的j ...

  9. 转 苹果企业级帐号进行ipa打包,分发,下载等流程

    1,企业帐号介绍(1)使用企业开发帐号,我们可以发布一个 ipa 放到网上,所有人(包括越狱及非越狱设备)都可以直接通过链接下载安装,而不需要通过 AppStore 下载,也不需要安装任何证书.(2) ...

  10. Bash:-:-通过while和shift判断脚本位置参数格式是否合法

    ]];then echo "请输入2个位置参数..." exit else num=$# ));do case ${num} in ) if ! echo "${1}&q ...