Blogs

Keep server time in sync with ntp

NTP is a protocol designed to synchronize the clocks of computers over a network, easy to setup and probably comes packaged with the OS.

Here's what was needed on a Fedora-6:

  1. Install the ntp rpm if not already installed.
    # yum install ntp
  2. Open up UDP port 123, both incoming and outgoing on the firewall.
  3. Find a reliable close ntp pool server or you could just use the hub, "pool.ntp.org" and add it to the server list in "/etc/ntp.conf" file.
  4. Make sure your computer's clock is set to something sensible (within a few minutes of the 'true' time) - you could use `ntpdate pool.ntp.org`, or you could just use the date command and set it to your wristwatch, and also synchronize the hardware clock.
  5. Make sure ntp starts up at boot and then start the service:
    # /sbin/chkconfig ntpd on
    # /sbin/service ntpd start
  6. Ater some time if you want to see exactly what is happening, you can run the query command:
    # ntpq -pn localhost

Howto Setup a Remote Calendar using WebDAV with Mozilla Sunbird

Mozilla Sunbird® is a cross-platform calendar application, built upon Mozilla Toolkit. Our goal is to bring Mozilla-style ease-of-use to your calendar, without tying you to a particular storage solution.

Full Story

How to Install the Eternity Screensaver in Ubuntu

The Eternity Screensaver plays animations of ray-traced scenes which took days or even weeks to generate. The reasoning is that these clips should look more impressive than anything which can be generated on-the-fly.

Full Story

Anatomy of Linux Kernel

Immensely useful article for learning about Linux kernel at IBM DeveloperWorks.

Mirroring sites with lftp

The "mirror" command is all you need to copy/mirror a site with lftp:

$ lftp
lftp :~> connect ftp.domain.tld
lftp ftp.domain.tld:~> login <username>
lftp ftp.domain.tld:~> mirror

Here's a one liner:

$ lftp -e mirror -u <username>,<password> <host>

Playing VCD with mplayer

I tried:

$ mplayer vcd://

It would come up with:

Playing vcd://.
track 01:  adr=1  ctrl=4  format=2  00:02:00  mode: 1
track 02:  adr=1  ctrl=4  format=2  00:08:72  mode: 1
...

but exit without playing the tracks.

Track 1 also failed to play, however track 2 did playback the video.

$ mplayer vcd://2

Auto restart apache on segmentation fault error

Recently a particular folder in a site started coming up with blank php pages and the root cause being Segmentation fault after memory exhaustion. The subfolder contents would only come up after doing a restart of apache.

So something tried to access a region of memory that it did not have rights to. May be due to either bad RAM, or a code problem.

My first instinct was eAccelerator as I had done a recent php update and had not re-compiled it.

I still had the same issue the next day and bumped up the memory_limit from 16M to 32M in php.ini and from 32M to 64M in eaccelerator.ini .

How to view CHM (Microsoft Compiled HTML Help) files in Ubuntu

Microsoft Compiled HTML Help is a proprietary format for online help files, developed by Microsoft and first released in 1997 as a successor to the Microsoft WinHelp format.

Full Story

How to Install Ruby on Rails (ROR) in Ubuntu

Rails is a full-stack framework for developing database-backed web applications according to the Model-View-Control pattern. From the Ajax in the view, to the request and response in the controller, to the domain model wrapping the database, Rails gives you a pure-Ruby development environment. To go live, all you need to add is a database and a web server.

Full Story

Migrating ISPConfig CentOS server

Recently did a full server migration with ISPConfig installed. Luckily it was within the same distro but an updated version of CentOS-4.5, had to add centos-4.5 support to ispconfig conf file prior to the install. I also made sure that I was installing the same version of ISPConfig on the new server, and upgrading to the latest once the migration was complete and the server stable.

These are just notes I took down for later reference, just in case it happens again!!

Preparation:

In preparation for the migration, create A records to point to the new server IP, for all domains to do temporary redirection:

{newhost.domain.tld} : xx.xx.xx.xx
www1.{domain.tld}    : xx.xx.xx.xx

Syndicate content
Comment