HowTos Linux Troubleshootings

How to install mcrypt php extension on CentOS 6

Today a developer friend requested to trouble php mcrypt extension on his newly ordered VPS. Most of the time VPS by default comes up with very basic packages. For example, to build and add mcrypt php extension to existing php installation. You would required gcc, make, libtool, libmcrypt, libmcrypt-devel and may other packages.

mcrypt php extension necessary configuration & compilation : 

View current php version
php -v

Output :
PHP 5.3.3 (cli) (built: Jul 3 2012 16:53:21)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
with the ionCube PHP Loader v4.0.14, Copyright (c) 2002-2011, by ionCube Ltd.

HowTos Linux

Installing Apache 2.4.1 from source on CentOS 6.2 Linux

Apache 2.4.1 is the latest stable version available on download section. Since it is the latest version so it may have plenty of dependencies issues. In my case, i am installing it from source(httpd-2.4.1.tar.bz2).

Currently i am logged in using SSH on Plain CentOS 6.2 server and it has very basic packages installed.

Downloading and compiling Apache 2.4.1

cd /usr/local/src/
tar -jxf httpd-2.4.1.tar.bz2
cd httpd-2.4.1
./configure --prefix=/usr/local/apache --enable-so --enable-deflate --enable-expires --enable-headers --enable-rewrite

HowTos Linux

TakeScreenshot in BackTrack 5 Linux – Screen capturing application

BackTrack 5 Linux is world most popular penetration testing distribution it is compiled purely with Penetration testing tools. TakeScreenshot is popular image capturing application available under all Linux distribution but isn’t available under BackTrack 5.

TakeScreenShot is still available in repository in gnome-utils package, you can follow below guideline.

How to install TakeScreenShot on BackTrack 5 ?

aptitude install gnome-utils

To access application;

Applications -> Accessories -> Take Screen Shot


HowTos Linux

GoAccess on rhel/CentOS 6 Linux – Real time Apache Log Analyzer

About GoAccess :
GoAccess is linux terminal’s real time Apache Log Analyzer and gives you interactive view of Apache access log. It is super fast and provides you real time reporting on the fly.
Currently it support Apache two standard reports 1. Combined Log Format 2. Common Log Format. You can also monitor nginx log if it is configured with Apache log format.

I have been using it for a long time on Ubuntu/BackTrack and CentOS 4. This time i am compiling it on CentOS 6 on our 64bit VPS.

Installing dependencies :
yum install glib2 glib2-devel glibc make geoip

HowTos Linux

YUM behind authenticated ISA Proxy Server


YUM stands for Yellow dog Updated Modified. When you are working on linux server which is behind ISA Proxy Server that requires authentication (user & password) will fail to install a rpm package from remote repository using YUM. So without full filling ISA authentication you will not be able to install anything from remote repositories using YUM and will throw ERROR code 407 with message “The ISA Server requires authorization to fulfill the request..

how to install package using YUM behind authenticated proxy server?

vim /etc/yum.conf

HowTos Linux

Running Lighttpd and Apache on same port, same Server ( CEntOS 6 / RHEL )

In this tutorial i will tell you how to configure Lighttpd and Apache on same port 80 on same server. In our case, we have CentOS 6 on our server but you can follow this for any Linux flavor e.g Ubuntu/BackTrack Linux etc.

Requirements :

  • Two Internet Public IPs ( Configured on eth0 and eth0:0)
  • Lighttpd
  • Apache