Posts Categorized: linux

USB Multiboot Drive

This tool from pendrivelinux.com is a useful utility to help create a bootable USB pen drive with a menu system for booting into multiple operating systems. It works from within Linux/Ubuntu although there is a Windows tool available too. Useful for creating Live CDs for partitioning, virus checking, installing and includes persistent storage.

Linux: What is using all the Swap?

On Linux to discover which processes are using all the swap run top press ‘O’ (capital letter o) then ‘p’ then ‘enter’ Processes should be sorted by their swap usage.As shown in the screen below the minilogd process is using all the swap space on this machine. Looks like minilogd was gradually using up swap… Read more »

Uptime 4 years

Since I like posting screeshots of uptime figures here is one of an anti-spam machine up for 1496 days (just over 4 years). The machine is running Red Hat 4.

LAMP on Ubuntu

There are several different commands that can be used to install Apache and MySQL services with PHP support: sudo apt-get install tasksel && sudo tasksel sudo apt-get install lamp-server^ sudo apt-get install apache2 libapache2-mod-php5 php5 php5-cli php5-mysql php5-gd php5-mcrypt php5-curl mysql-client mysql-server libmysqlclient15-dev phpmyadmin   For number two the carat at the end is important.

cPanel: Adding Apache and PHP Modules

I needed to add mysqli support to cPanel and did so by logging in to the WHM on port 2087 scrolling down the left menu to Software and clicking EasyApache (Apache Update) then followed the steps to recompile with my chosen options. Continuing with the default options were necessary and ticking MySQL Improved Extension This… Read more »

Changing the hostname in CentOS

Background: I made a tar backup of one system and wanted to untar that onto different hardware. A bit like cloning. However I needed to make sure the hostname and network settings were those of the new machine and not the cloned machine. So for future reference … Change the Hostname vi /etc/hosts Change the… Read more »

Zero Filling a Disk in Linux

The simple way to wipe or zerofill a disk is: dd if=/dev/zero of=/dev/sd? bs=1M However I found an article describing how to zero-fill with a progress indicator using pipebench, installed on Debian/Ubuntu with: sudo apt-get install pipebench then use: tr ‘\000’ ‘\377’ < /dev/zero | pipebench | sudo dd of=/dev/sd? Substitute the question mark for… Read more »

Website Vulnerability Scanning

So I tested out Skipfish today to do a quick check on a website / web server. Hosted on Google at: http://code.google.com/p/skipfish/ download it, extract it and make and run:

Skipfish will create an HTML report in the ./myreport directory in the file index.html For more info read the well written README files in… Read more »

Get Image Dimensions on the COmmand Line

Occasionally useful to find out the dimensions of an image without having to load an image editor or file manager. From the ImageMagick toolkit: identify myimage.jpg tiffinfo myimage.tif pnginfo myimage.png