Recipes for installing Akara on Linux
If you are adding a recipe section, if possible, include steps to install Amara in that section recipe.
See also:
Contents
Ubuntu Karmic, system Python 2.6, using pip
Characteristics:
- Using system Python 2.6 as installed for all users
- Akara set up to be run by a specific user
Python and daemon users
Install Python development libraries and other recommended packages site-wide, including pip
aptitude install build-essential python-pip python-dev python-html5lib python-httplib2 python-dateutil
Set up akara users
#Just hit enter at all prompts adduser --disabled-password akara #another for production adduser --disabled-password akara-test #one daemon user for a set setup
Akara config per daemon user
Switch to each user in turn (e.g. su - akara-test). Create ~/.pydistutils.cfg with following contents:
[install] home = ~/.local
Install Amara from a nightly snapshot:
pip install http://files.akara.info/00-amara-latest.tar.bz2 pip install http://files.akara.info/00-akara-latest.tar.bz2
Note: you can use the Mercurial trunk instead as follows:
pip install -e hg+http://bitbucket.org/uche/amara#egg=amara pip install -e hg+http://bitbucket.org/uche/akara#egg=akara
Now prep the Akara config, as in Akara/Quick_start:
mkdir $HOME/.config/ mkdir -p $HOME/.local/lib/akara/logs mkdir -p $HOME/.local/lib/akara/modules cp lib/akara.conf $HOME/.config/ #Copy a module for testing cd $HOME/.local/lib/akara/modules wget http://bitbucket.org/uche/akara/raw/tip/demo/modules/echo.py
You may need to update PATH and PYTHONPATH, e.g. by adding the following to the ~/.profile (and running it on the command line for the first time)
export PATH=$PATH:~/.local/bin export PYTHONPATH=$PYTHONPATH:~/.local/lib/python
Start the Akara server:
akara start
If you get any errors, check the log at ~/.local/lib/akara/logs/error.log. You might need to tweak the config at ~/.local/.config/akara.conf
For sure you will want to make sure each akara daemon user is configured to use a different port (e.g. 8880, 8881, 8882, ...).
System Python 2.6 on Debian Lenny
Characteristics:
- System Python 2.6 installed for all users
- Akara set up to be run by a specific user
Debian Lenny comes with with Python 2.5, but 2.6 is preferred. You can add Python 2.6 by adding the experimental repository to /etc/apt/sources.list
deb http://ftp.debian.org/debian/ experimental main contrib non-free
Feel free to change http://ftp.debian.org/debian/ to any mirror, if you prefer. Then:
aptitude install python2.6
aptitude update
See also:
Install needed development libraries and other recommended packages site-wide
sudo aptitude install python2.6-dev build-essential python-html5lib python-httplib2 python-dateutil
Note: Debian Lenny comes pretty darned bare-bones. I recommend installing a bit more:
sudo aptitude install curl locate
The rest will be installed for a local user. Switch to that user and create a ~/.pydistutils.cfg with the following:
[install] home = ~/.local
You may need to update PATH and PYTHONPATH, e.g. by adding the following to the ~/.profile (and running it on the command line the first time by entering . ~/.profile)
export PATH=$PATH:~/.local/bin
export PYTHONPATH=$PYTHONPATH:~/.local/lib/python
if [ "$PYTHONPATH" ]; then
export PYTHONPATH=$PYTHONPATH:~/.local/lib/python
else
export PYTHONPATH=~/.local/lib/python
fi
You may need to update PATH and PYTHONPATH, e.g. by adding the following to the ~/.profile (and running it on the command line the first time as follows:
. ~/.profile
Install Amara from a nightly snapshot:
mkdir $HOME/dl; cd $HOME/dl
wget http://files.akara.info/00-amara-latest.tar.bz2
mkdir $HOME/src; cd $HOME/src
tar jxvf $HOME/dl/00-amara-latest.tar.bz2
cd amara
python setup.py install
Install Akara from a nightly snapshot:
cd $HOME/dl
wget http://files.akara.info/00-akara-latest.tar.bz2
cd $HOME/src
tar jxvf $HOME/dl/00-akara-latest.tar.bz2
cd akara
python setup.py install
Custom (/usr/local/) Python 2.6 on Debian Lenny
Characteristics:
- Custom Python 2.6 installed for all users. (To instead install a system Python.2.6 see an alternate recipe)
- Akara set up to be run by a specific user
Make sure you're set up to build C packages, e.g.:
sudo aptitude install build-essential
Lenny comes with Python 2.5. You can do just the following as root, to get Python 2.6 installed:
mkdir $HOME/dl; cd $HOME/dl
wget http://www.python.org/ftp/python/2.6.3/Python-2.6.3.tar.bz2
mkdir $HOME/src; cd $HOME/src
tar jxvf $HOME/dl/Python-2.6.3.tar.bz2
cd Python-2.6.3*
./configure --enable-unicode=ucs4 #default prefix is /usr/local
make
make install #This is the only line that really needs the root privs (to access /usr/local)
Grab and install http://pypi.python.org/pypi/distribute/0.6 Distribute, the Setuptools replacement. These instructions will continue with a root user install.
wget http://nightly.ziade.org/distribute_setup.py
python distribute_setup.py
The rest will be installed for a local user. Switch to that user and create a ~/.pydistutils.cfg with the following:
[install] home = ~/.local
Install some recommended packages:
easy_install html5lib
Install Amara from a nightly snapshot:
mkdir $HOME/dl; cd $HOME/dl
wget http://files.akara.info/00-amara-latest.tar.bz2
mkdir $HOME/src; cd $HOME/src
tar jxvf $HOME/dl/00-amara-latest.tar.bz2
cd amara
python setup.py install
Install Akara from a nightly snapshot:
cd $HOME/dl
wget http://files.akara.info/00-akara-latest.tar.bz2
cd $HOME/src
tar jxvf $HOME/dl/00-akara-latest.tar.bz2
cd akara
python setup.py install
