Posts Categorized: linux

BIND on CentOS 5

The version of Bind in the normal Red Hat / CentOS repositories is a little out of date. To get more up-to-date versions (9.7.4 at the time of writing) use the Centalt and EPEL repositories. Create the following file: vi /etc/yum.repos.d/centalt.repo And add the following to it: [CentALT] name=CentALT Packages for Enterprise Linux 5 –… Read more »

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: wget http://skipfish.googlecode.com/files/skipfish-2.01b.tgz tar xzf skipfish-2.01b.tgz cd skipfish* cp ./dictionaries/medium.wl . make ./skipfish -o ./myreport http://domain.co.uk/index.php Skipfish will create an HTML report in the ./myreport directory… Read more »