Categories
HowTos Linux

How to install or Uninstall APF (Advance Policy Firewall) on CentOS / Ubuntu / BackTrack or any Linux distro

APF Advance Policy firewall that provides you an easy way to configure iptables rules. This is a short snippet how can you install/configure or uninstall APF on your Linux Server.

wget http://www.rfxn.com/downloads/apf-current.tar.gz
tar -zxvf apf-current.tar.gz
cd apf-9.7-2
./install.sh

APF installation is completed.

How to allow specific incoming ports in APF ? e.g 80,21
vim /etc/apf/conf.apf

Categories
HowTos Linux

Mod_geoip rpm for Apache installation on RHEL/Centos 6

Mod_geoip is an Apache module use for determination of City/Country/ISP of a visitor. In CentOS 6 mod_geoip is not available in the default set repository so you will need to download it manually.

wget http://download.fedora.redhat.com/pub/epel/6/x86_64/mod_geoip-1.2.5-5.el6.x86_64.rpm
rpm -ivh mod_geoip-1.2.5-5.el6.x86_64.rpm
/etc/init.d/httpd restart

Completed. You should see  mod_geoip.conf under /etc/httpd/conf.d/

ls /etc/httpd/conf.d/mod_geoip.conf

Categories
HowTos Linux

High Availability Opensource Storage solution using DRBD, heartbeat, NFS, Lighttpd – part1

Our last post can be found here, where we described why did we chose DRBD along with heartbeat, lighttpd and NFS. It is recommended to read that first to have idea why we are setting up this.

In this article i will explain how to configure it step by step. This is copy, paste HowTo you will need to replace the IPs and other information according to your requirements.

Example scenario :

node1.hackersgarage.com - 192.168.0.61
node2.hackersgarage.com - 192.168.0.62

LAN Virtual IP for NFS Service
Virtual IP for LAN - 192.168.0.63

Internet Virtual IP for Lighttpd Service
static.hackersgarage.com - 75.127.109.111
Categories
HowTos Linux

How to change Linux default Login Shell?

Most of the Linux flavors use BASH as default shell. But as per requirements or interest people tend to use other shells. In our case, we saw server had CSH set as default SHELL.

Now, there is a utility called chsh is used for changing your default shell without requiring manual modifications in /etc/passwd

How to use chsh to change your default shell?

First of all look at available shells
cat /etc/shells

# /etc/shells: valid login shells
/bin/csh
/bin/sh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/usr/bin/screen
Categories
HowTos Linux

High Availability Opensource Storage solution using DRBD, heartbeat, NFS, Lighttpd

In this article we will discuss how can you build a high availability storage solution to store your static data.

Case :
Client is running a business portal that have approx. 300-500 MB data uploads per day. There was NFS Storage server which had 500 GB drive which was running out of space. This Server was also running lighttpd web server to provide access for users to view these files.

Problems :
No Failover. (Except offline backup)
When ever server gets done, Users are unable to upload data.
Users are unable to access their data because lighttpd was also running on same server.

Categories
HowTos Linux

How to install ffmpeg on Centos 5 Linux for audio files format conversion

ffmpeg is open source project that produce different audio and video Codecs, players, conversion tools, broadcasting application for live streaming and so on. These all packages are released under GPL License.

This HowTo explains how to install ffmpeg on centos distro linux and audio conversion short tutorial.

Prerequisites :
All commands are run as root.
Internet should be available on Linux box.