How to install Python 2.4 on Linux
Saturday, 07 April 2007

DataTechLabs applications which are based on Python, require Python version 2.4 or newer. It applies to all ArrowBilling and LongBow Billing versions 1.5.0 and newer which are based on BSDRadius. It also applies to ArrowSwitch and CrossbowExchange. Unfortunatelly many Linux distros including RHEL, Fedora, Centos still comes with Python 2.3 installed and installation of 2.4 is difficult as it can break functioning of many applications.

Simplest workaround for this is to install 2.4 under separate prefix (for example, /usr/home/dtl/) and use it exclusively for DataTechLabs applications.

Here is how to do it:

  1. unpack it and build with prefix:

  2. tar -xvzf Python-2.4.4.tgz
  3. cd Python-2.4.4
  4. ./configure --prefix=/usr/home/dtl/
  5. make
  6. make install

Now, when installing DataTechLabs applications, you will have to use Python binary from : /usr/home/dtl/bin/python

For example, installation of BSDRadius is following:

cd billing/bsdradius/
/usr/home/dtl/bin/python setup.py install

For wobble library:

cd billing/wobble/
/usr/home/dtl/bin/python setup.py install 
 

This will make BSDRadius binary and other binaries under same prefix as Python 2.4. I.e. binaries will be under: /usr/home/dtl/bin, config files under /usr/home/dtl/etc . 

The start script of bsdradius should be modified to use new Python to handle the application:

Edit /usr/local/dtl/bin/bsdradiusd:

Replace line:

exec /usr/local/dtl/bin/bsdradiusd.py $@

with:

exec /usr/local/dtl/bin/python /usr/local/dtl/bin/bsdradiusd.py $@ 

 





Digg!Del.icio.us!Slashdot!Technorati!Free social bookmarking plugins and extensions for Joomla! websites! title=