Install Tree.io on Ubuntu with Apache

A couple of days ago I stumbled upon a very, very interesting open source project, which I have  quickly fallen in love with. This this project is called Tree.io, an all-purpose business management app for any business. Sounds great, doesnt it? I dont want to bore you with its features, since you can easily look them up yourself here. However some things that I personally really like about this system are:

1) Beautiful user interface
Tree.io just looks awesome, and thats not the end of the story – even though in my opinion it is a big plus, since many open source projects just look crappy and dont have the “good-looking” and “quick-to-use” interfaces like the one that Tree.io offers. Its interface makes it really easy to work with: its ajaxified, fast and organized, which in my opinion is pretty important, since you’ll probably use it pretty often, once you decided to go with it. Just look yourself in this demo video:

2.) Code
Tree.io is written in Python, making use of the Django Web Framework. I think its a good thing. I hate it when complex projects roll the foundation of their software on their own, probably very inferior framwork – if they even use any. Django is a great, flexible and very mature framework, that has a lot to offer. The code is organized, clean, extendable all that stuff… If you’re experienced with MVC Frameworks, let them be Rails or Symfony for instance, you will probably appreciate Django, if you dont know it already.

3.) Features
Tree.io provides a lot of functionality which is probably sufficient for any small to medium sized business, that looks for an all-around solution. I personally dig the project management module. There many project management tools out there, few open source, and very few are in my opinion a pleasure to work with. Tree.io offers solid project management features like milestones, tasks (yeah, even sub tasks) and the ability to collaborate on tasks using project comments, task comments or to chat using Tree.io’s build-in chat functionality.

Conclusion
Different tools for project management, billing and invoicing, file-storage and collaborating, contact management -> I am tired of it. Since I decided to get totally organized in 2012, Tree.io really comes in handy and will be the tool that manages everything that I do 🙂 .

Installation

Unfortunately, the installation docs are not very clear, if you (as I), have never deployed a Django Project before. I assume you’re on a linux box with Ubuntu (or I guess another debian-based distribution) installed. I also assume you will install Tree.io into the /home/projects/treeio directory. Depending on what you actually have installed on your system, there might be some problems, just comment and I will happily answer them. Lets start.

Install apache, Wsgi and mysql:

 $ sudo apt-get install apache2 libapache2-mod-wsgi
 $ sudo apt-get install mysql-server python-mysqldb
 

Install some stuff that we need in order to work with Python and Django (if you havent done so already):

$ sudo apt-get install python-pip python-dev build-essential
$ sudo pip install --upgrade pip
$ sudo pip install --upgrade virtualenv
 

Install dependencies as outlined by Tree.io:

sudo apt-get build-dep python-lxml python-imaging

Create the directory Download and unzip Tree.io:

mkdir /home/projects // if the folder does not already  exist
wget http://tree.io/static/download/treeio.zip
unzip treeio.zip
cd treeio

You’re now into the treeio directory. Lets install all of its dependencies

make

If you get some error message saying that “PIP” wasnt able to find some dependencies such as “PIL”, just remove them from the “requirements.pip” file in the treeio directory. We have already installed them. You can than run “make” again after running “clean make”.

Create the “treeio”-database. I will not cover this here. However you then have to generate all the tables:

make install

The installer will guide you through all the steps. We’re almost done. There are 3 more steps:

Create a VirtualHost. Put a file called “treeio” in the /etc/apache2/sites-available directory and add the following:

Listen 8080
WSGIRestrictStdout Off
<VirtualHost *:8080>
 
    DocumentRoot /home/projects/treeio
 
    <Directory /home/projects/treeio>
        Order allow,deny
        Allow from all
    </Directory>
 
    WSGIScriptAlias / /home/projects/treeio/treeio.wsgi
    
    WSGIDaemonProcess treeio processes=2 threads=15 display-name=%{GROUP}
    WSGIProcessGroup treeio
 
</VirtualHost>

Save your file. We now have to add the “treeio.wsgi”-file in your treeio directory. Add this:

import os
import sys

sys.path.append('/home/projects')
sys.path.append('/home/projects/treeio')

os.environ['DJANGO_SETTINGS_MODULE'] = 'treeio.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()

Almost done! Add the treeio-site to the apache enabled sites:

$ sudo a2ensite treeio

Restart apache!

$ sudo /etc/init.d/apache2 restart

You’re done! Enter the url in your browser: http://yourip:8080 . You will now see your Tree.io installation, the default admin credentials are admin (user) and admin(pass).

Troubleshooting
If it doesnt work for you, the first thing you should do is to enable the debug mode: go to /home/projects/treeio and edit the settings.py file, setting “DEBUG” to “True”. You will now see some more output and error information, given that there is no server error. In this case, as always, check your Apache logs and go from there 🙂 .

15 responses to “Install Tree.io on Ubuntu with Apache”

  1. ryan says :

    First off, thanks for the clear instructions, they’ve turned out to be really helpful.

    I am new to using Apache on a Linux Os. I am currently using Ubuntu as a guest OS on VMware.

    I am encountering a problem when i attempt to start the Apache service, I am told that :

    Order is not allowed here

    commenting out this line i get

    Allow is not allowed here

    With both lines commented out, attempting to connect to the server on port 80 returns an internal server error….

    Any Ideas?

    Thanks

    Ryan

  2. kristianhildebrandt says :

    Yes, for some reason some of the code must have gotten removed by the editor. I will get back to you soon.

  3. kristianhildebrandt says :

    I have edited the virtual host file, please let me know if everyting works.

  4. sante says :

    Hi, speaking of tree.io, have you found a way to obtain an api key for your local install?

  5. Chris Russell says :

    Do you know why it’s not asking me for any database information during the setup?

    In fact when I run the make it just completes the installation and then works perfectly.

    Problem is that I want to data stored in a mySQL database so I can backstuff up etc… ?

  6. christof says :

    i tried running treeio with apache on my ubuntu 11.10 machine. apache startup works fine, but i keep on getting the internal server error. on my apache log file im receiving:

    “Could not import settings ‘treeio.settings’ (Is it on sys.path?): No module named pandora”

    i doublechecked the sys.path with print, permissions are on 777, i enabled debug modus, using “python manage.py runserver” works also. what am i missing?

  7. ithinkitsokAdam says :

    Please Help !

    I followed all the steps ! I cannot create the database ! what are the commands (user name and password ?).

    Each time in launch make install it returns an error : 1045 access denied to treeio@localhost user !

    Thanks

  8. Yosua Wisnu says :

    Hi,
    How can we install tree.io to shared linux hosting?
    Thanks

  9. ithinkitsokAdam says :

    Hello

    I’ve created the database throug sql. now i’m trying to run Treeio but i keep on having this error in the logs! Any idea ? i’ve looked on google but i do not understand what i have to do – i’m not a tech guy nor a developer or linux user, i’m just following the steps provided – help 😉

    [Sat Feb 25 14:01:22 2012] [notice] Apache/2.2.20 (Ubuntu) mod_wsgi/3.3 Python/2.7.2+ configured — resuming normal operations
    [Sat Feb 25 14:01:45 2012] [error] [client 127.0.0.1] mod_wsgi (pid=4313): Target WSGI script ‘/home/me/treeio/treeio.wsgi’ cannot be loaded as Python module.
    [Sat Feb 25 14:01:45 2012] [error] [client 127.0.0.1] mod_wsgi (pid=4313): Exception occurred processing WSGI script ‘/home/me/treeio/treeio.wsgi’.
    [Sat Feb 25 14:01:45 2012] [error] [client 127.0.0.1] Traceback (most recent call last):
    [Sat Feb 25 14:01:45 2012] [error] [client 127.0.0.1] File “/home/me/treeio/treeio.wsgi”, line 12, in
    [Sat Feb 25 14:01:45 2012] [error] [client 127.0.0.1] import django.core.handlers.wsgi
    [Sat Feb 25 14:01:45 2012] [error] [client 127.0.0.1] ImportError: No module named django.core.handlers.wsgi

  10. Jean-Bruno says :

    Nice tutorial. Many thanks
    One error in it ?

    mkdir /home/projects // if the folder does not already exist2
    wget http://tree.io/static/download/treeio.zip
    unzip treeio.zip
    cd treeio

    should be

    mkdir /home/projects // if the folder does not already exist2
    wget http://tree.io/static/download/treeio.zip
    unzip treeio.zip
    cd /home/projects/treeio

  11. Jean-Bruno says :

    I had an error in creating database. So i create it with Navicat and the install goes

    BUT

    I need to know why i have a 500 internal error. What chown or permissions should i do ?

    Many thanks, i’m almost on the final 😉

Leave a comment