zoukankan      html  css  js  c++  java
  • linux chkconfig

    --list 后面可以加 服务名称 就只输出此服务的信息

    例如

    #chkconfig httpd on

    就可以把httpd服务 设置为自动启动了

    再次查看

    #chkconfig --list httpd

    httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off

    这个时候2~5都是on,设置成功。

    相反的

    #chkconfig httpd off 就是 关闭自动启动

    最后 还有个 --level 应该是对 0-6 某些 等级进行单独设置

    #chkconfig --level 35 httpd on 将3和5 设置成on

    ===========================================
    [root@DBSVR02 ~]# chkconfig --list
    abrt-ccpp       0:off   1:off   2:off   3:on    4:off   5:on    6:off
    abrt-oops       0:off   1:off   2:off   3:on    4:off   5:on    6:off
    abrtd           0:off   1:off   2:off   3:on    4:off   5:on    6:off
    acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off
    atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
    auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
    autofs          0:off   1:off   2:off   3:on    4:on    5:on    6:off
    certmonger      0:off   1:off   2:off   3:on    4:on    5:on    6:off
    cgconfig        0:off   1:off   2:off   3:off   4:off   5:off   6:off
    cgred           0:off   1:off   2:off   3:off   4:off   5:off   6:off

    ==========================================
    [root@DBSVR02 ~]# service --list
    --list: unrecognized service
    [root@DBSVR02 ~]#
    ==========================================
    [root@DBSVR02 ~]# service
    Usage: service < option > | --status-all | [ service_name [ command | --full-restart ] ]
    [root@DBSVR02 ~]# service vsftpd status
    vsftpd: unrecognized service
    [root@DBSVR02 ~]# service --status-all | grep vsftpd
    [root@DBSVR02 ~]#
    =========================================


    [root@DBSVR02 etc]# yum search vsftpd
    Loaded plugins: downloadonly, fastestmirror, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.grandcloud.cn
     * extras: mirrors.grandcloud.cn
     * updates: mirrors.grandcloud.cn
    base                                                                         | 3.7 kB     00:00
    extras                                                                       | 3.5 kB     00:00
    updates                                                                      | 3.5 kB     00:00
    ======================================= N/S Matched: vsftpd ========================================
    vsftpd.i686 : Very Secure Ftp Daemon

      Name and summary matches only, use "search all" for everything.
    [root@DBSVR02 etc]# yum install vsftpd.i686
    Loaded plugins: downloadonly, fastestmirror, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.grandcloud.cn
     * extras: mirrors.grandcloud.cn
     * updates: mirrors.grandcloud.cn
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package vsftpd.i686 0:2.2.2-11.el6_4.1 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ====================================================================================================
     Package              Arch               Version                        Repository             Size
    ====================================================================================================
    Installing:
     vsftpd               i686               2.2.2-11.el6_4.1               updates               157 k

    Transaction Summary
    ====================================================================================================
    Install       1 Package(s)

    Total download size: 157 k
    Installed size: 344 k
    Is this ok [y/N]: y
    Downloading Packages:
    vsftpd-2.2.2-11.el6_4.1.i686.rpm                                             | 157 kB     00:00
    Running rpm_check_debug
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
      Installing : vsftpd-2.2.2-11.el6_4.1.i686                                                     1/1
      Verifying  : vsftpd-2.2.2-11.el6_4.1.i686                                                     1/1

    Installed:
      vsftpd.i686 0:2.2.2-11.el6_4.1

    Complete!
    [root@DBSVR02 etc]# service vsftpd status
    vsftpd is stopped
    [root@DBSVR02 etc]#

  • 相关阅读:
    设计模式---行为变化模式之命令模式(Command)
    设计模式---数据结构模式之职责链模式(Chain of Responsibility)
    设计模式---数据结构模式之迭代器模式(Iterate)
    WinCE全屏手写输入法
    .net下所有DLL(API)查询,转换C#代码
    在线cron表达式生成器
    完全卸载vs2013、vs2015的方法
    java微信 客服接口-发消息 中文乱码
    【路由达人】简单两步搞定小米路由新增功能-DDNS(解析域名地址转向在线工具)
    微信公众平台开发入门教程
  • 原文地址:https://www.cnblogs.com/simhare/p/3058698.html
Copyright © 2011-2022 走看看