Configuring Bind RNDC

RNDC is a useful mechanism for administering DNS servers. If it is not configured, BIND complains about it.

Determine the locations where RNDC expects to find the config files.

# rndc status
  rndc: neither /etc/rndc.conf nor /etc/rndc.key was found

Create the rndc config file:

# rndc-confgen > /etc/rndc.conf

Thy rndc conf file should also have the contents that need to go to "/etc/named.conf". See sample below:

# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "aitNuyDz9NkSZ0MbxeQKcQ==";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };

Once the key and control section has been added to named.conf, restart named and test again with:

# rndc status

nginx server status

(via wiki.nginx.org)

The stub_status module provides the ability to get some stats from nginx...

active connections -- number of all open connections including connections to backends

server accepts handled requests -- nginx accepted connections, handled connections (no one was closed just it was accepted), and handles requests (requests per connection = handles requests / handled connections)

reading -- nginx reads request header

writing -- nginx reads request body, processes request, or writes response to a client

waiting -- keep-alive connections, actually it is (active - reading + writing)

openvz tmpfs and dcachesize

When using tmpfs inside OpenVZ containers, make sure to monitor and increase dcachesize (directory and inode entries) appropriately.

tmpfs mounts can be used to speed up applications doing lots of read/writes to temporary diskspace such a php sessions and mysql tmp directory.

Mount using "/etc/fstab":

tmpfs   /dev/shm        tmpfs   noexec,nosuid,nodev   0 0
tmpfs   /var/lib/php/session    tmpfs   size=500M,noexec,nosuid,nodev,noatime     0 0

Active Directory Integration with Centrify DirectControl Express on Ubuntu 11.10 (Oneiric)

(via www.ubuntugeek.com)

Centrify Express is a comprehensive suite of free Active Directory-based integration solutions for authentication, single sign-on, remote access, file-sharing, monitoring The #1 Choice for Active Directory Integration and cloud security for cross-platform systems. It is the quickest and most proven solution for integrating UNIX, Linux and Mac systems with Windows, and delivers more functionality and more to upgrade to when compared to other free offerings.

Flush deferred messages in sendmail queue

(via stephan.paukner.cc)

Whenever sendmail has to deliver mails to other hosts which cannot be reached at that time, the messages are kept in the queue. Although the other hosts could be reached again and you want to tell sendmail to flush the mail queue, the command

sendmail -q -v

does not really try to reconnect to these hosts and still assumes that the connection timed out. The reason is that the hoststatus is cached, per default for a period of 30 minutes. Using

sendmail -OTimeout.hoststatus=0m -q -v

you can re-run the mail queue and force sendmail to reconnect to the hosts.

watching nginx server status

Once you have turned on nginx stub_status and enabled access from localhost:

  location /nginx_status {
    stub_status on;
    access_log off;
    allow 127.0.0.1;
    deny all;
  }

You can now watch the the status realtime with:

watch -n1 'curl localhost/nginx_status 2>/dev/null'

A solution to the umask problem: inotify to force permissions

(via en.positon.org)

Finding a good solution for sharing files between Linux users is a nightmare.

If using a unique UID is not a problem, it's the most simple solution. All clients access files with the same UID. This way you cannot know who does what, and users cannot fine tune access rights.

Remove all messages from exim queue

exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash

`exim -bp`, lists the messages in queue, which is piped through awk, printing to output "exim -Mrm {MessageID}" which is further piped into bash for execution.

Dec to hex converter

(via www.maxi-pedia.com)

Dec to hex converter (or a dec to hex convertor) is a tool used to convert numbers expressed in the decimal format into hexadecimal or short hex format. Dec to hex conversion is common when working with web sites and graphics...

EDAC - Error Detection And Correction

(via www.kernel.org)

The 'edac' kernel module goal is to detect and report errors that occur
within the computer system running under linux.

Syndicate content