Posts Tagged ‘centos’

Setting up NTP on RHEL/Centos

Sunday, October 4th, 2009

I may have missed something obvious, but it seems that the default ntp.conf shipped with RHEL 5 is not working…

I just want to configure my servers to sync time with a public NTP server. Using the default configuration (/etc/ntp.conf), ntpd starts correctly but never writes anything to /var/log/messages besides the first lines at startup.

What I have found is that the “restrict” lines in the default ntp.conf file do not seem to allow ntpd to connect to the servers that are listed there (*.centos.pool.ntp.org by default). Adding the following lines fix the problem :

restrict 0.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 1.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
restrict 2.centos.pool.ntp.org mask 255.255.255.255 nomodify notrap noquery
# the following is in the default ntp.conf file
server 0.centos.pool.ntp.org
server 1.centos.pool.ntp.org
server 2.centos.pool.ntp.org

Also (as an alternate fix) I had success with the following servers :

server ntp.isc.org
server clock.redhat.com

I’m not sure why, I suspect that’s because in the DNS they resolve to a single IP address, but I don’t really understand what would cause this.

Anyway, with these changes my NTP now sync properly, and I can see the “synchronized to 206.248.171.198, stratum 1″ lines in the /var/log/messages file.

server ntp.isc.org
server clock.redhat.com

How to make a safe kernel upgrade by SSH

Friday, February 15th, 2008

There’s been a local root exploit discovered in the Linux kernel recently, which obliged me to manually compile new kernels on some of my servers. The problem with that : I rarely compile new kernels for these servers, so I’m not sure it will boot at all. Moreover, the servers are located in a datacenter I can’t access easily, so manually choosing the kernel in the grub boot menu is not an option. Fortunately, grub provides a feature to help with that. (more…)

CentOS 4.5 -> 4.6 update on a Virtuozzo VPS

Tuesday, December 18th, 2007

Updating from CentOS 4.5 to 4.6 is very easy. All you have to do is use yum : a simple “yum update” is all you need to do.

However, when updating CentOS to the new 4.6 version on a Virtuozzo VPS, you may encounter a dependency error. On my VPS, I got the following message : (more…)

Xen troubleshooting

Saturday, November 17th, 2007

Some problems you may have with Xen and their possible causes…

These are problems I had with CentOS5 host/guests setup using LVM without a virtual disk, and without using the Redhat’s virt-manager tool, but of course it may also apply to other kinds of setup.

(more…)

CentOS 5 Xen images – part 2: installing the Xen guest

Saturday, November 3rd, 2007

OK, so you downloaded an image from jailtime.org or you made your own image as described in my previous post, and now you want to install a Xen guest using it. Here’s how to do it :

(more…)