HOWTO: install Transifex with Mysql on Debian Lenny

Transifex is a not-so-well-known opensource localization platform, written in Python and running on Django (a Python based application server, if you don’t know it). So, being not so well known, there isn’t a lot of documentation about it, and how to install it under Debian 5 Lenny it’s almost undocumented. So, here we go.

First of all, you have to install some packages. Luckily Lenny has got lot of them, although not all the needed

# aptitude install django python-urlgrabber python-setuptools python-pygments python-openid python-markdown python-httplib2
# aptitude install subversion
# aptitude install python-mysqldb
# aptitude install build-essential python-dev

These should be all the packages needed by Transifex which are available as deb packages. Now let’s install the remaining ones through easy_install

# easy_install django-authopenid django-pagination
# easy_install -f http://transifex.org/files/eggs/ contact_form tagging
# easy_install django-notification
# easy_install mercurial

Now the last package, django_evolution which is, AFAIK, only available as an SVN checkout from Google Code

# svn checkout http://django-evolution.googlecode.com/svn/trunk /tmp/django-evol
# mv /tmp/django-evol/django_evolution /usr/lib/python2.5/site-packages/

Now we can download the Transifex tarball

# cd /tmp && wget http://transifex.org/files/transifex-0.6.tar.gz
# tar xzvf transifex-0.6.tar.gz
# cp -a transifex-0.6/transifex /var/www

Now we have to edit some configuration files located in /var/www/transifex/settings with particular attention to the database backend configuration stored in 20-engines.conf. Take this as example

DATABASE_ENGINE = 'mysql'
DATABASE_NAME = 'transifex'
DATABASE_USER = 'transifex'
DATABASE_PASSWORD = 'secret_password'
DATABASE_HOST = 'ADDRESS-OF-YOUR-DB'             # Set to empty string for local socket
DATABASE_PORT = '3306'             # Set to empty string for default

obviously you must create a database (called ‘transifex’ in this example) in your database server and give full permissions to a dedicated user (called ‘transifex’ with ‘secret_password’ as password in this example). You can do it with these commands in your mysql console:

CREATE DATABASE transifex;
GRANT ALL ON transifex.* to 'transifex'@'%' IDENTIFIED BY 'secret_password';

Now we can run the configuration scripts, located in the transifex’s base dir

# cd /var/www/transifex
# ./manage.py syncdb
# ./manage.py txcreatedirs
# ./manage.py runserver

Now we can execute a server instance, listening on address $IPADDRESS and port 8088,  and then we can access it fro http://$IPADDRESS:8088 in our web browser. Remember to use nohup if yoiu want to detach it from the console

# ./manage.py $IPADDRESS:8088
Advertisements

5 thoughts on “HOWTO: install Transifex with Mysql on Debian Lenny

  1. Cool, great stuff. This helped me, thanks.
    I installed Transifex on etch, but the instructions seem to have worked fine.

    The last manage command is missing a runserver I guess. :)

  2. Hi,

    Nice tutorial! After a lot of struggling with one last bit I would like to add the following info:

    use ./manage.py syncdb –migrate (if you get migration errors, the simple ./manage.py migrate does not work always)
    use ./manage.py runserver 0.0.0.0:8088 (if you want it to listen to all ips)

  3. Hi,

    Nice Tutorial. New at django and python, I followed and adapted where needed.
    Just used it for a new install in Ubuntu 11.04. A few adjustement needed:

    apt-get python-django instead of django

    The easy install of form_contact does not work anymore, but the documentation in the form_contact packages allows for a proper install:

    wget http://django-contact-form.googlecode.com/files/contact_form-0.3.tar.gz
    tar zxvf contact_form-0.3.tar.gz
    cd contact_form-0.3
    python setup.py install

    The django-evol needs to be put in python 2.7 (default in Ubuntu 11.04)

    All that goes well till the final setup: none of the ./manage.py commands work. They all request ‘missing modules’, the first one encountered being django_filters

    Knowing very little of both django and python I am currently stuck. Information found on python web page does not provide easy help for a newbie. Seems something related to pythonpath, but I cant get sys.path updated (neither through python directly … did not find the save command, not though pythonpath in linux as it did not recognize the command).

    Little help, please.

    Dominique

    • Self reply… Most of the install can be done through apt-get those days – with a limited number of exception that you can grab through easy_install. I should probably have started that way. Looking at the internal manual give idea on all the dependencies requires – many more in version 1.0.0

      I got it almost working. I am just missing a load of documents in site_media.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s