Difference between revisions of "CentOS6"

From Leaky
Jump to: navigation, search
(Rate-limiting for rsyslog)
 
(Really flushing nscd cache: added kickstart network info)
 
(5 intermediate revisions by the same user not shown)
Line 13: Line 13:
 
  $SystemLogRateLimitInterval 5
 
  $SystemLogRateLimitInterval 5
 
  $SystemLogRateLimitBurst 500
 
  $SystemLogRateLimitBurst 500
 +
 +
== Disable mingetty on extra tty ==
 +
 +
Edit '''/etc/sysconfig/int''' so that
 +
 +
ACTIVE_CONSOLES=/dev/tty[1-6]
 +
 +
becomes
 +
 +
ACTIVE_CONSOLES=/dev/tty[1-2]
 +
 +
And then to stop the ones that are already running without rebooting:
 +
 +
# initctl stop tty TTY=/dev/tty6
 +
tty stop/waiting
 +
 +
Then repeat for the other ttys.
 +
 +
== named 'rndc status' not working ==
 +
 +
[root@server6122 ~]# rndc status
 +
rndc: connect failed: 127.0.0.1#953: connection refused
 +
 +
Check:
 +
 +
* Portreserve service may interfere with bind
 +
  # service portreserve stop; chkconfig portreserve off
 +
* Permissions on /etc/rndc.key - group should be named, not root!
 +
  # ls -l /etc/rndc.key
 +
  -rw-r----- 1 root named 77 Jan 13  2014 /etc/rndc.key
 +
 +
== Really flushing nscd cache ==
 +
 +
Originally copied from http://stijn.tintel.eu/blog/2012/05/10/how-to-really-flush-the-various-nscd-caches
 +
 +
The nscd caches are saved to disk, usually /var/db/nscd
 +
 +
[root@dev402 ~]# ls /var/db/nscd/
 +
group hosts netgroup passwd services
 +
 +
When you stop nscd, these files will just stay there, so restarting really doesn't flush your nscd caches.
 +
What you need to do is use the --invalidate option, e.g.:
 +
 +
# nscd --invalidate=passwd
 +
# nscd --invalidate=group
 +
 +
== Kickstart config IPv4 and IPv6 ==
 +
 +
Two alternatives for specifying both IPv4 and IPv6 details in the kickstart config
 +
 +
1. All the details on a single line and using --ipv6 and --ipv6gateway to specify the IPv6 details
 +
 +
network --device eth0 --bootproto static --ip=192.168.122.91
 +
  --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1
 +
  --hostname=centos6b-122.bocks.com --ipv6=2a02:af8:1000:82:8000::91/65
 +
  --ipv6gateway=2a02:af8:1000:82:8000::1
 +
 +
2. Two separate network lines specifying the same device
 +
 +
network --device eth0 --bootproto static --ip=192.168.122.91
 +
  --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1
 +
  --hostname=centos6b-122.bocks.com
 +
network --device eth0 --ipv6=2a02:af8:1000:82:8000::91/65
 +
  --ipv6gateway=2a02:af8:1000:82:8000::1
 +
 +
Both options seem to work in CentOS 6.6 although there are some webpages where people have said ipv6gateway doesn't work.

Latest revision as of 23:18, 11 February 2015

Adjust rate-limiting for rsyslog

These instructions are for rsyslog 5.8.10 that comes with CentOS 6

/etc/rsyslog.conf

# Disable rate-limiting completely
$SystemLogRateLimitInterval 0

or

# Set the rate limiting to 500 messages in 5s
$SystemLogRateLimitInterval 5
$SystemLogRateLimitBurst 500

Disable mingetty on extra tty

Edit /etc/sysconfig/int so that

ACTIVE_CONSOLES=/dev/tty[1-6]

becomes

ACTIVE_CONSOLES=/dev/tty[1-2]

And then to stop the ones that are already running without rebooting:

# initctl stop tty TTY=/dev/tty6
tty stop/waiting

Then repeat for the other ttys.

named 'rndc status' not working

[root@server6122 ~]# rndc status
rndc: connect failed: 127.0.0.1#953: connection refused

Check:

  • Portreserve service may interfere with bind
 # service portreserve stop; chkconfig portreserve off
  • Permissions on /etc/rndc.key - group should be named, not root!
 # ls -l /etc/rndc.key
 -rw-r----- 1 root named 77 Jan 13  2014 /etc/rndc.key

Really flushing nscd cache

Originally copied from http://stijn.tintel.eu/blog/2012/05/10/how-to-really-flush-the-various-nscd-caches

The nscd caches are saved to disk, usually /var/db/nscd

[root@dev402 ~]# ls /var/db/nscd/
group hosts netgroup passwd services

When you stop nscd, these files will just stay there, so restarting really doesn't flush your nscd caches. What you need to do is use the --invalidate option, e.g.:

# nscd --invalidate=passwd
# nscd --invalidate=group

Kickstart config IPv4 and IPv6

Two alternatives for specifying both IPv4 and IPv6 details in the kickstart config

1. All the details on a single line and using --ipv6 and --ipv6gateway to specify the IPv6 details

network --device eth0 --bootproto static --ip=192.168.122.91
 --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1
 --hostname=centos6b-122.bocks.com --ipv6=2a02:af8:1000:82:8000::91/65
 --ipv6gateway=2a02:af8:1000:82:8000::1

2. Two separate network lines specifying the same device

network --device eth0 --bootproto static --ip=192.168.122.91
 --netmask=255.255.255.0 --gateway=192.168.122.1 --nameserver=192.168.122.1
 --hostname=centos6b-122.bocks.com
network --device eth0 --ipv6=2a02:af8:1000:82:8000::91/65
 --ipv6gateway=2a02:af8:1000:82:8000::1

Both options seem to work in CentOS 6.6 although there are some webpages where people have said ipv6gateway doesn't work.