Crucial Paradigm Australia Official Blog
server administration
How many times have you logged into a server, and need to find out which exact version of the operating system you are running (Linux).
These commands will give you some details:
lsb_release -a
uname -a
cat * /etc/*release*
Question: How do I monitor all traffic on a Linux host, or for a particular port?
Answer: You can use the application tcpdump, here are some examples:
Monitor a particular interface:
tcpdump -i eth0
Monitor a particular port:
tcpdump -i eth0 ‘port 9996′
You can use the following command to list all the drives in Solaris or OpenSolaris. This is useful if you are adding new drives, etc via zfs.
iostat -eE
Or
format
Rather than building from source, there is a much quicker way of installing ntop on CentOS 5 or RHEL. You can do it via yum! Just add the following file: /etc/yum.repos.d/dag.repo:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
Then just run:
yum install ntop -y
If you receive this error while trying to install ntop:
configure: error: cannot find macro directory `m4′
Try creating the directory m4 in the ntop installation directory:
mkdir m4
Rather than building from source, there is a much quicker way of installing rrdtool on CentOS 5 or RHEL. You can do it via yum! Just add the following file: /etc/yum.repos.d/dag.repo:
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
gpgkey=http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
enabled=1
Then just run:
yum install rrdtool
Have you encountered the following error while trying to compile applications from source on your VPS or server?
-bash: ./configure: No such file or directory
To fix this on CentOS, just install make:
yum install make
This article describes how to configure a new partition from free space on a dedicated server, or a virtual machine with full virtualization (such as VMware or XenServer):
- Verify the partitions available on the server: fdisk -l
- Choose which device you wish to use (such as /dev/sda or /dev/sdb)
- Run fdisk /dev/sdX (where X is the device you would like to add the partition to)
- Type ‘n’ to create a new partition.
- Specify where you would like the partition to end and start. You can set the number of MB of the partition instead of the end cylinder. For example: +1000M
- Type ‘p’ to view the partition, and type ‘w’ to save the partition
- Run the command ‘partprobe’ to have the OS detect the new partition table. If it still does not detect the partition table, you might need a reboot.
- Format the partition by doing: ‘mke2fs -j /dev/sdaX’ – where X is the number of the partition you have created.
- Create a directory where you wish to mount the new drive, for example: /newpartition. ‘mkdir -p /newpartition’
- To mount, you can use the following command: ‘mount /dev/sdaX /newpartition’
- If you would like the drive to be mounted automatically each time you boot, add the following to /etc/fstab: ‘/dev/sdaX /newpartition ext3 defaults 1 2′
Make sure you have backups before you perform any formatting, or creating new partitions!

