System Admin

Linux Hardware Discovery and Performance Tools

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

Vital Command Line Tools for Linux Server Migration

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 ...

Changing permissions on Files or Directories only in Linux

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 {} \;

Delete Directory Tree in Linux

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

Backing Up A Linux Server

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.

phpMyAdmin RPM install - Access Forbidden

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.

Syndicate content