AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[chkconfig](server)

Martin Hope
King David
Asked: 2016-09-21 04:22:16 +0800 CST

安装/升级 iptables rpm 后,从 chkconfig 开启 iptables

  • 1

为什么从头开始安装 iptables 或升级 iptables

然后 chkconfig 中的 iptables 显示在 ?

安装/升级 iptables 后如何避免 chkconfig iptables on ?

  • 备注我们要避免在安装 iptables 后执行chkconfig iptables off

我的redhat机器版本6的真实例子

service iptables status
Firewall is stopped. 

# chkconfig --list | grep iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

# chkconfig iptables off

# chkconfig --list | grep iptables
iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off



yum remove iptables
.
.
.


chkconfig --list | grep iptables

show nothing ( as should be )



yum install  iptables
.
.
.

成功安装 iptables 后,我们可以看到 chkconfig 已打开 - 为什么?

# chkconfig --list | grep iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off

这样做的关键问题是:

重启后 iptables 服务将运行,我们希望避免这种情况

请告知如何在安装 iptables 包后避免 iptables chkconfig on

linux redhat iptables chkconfig
  • 2 个回答
  • 639 Views
Martin Hope
ricmarques
Asked: 2016-09-01 09:16:18 +0800 CST

Linux中“chkconfig”运行级别“S”(大写S)和“B”(大写B)的含义

  • 1

我正在chkconfig --list使用 SLES 10 SP2 (SUSE Linux Enterprise Server 10 Service Pack 2) 的服务器上运行该命令。我知道从 0 到 6 的运行级别的含义,但有些行也有一个“ S ”(大写 S),而一行有一个“ B ”(大写 B)。

让我在这里引用“ chkconfig --list”的截断输出 - 请注意,一方面,“ kbd”、“ microcode”、“ splash”、“ splash_early”行在行尾有“ S:on”,另一方面, " sysstat" 行以 " B:on" 结尾:

# chkconfig --list
(...)
dbus                      0:off  1:off  2:off  3:on   4:off  5:on   6:off
(...)
kbd                       0:off  1:on   2:on   3:on   4:off  5:on   6:off  S:on
(...)
microcode                 0:off  1:on   2:on   3:on   4:off  5:on   6:off  S:on
(...)
splash                    0:off  1:on   2:on   3:on   4:off  5:on   6:off  S:on
splash_early              0:off  1:off  2:on   3:on   4:off  5:on   6:off
(...)
syslog                    0:off  1:off  2:on   3:on   4:off  5:on   6:off
sysstat                   0:off  1:off  2:off  3:off  4:off  5:off  6:off  B:on
(...)

我已阅读chkconfig Levels 的 Serverfault Question & Answer Explanation但唯一的答案仅提到运行级别 0 到 6。

这台机器上 chkconfig 的手册页也只提到了运行级别 0 到 6:

# man chkconfig

(...)

LIST MODE
   List mode prints for each specified service a line that consists of the 
   service name and for runlevels zero to six  **on** or **off** depending if the
   service will be started or not.  **on** will be printed in bright green 
   if the output is written to a terminal. If the --deps option is given, 
   the names of the services  that  must  be  started before this service is 
   appended to each line. The inetd/xinetd services are listed in extra
   sections.
(...)

所以,我的问题是:输出中“ S ”和“ B ”的含义是什么?chkconfig --list

(我猜“S”可能是“Startup”,“B”可能是“Boot”,但我没有找到任何相关的文档或网页来解决这个问题。)

linux sles chkconfig runlevel
  • 1 个回答
  • 675 Views
Martin Hope
Jürgen Paul
Asked: 2012-06-02 20:57:02 +0800 CST

确定哪些应用程序在启动时运行

  • 2

我有一个 CentOS 6 32 位 VPS,我想确定,我如何知道哪些应用程序在启动时自动运行?

编辑:我试过chkconfig --list了,但我不明白这些行是什么意思:

[root@server2 ~]# chkconfig --list
dropbox         0:off   1:off   2:on    3:on    4:on    5:on    6:off
httpd           0:off   1:off   2:off   3:on    4:off   5:off   6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
modules_dep     0:off   1:off   2:on    3:on    4:on    5:on    6:off
mysqld          0:off   1:off   2:on    3:on    4:off   5:on    6:off
named           0:off   1:off   2:off   3:off   4:off   5:off   6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
netfs           0:off   1:off   2:off   3:off   4:on    5:on    6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
nginx           0:off   1:off   2:off   3:off   4:off   5:off   6:off
nmb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
openvpn         0:off   1:off   2:off   3:on    4:on    5:on    6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
rpcbind         0:off   1:off   2:on    3:off   4:on    5:on    6:off
rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off
saslauthd       0:off   1:off   2:off   3:on    4:off   5:off   6:off
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
snmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
snmptrapd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
udev-post       0:off   1:on    2:on    3:off   4:on    5:on    6:off
xinetd          0:off   1:off   2:off   3:on    4:on    5:on    6:off
linux centos centos6 chkconfig
  • 2 个回答
  • 164 Views
Martin Hope
Chen Levy
Asked: 2010-04-02 04:27:33 +0800 CST

`# probe: true` 在 RedHat 系统上的 /etc/rc.d/init.d/* 文件中

  • 0

我目录中的某些文件(例如nfs, nfslock, )在其注释标题中有一行,例如:bind/etc/rc.d/init.d/

# probe: true

我发现那些特定的脚本有probe动词,即:

service nfs probe

但这是因为上述脚本有处理probe动词的代码。

我在手册页和任何相关的手册页中都没有提到该# probe: true符号。chkconfig谷歌搜索也没有帮助。

那条线有真正的意义,还是纯粹的文档?

linux scripting redhat init.d chkconfig
  • 1 个回答
  • 243 Views
Martin Hope
Geo
Asked: 2009-06-23 07:07:43 +0800 CST

chkconfig 支持 linux 服务需要什么?

  • 37

我正在尝试通过

chkconfig -add <servicename> 

我收到一条消息说

service <servicename> does not support chkconfig

我正在使用 Red Hat Enterprise 4。我试图在启动时添加到自动启动的脚本如下:

#!/bin/sh

soffice_start() {   if [ -x /opt/openoffice.org2.4/program/soffice ]; then
        echo "Starting Open Office as a Service"
        #echo " soffice -headless -accept=socket,port=8100;urp;StarOffice.ServiceManager
-nofirststartwizard"
        /opt/openoffice.org2.4/program/soffice
-headless -accept="socket,host=0.0.0.0,port=8100;urp;StarOffice.ServiceManager"
-nofirststartwizard &   else
        echo "Error: Could not find the soffice program. Cannot Start SOffice."   fi }

soffice_stop() {   if [ -x /usr/bin/killall ]; then
        echo "Stopping Openoffice"
        /usr/bin/killall soffice 2> /dev/null   else
        echo "Eroor: Could not find killall.  Cannot Stop soffice."   fi }

case "$1" in  'start')    soffice_start    ;;  'stop')    soffice_stop    sleep 2    ;;  'restart')    soffice_stop    sleep 5  soffice_start    ;;  *)    if [ -x /usr/bin/basename ]; then
        echo "usage: '/usr/bin/basename $0' start| stop| restart"    else
        echo "usage: $0 start|stop|restart"    fi esac
linux scripting redhat chkconfig
  • 4 个回答
  • 74749 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve