System Admin

Posted by george

Trying to set the system time in Webmin caused the following error:

hwclock failed :

The linode I was running did not expose an hwclock interface. The solution was to simply set the timezone thus:

ln -sf /usr/share/zoneinfo/UTC /etc/localtime

/usr/share/zoneinfo  contains a number of different timezone files  which you could use. 

# date
Fri Jun 18 13:44:18 UTC 2010

Posted by george

To track your postfix log, use the tail command from a console.

tail -f /var/log/maillog

Below is a typical connect & send transaction in the log. This email was sent successfully. I have added comments to step through the mail processing.

Posted by editor

Here are some useful utilities to check out what hardware you have installed on your linux server and how it is performing ...

cat /proc/cpuinfo
cat /proc/meminfo
dmesg
lspci
Posted by editor

Here is a crib sheet for the most common and useful commands needed when migrating or backing up a linux server. Thes tools make the work easy and fast. The trouble is that unless you are backing-up manually or migrating servers for a living, must of us only have to deal with these commands occasionally and the exact usage becomes a little hazy over time. below are the basic usage details of tar, wget,mysql and mysqldump ...

Posted by editor

To change file permissions to 644 use ...

# find . -type f -exec chmod 644 {} \;

To change directory permissions to 755 use ...

# find . -type d -exec chmod 775 {} \;
Tags:
Posted by editor

Every now and then I have needed to delete a whole directory tree.  This is the correct command BUT TAKE WARNING! It will delete the whole directory tree without warning, ALL sub directories and files- so make sure you get it right or you can cause SERIOUS damage to your installation. rm -rf folder_name

Tags:
Posted by editor

Having been notified by go-daddy that all my vhost servers were going to need to be rebuilt ( what a major PAIN!), I decided the time had come to move to a dedicated server. Part of this process was to create a back-up archive of the important parts of the server. To archive all my web data I simply create a tar archive of my vhosts directory.

Posted by editor

Using FC6 and SSH into the server, I installed phpMyAdmin using yum. Very straight forward. To access phpMyAdmin you need to enter https://my-server-name/phpMyAdmin This failed with "Access Forbidden". It turns out that the rpm creates a 'phpMyAdmin.conf' file in /etc/httpd/conf.d/ and this file only permits access to 127.0.0.1 by default for security. Because I only ever access remotely, simply modifying the allow directive to my remote ip was sufficient for my needs. Alternatively you could secure your connection using SSL.