ubuntu服务管理

uRedhat 提供了chkconfig这个命令来管理系统在不同运行级别下的服务开启/关闭: chkconfig ServiceName on/off 并可以用chkconfig --list(两个杠) 查看当前的制定状况。

Ubuntu里没有这个命令,其实也可以不用任何命令简单管理系统服务, 可以通过改变 /etc/rc*.d(*的取值是从0到6和S)下的启动脚本名来管理服务. 比如不想让KDM自动启动, 可以这样: sudo find /etc/rc* -name *kdm* -exec rm {} /; 也就是把KDM的启动脚本全删掉.

Ubuntu也提供了另外一个简单的命令来实现管理。但首先服务必须已在/etc/init.d目录中存在。如:

添加一个服务: sudo update-rc.d ServiceName defaults

删除一个服务: sudo update-rc.d ServiceName remove

还可以安装另外一个比较强的工具: sudo apt-get install sysv-rc-conf sysvconfig

启动: sudo sysv-rc-conf 它可心配置各服务在各级别上的启动情况.

随时想启动某个服务, 可以这样: sudo /etc/init.d/ServiceName start

比如我要远程登录, 要用ssh服务: sudo /etcinit.d/ssh start (别的系统可能是sshd)

还可以做别的操作: start : 启动服务 stop : 停止服务 restart : 关闭服务,然后重新启动 reload : 使服不重新启动而重读配置文件 status : 提供服务的当前状态 condrestart : 如果服务锁定,则这个来关闭服务,然后再次启动 再说一下 linux 运行级别的意思: 通常有这几个 runlevel : runlevel  system state 0  halt the system 1   single user mode 2  basic multi user mode 3  multi user mode 5  multi user mode with gui 6  reboot the system S   single user mode runlevel 命令查看当前运行级别. init 命令改变当前运行级别.

============

在ubuntu中没有chkconfig这个的命令来对服务运行级别的管理,虽然不能用这个命令来管理,但是还是可以用来查看服务运行状态的,

因此你还是可以安装它的:sudo apt-get install chkconfig  然后chkconfig --list即可

在ubuntu中有一个chkconfig的代替命令sysv-rc-conf,安装方式:sudo apt-get install sysv-rc-conf。这个命令的使用方式跟chkconfig

的有点不太一样,具体的使用方法baidu or google一下便知

在ubuntu中对服务还有一个图形界面的管理工具Boot-Up Manager,简称:BUM。安装sudo apt-get install bum使用方法在也不多做介绍

这里有各个服务的具体服务内容

http://www.ownlinux.cn/2009/06/13/bum.html

时间: 2024-12-14 08:50:47

ubuntu服务管理的相关文章

Linux服务管理(Ubuntu服务管理工具sysv-rc-conf)(转)

Ubuntu运行级别 Linux系统任何时候都运行在一个指定的运行级上,并且不同的运行级的程序和服务都不同,所要完成的工作和要达到的目的都不同,系统可以在这些运行级之间进行切换,以完成不同的工作. 运行级别(Runlevel)指的是Unix或者linux等类Unix操作系统下不同的运行模式. 运行级别通常分为7等,分别是从0到6,但如果必要的话也可以更多. 例如在大多数Linux操作系统下一共有如下6个典型的运行级别: 0 停机 1 单用户,Does not configure network

Ubuntu 和 Redhat / Fedora 服务管理命令对比表(附Fedora16新的服务管理工具systemctl )

以 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 启动时不加

PostgreSQL 安装与服务管理

Windows 安装过程 从这里下载二进制安装包,一步一步按照提示即可. 服务管理 服务的名字可以先使用services.msc查看 λ net start postgresql-x64-10 postgresql-x64-10 - PostgreSQL Server 10 服务正在启动 . postgresql-x64-10 - PostgreSQL Server 10 服务已经启动成功. λ net stop postgresql-x64-10 postgresql-x64-10 - Pos

编译安装 Lnmp 并使用服务管理

Ubuntu 更换国内镜像源 sudo vim /etc/apt/source.list sudo apt update deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiver

linux 下的 service 和systemctl 服务管理方式

linux 下的 service  和systemctl 服务管理方式 man service 得到:执行一个system V 风格的启动脚本 service - run a System V init script man systemctl 得到: 控制systemd 系统和服务管理器 systemctl - Control the systemd system and service manager systemd:完全替代init,可并行启动服务,并能减少在shell上的系统开销,相比传

linux服务管理

xinetd 超级服务管理 ,常驻在内存,起到中间作用,管理服务,根据客户端的请求,xinted通知相应的服务启动进程 . 基于 xinetd的服务,例如telnet xinetd的自启动方式      chkconfig  telnet on    一般是指下次开启,会自动启动 查看属于xinted的服务   cd /etc/xinetd.d vim /etc/rc.d/rc.local service服务支持源码包安装  ,链接 ln -s /usr/local/apache/bin/apa

安全类工具制作第006篇:服务管理器

一.前言 服务是一种在操作系统启动的时候就会启动的进程.在操作系统启动时会有两种程序随着系统启动,一种是普通的Win32程序,另一种则是驱动程序.正是基于服务的这种特性,恶意程序往往也会将自身伪装成正常的服务来实现自启动.因此在反病毒的过程中,还是很有必要对服务项进行查看并管理的. 服务管理器的开发原理与之前所讨论的注册表管理器和进程管理器是类似的,主要也是枚举服务并将其显示在"List Control"控件中.而对于服务的管理,是通过服务相关的API函数来实现的.有了本系列之前几篇文

linux系统管理之服务管理,ipv6,tcp_wrappers练习

服务管理 ipv6 tcp_wrappers

linux系统管理之服务管理,ipv6,tcp_wrappers

服务管理 1.查看所有unit file单个文件的服务状态 systemctl list-unit-files systemctl list-unit-files --type serbice( 类型筛选) 2.配置yum仓库的小知识点 file:// 本地文件 /mnt 根下面的mnt 3.服务状态 查看状态 systemctl status 服务名字 开启服务 systemctl start 服务名字 关闭服务 systemctl stop 服务名字 下次打开仍然生效 systemctl e