Archive for November, 2008

To test the connection between 2 internet location / machines type:
~$ traceroute

( Replace with your domain name, host name or IP Address )
traceroute to (, 30 hops max, 40 byte packets
1 speedport.ip ( 0.302 ms 0.297 ms 0.319 ms
2 * * *
3 ( 51.127 ms 50.901 ms 50.529 ms
4 ( 53.617 ms 55.222 ms 52.688 ms
5 ( 53.424 ms 55.301 ms 55.647 ms
6 ( 56.871 ms 57.604 ms 71.951 ms
7 ( 59.760 ms 58.135 ms 56.870 ms
8 ( 58.378 ms 115.404 ms 58.352 ms
9 ( 57.858 ms 56.213 ms 57.863 ms


To switch / define your default editor type:
~# update-alternatives –config editor

There are 3 alternatives which provide `editor’.

Selection Alternative
1 /bin/ed
*+ 2 /bin/nano
3 /usr/bin/vim.tiny

Press enter to keep the default[*], or type selection number:


In some php 5 versions the flle upload is bugging by default.
Open php.ini and add the following line ( or uncomment if present but not enabled )
upload_tmp_dir = /tmp


To add php modules to your configuration you can easily
use your apt manager:

~# apt-get install php5-gd
~# apt-get install php5-curl


It is strongly recommended to enable open_basedir protection
on shared hosting systems to prevent a complete server hack over php.
Log into WHM and look under security > security center.
The feature jails any user’s php ability inside the public_html directory


To update Cpanel/WHM to the latest version run:
~# /scripts/upcp
Depending on your configuration the latest
Edge, Release, Current or Stable version will be installed


To install PostgreSQL on a Cpanel server run:
~# /scripts/installpostgres
and follow the isntructions. You need assign a password
from the SQL section in WHM.
Recompile Apache with pgsql support.


Monitoring your system basics
To check the disk usage on your system
~# df -h

To check the memory allocation and usage
~# free -m

To visualize your CPU information
~# cat /proc/cpuinfo

To check your network configuration
~# ifconfig

To visualize the running processes, CPU Load and Memory
~# ps aux

To see lifetime running processes
~# top
( type q to leave the program )


Setting File and Folder Ownership
Every file or folder belongs to an owner and a group
To change ownership use the syntax:
~# chown username:usergroup filename
~# chown username:usergroup foldername
To change ownership recursively, meanwhile all files inside a folder:
~# chown -R username:usergroup foldername
To check and visualize your changes type:
~# ls -hal


Setting File and Folder Permissions
Permission are represented by a 3 digit numerical code
First Digit: Owner
Second Digit: Group
Third Digit: Everybody

Permission 0 = no access
Permission 4 = read
Permission 6 = read / write
Permission 5 = read / execute
Permission 7 = read / write / execute

To set permissions use syntax
~# chmod 644 filename
Setting filename to read/write (owner) and read (group and world)
To set permissions recursively for all files inside a folder use
~# chmod -r 755 foldername
Setting foldername and all files inside to raed/write/execute (owner) and read/execute ( group and world )

You can restrict your settings and give permissions only for specified files
~# chmod 644 *.php
Setting all php files inside this folder to read/write – read – read