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 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 /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
# 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_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:

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
# ./ syncdb
# ./ txcreatedirs
# ./ 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

# ./ $IPADDRESS:8088

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 ./ syncdb –migrate (if you get migration errors, the simple ./ migrate does not work always)
    use ./ runserver (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:

    tar zxvf contact_form-0.3.tar.gz
    cd contact_form-0.3
    python 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 ./ 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.


    • 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: Logo

You are commenting using your 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 )

Connecting to %s