Category Archives: linux - Page 2

How to send email from linux console

Sending an email from console is an easy procedure that comes in handy. I use it a lot, mainly when I setup a new mail server to send test email or when I want to send the contents of a big configuration file.

To install the mail command in red-hat based distributions, issue Read more »

create a database in postgreSQL

Recently I was asked for a postgres database by a web application. Working with mysql all the time I didn’t have a clue about postgres commands, it was an easy procedure after all.

Howto create a database

There are two ways to create a new database Read more »

identifying your hdd from cli

lets say you have two identical hdd in your linux box in a software raid1 setup. one of them fails and you have a nice degraded array. you have to replace the failed hdd and rebuild the array. but which one is to replace??

let’s say sda is the working hdd, issue the following command

hdparm -I /dev/sda | head -8

and you should see


ATA device, with non-removable media
Model Number:       WDC WD6400AACS-00G8B1
Serial Number:      WD-WCAUF2974726
Firmware Revision:  05.04C05
Transport: Serial, SATA 1.0a, SATA II Extensions, SATA Rev 2.5

voila, there you have the model number and the serial of the hdd 🙂

optimizing ispconfig3 for a low end vps

ISPConfig 3 is a very nice open source hosting control panel for Linux based systems. Here are some things you can do in case you are running ispconfig3 on a low end vps and you want to free up resources. This post is based on centos and ispconfig3 v3.0.3.2

php handler

Preffer suPHP as the php handler for your websites

remove eaccelerator


yum erase php-eaccelerator

to remove eaccelerator

disable clamav

ClamAV is an open source (GPL) antivirus engine designed for detecting Trojans, viruses, malware and other malicious threats. ispconfig uses clamav to scan email attachments. By disabling clam you’ll gain a lot of ram

Read more »

installing froxlor control panel with nginx on centos

While there are a lot of control control panels for apache, I believe this is the sole for nginx.

For this setup to work you should already have nginx, mysql and php installed and configured in your system.




fetch the latest version to your server


Read more »

32bit vs 64bit for a low end vps

low end vps are getting cheaper and cheaper nowadays and everybody with basic knowledge of Linux is preferring them over shared hosting. On a low end vps things are a bit more complicated than with high end ones, ram is precious. For every service needed for the vps, the first thing you think about is ram. What about the operating system architecture? Most of us are preferring 32bit versions for the operating system because we’ve heard that they are better at saving ram, but what is the difference?

is it a couple of MB? or hundrends of them?

In the following post i’m testing the  32bit version of centos 5.5 against the 64bit to find out. I’ll be installing virtualmin GPL version for each architecture, with all services enabled at post installation wizard, except postgres. For this test i used a not so low end vps, it is an openvz with 512guaranteed/1024burstable ram

Read more »

setting up nfs behind firewall in centos

Setup nfs in your system then issue “rpcinfo -p” to check the used ports.

rpcinfo -p

You’ll see something like this

program vers proto   port
100000    2   tcp    111  portmapper
100000    2   udp    111  portmapper
100011    1   udp    875  rquotad
100011    2   udp    875  rquotad
100011    1   tcp    875  rquotad
100011    2   tcp    875  rquotad
100003    2   udp   2049  nfs
100003    3   udp   2049  nfs
100003    4   udp   2049  nfs
100021    1   udp  32769  nlockmgr
100021    3   udp  32769  nlockmgr
100021    4   udp  32769  nlockmgr
100021    1   tcp  32803  nlockmgr
100021    3   tcp  32803  nlockmgr
100021    4   tcp  32803  nlockmgr
100003    2   tcp   2049  nfs
100003    3   tcp   2049  nfs
100003    4   tcp   2049  nfs
100005    1   udp    892  mountd
100005    1   tcp    892  mountd
100005    2   udp    892  mountd
100005    2   tcp    892  mountd
100005    3   udp    892  mountd
100005    3   tcp    892  mountd

Read more »

uptime script

You want to be able to see the status of your server without logging in via ssh?

You can create a simple script to display the uptime and load of your server in 1 minute

create a new file eg. uptime.php and insert


upload it to your webservers public directory, and you’re done

go to

and you’ll see

21:01:46 up 15 days, 2 min, 1 user, load average: 0.08, 0.06, 0.01

open source control panels

In the following post you’ll find the most popular open source and free (as in beer) control panels, there are other control panels but most of them are outdated and discontinued. I didn’t write my personal opinion about them, because I haven’t tested them all. Maybe in the near future I’ll write a review about them. enjoy…

Virtualmin licence:GPL

Virtualmin is a web hosting control panel for Linux and UNIX systems based on the Open Source web-based systems management GUI, Webmin.

There is also a paid version called virtualmin professional with extra features and support.

Support is provided by the active forums. Paid support is provided for paid edition only.

for an online demo of the professional edition visit:

Installation is done by an automated installer script.

Virtualmin installer supports :

CentOS 4 and 5 on i386 and x86_64
Debian 4.0 and 5.0 on i386 and amd64
Ubuntu 8.04 LTS and 10.04 LTS on i386 and amd64
Solaris and OpenSolaris 10 and 11

Read more »