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
on October 17, 2009 on 23:07
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. :)
on October 28, 2009 on 16:44
Updated. Thanks Cosimo.
on November 26, 2009 on 18:21
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)