Error

An error occurred.

Sorry, the page you are looking for is currently unavailable.
Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx.

帮助文档(华北一、二)

  • 在Linux中开启NSCD服务可在本地缓存DNS解析结果。在TTL时间内,无需去DNS服务器重复解析,从而加快DNS的解析速度,也缓解DNS服务器的压力。

    本操作步骤以CentOS为例。

    Windows中则无需额外配置,本地DNS缓存默认启用。

    1. 安装

     yum install nscd

    2. 增加配置文件 /etc/nscd.conf

    配置如下:

     
    # /etc/nscd.conf 
    # An example Name Service Cache config file.  This file is needed by nscd. 
    # Legal entries are: 
    #       logfile                 <file> 
    #       debug-level             <level> 
    #       threads                 <initial #threads to use> 
    #       max-threads             <maximum #threads to use> 
    #       server-user             <user to run server as instead of root> 
    #               server-user is ignored if nscd is started with -S parameters 
    #       stat-user               <user who is allowed to request statistics> 
    #       reload-count            unlimited|<number> 
    #       paranoia                <yes|no> 
    #       restart-interval        <time in seconds> 
    #       enable-cache            <service> <yes|no> 
    #       positive-time-to-live   <service> <time in seconds> 
    #       negative-time-to-live   <service> <time in seconds> 
    #       suggested-size          <service> <prime number> 
    #       check-files             <service> <yes|no> 
    #       persistent              <service> <yes|no> 
    #       shared                  <service> <yes|no> 
    #       max-db-size             <service> <number bytes> 
    #       auto-propagate          <service> <yes|no> 
    # Currently supported cache names (services): passwd, group, hosts, services 
    #   logfile                 /var/log/nscd.log     
    threads                 4     
    max-threads             32     
    server-user             nscd     
    stat-user               somebody 
    debug-level             5     
    reload-count            5     
    paranoia                no     
    restart-interval        3600       
    enable-cache            hosts           yes     
    enable-cache            passwd          no     
    enable-cache            group           no     
    enable-cache            services        no     
    positive-time-to-live   hosts           5     
    negative-time-to-live   hosts           20     
    suggested-size          hosts           211     
    check-files             hosts           yes     
    persistent              hosts           yes     
    shared                  hosts           yes     
    max-db-size             hosts           33554432

    3. 启动服务

     service nscd start

    4. 添加开机自启动

     chkconfig nscd on

    如需要停止服务

     service nscd stop

文档是否已解决您的问题?

  已解决   未解决

如您有其它疑问,您也可以与我们技术专家联系探讨。

联系技术专家