≡ Menu

bind

Linux mount: Bind or Remount Part Of File Hierarchy At Another Directory

How do I mount the contents of /home/multimedia in two places under Linux operating systems?
[click to continue…]

Sysadmin because even developers need heroes!!!

Linux Command: List All Users In The System

I‘m a new Linux sys admin and I’m unable to find the command to list all users on my RHEL server. What is the command to list users under Linux operating systems?
[click to continue…]

Lighttpd Configure Subdomain

I‘ve main domain configured at http://example.com and I’d like to use http://support.example.com with different files. How do I add subdomain support with Lighttpd web server under UNIX or Linux operating systems?
[click to continue…]

Linux Date Command: Convert Named Stats Dump Date

The rndc stats commands created /var/named/chroot/var/named/data/named_stats.txt file under RHEL 5.x or CentOS 5.x BIND 9 server. However, date is not is correct format. The date is in the following format:
grep ‘Dump’ /var/named/chroot/var/named/data/named_stats.txt
outputs:

+++ Statistics Dump +++ (1263408025)
— Statistics Dump — (1263408025)
+++ Statistics Dump +++ (1263408071)
— Statistics Dump — (1263408071)
+++ Statistics Dump +++ (1268304218)
— Statistics Dump — (1268304218)
+++ Statistics Dump +++ (1268304248)
— Statistics Dump — (1268304248)

How do I convert date (e.g., 1263408025) in a human readable format?
[click to continue…]

BIND: Max open files (1024) is smaller than max sockets (4096) Error and Solution

While going though my logs I found that BIND9 on Debian version 5.x is giving a warning which read as follows:

max open files (1024) is smaller than max sockets (4096)

How do I fix this problem?
[click to continue…]

nslookup / host Dns Client Testing Command Not Found on Debian / Ubuntu Linux

Q. I’m not able to run nslookup or host command under Debian or Ubuntu Linux. In fact, these commands are missing from my installation. How do I install nslookup and related dns client commands?
[click to continue…]

Q. How do I turn on DNS server logging so that I can see all the queries on my CentOS 4.0 server?

A. You can use rndc command which controls the operation of a name server. It supersedes the ndc utility that was provided in old BIND releases. If rndc is invoked with no command line options or arguments, it prints a short summary of the supported commands and the available options and their arguments.

rndc communicates with the name server over a TCP connection, sending commands authenticated with digital signatures. In the current versions of rndc and named named the only supported authentication algorithm is HMAC-MD5, which uses a shared secret on each end of the connection. This provides TSIG-style authentication for the command request and the name server\u2019s response. All commands sent over the channel must be signed by a key_id known to the server.

Task: Turn on logging

Type the following command as root to toggle query logging:
# rndc querylog

Task: View bind sever query log

Once this is done, you can view all logged queries usimg /var/log/messages file. To view those queries, type:
# tail -f /var/log/messages

Task: Turn off logging

Type the following command as root to toggle query logging:
# rndc querylog

Mount NFS filesystem in two different directories on same system

Q. How do I mount NFS filesystem twice in two different dirs on same Linux client?

NFS Server : nfsserver:/data

Mount to dirs /home/data and /backup

A. You will not able to do that. However mount command has bind option to remount part of the file hierarchy somewhere else.

Procedure

First mount to /home/data
# mount -t nfs4 nfsserver:/data /home/data
Now bind /home/data to /backup
# mount --bind /home/data /backup
# ls /backup /home/data

Read man page of mount command for more information:
$ man mount