Linux system DNS Caching service NSCD

Source: Internet
Author: User

As we all know, Linux itself is not with the DNS cache.

You can install NSCD to turn on the Linux system DNS cache.

1. Installation:

Yum-y Install NSCD

2. Modify the configuration file:

Vim/etc/nscd.conf

Logfile/var/log/nscd.log

Threads 4

Max-threads 32

Server-user NSCD

Debug-level 0

Reload-count 5

Paranoia No

Restart-interval 3600

Enable-cache hosts Yes

Positive-time-to-live hosts 3600

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. Restart the NSCD service.

/ETC/INIT.D/NSCD restart


NSCD Cache Three Services passwd group hosts, so it will record three libraries, corresponding to the source/etc/passwd,/etc/hosts and/etc/resolv.conf each library to save two copies of the cache, one is to find records, one is not found records. Each cache is saved with a time-to-Live (TTL).


Turn on, stop, restart the service

Sevices NSCD Start | Stop | Restart


Cache db file under/VAR/DB/NSCD


Nscd-g Viewing statistics


Clear Cache

Nscd-i passwd

Nscd-i Group

Nscd-i hosts

Add: Turn on the NSCD cache service to speed up DNS resolution


This article is from "Effort!" Struggle! "Blog, be sure to keep this provenance http://026mm.blog.51cto.com/8783374/1787835

Linux system DNS Caching service NSCD

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.