Note
If you are just getting started and have no public Git repository, please read first the Collaboration guide, so that you can first set it up. Then, continue reading this page.
If you are trying to install Indico on Windows, please use the Windows guide.
Setup
0. Preparation
You will need:
- Python 2.6+ (2.7+ encouraged);
- Python development packages [python-dev or python-devel depending on your linux distro]
- Virtualenv;
- libxml2 and libxslt development packages;
- git [git-core in some distros]
1. Preparing your Python virtual environment
$ cd ~/code $ virtualenv indico New python executable in indico/bin/python Installing setuptools............done. Installing pip...............done. $ cd indico $ source bin/activate
You can leave the virtualenv anytime using the deactivate command.
2. Preparing the Development Environment
So, now we need to get Indico from Git. If you are using GitHub? as a public repo, clone your "forked repo" instead.
$ git clone git://github.com/indico/indico.git src
Then:
$ cd src $ pip install --allow-all-external -r requirements.txt $ python setup.py develop_config
Follow the instructions. By the end of the process you should have Indico installed in your virtualenv. The config script should also provide you with some instructions on how to start the DB. That's what we'll do in the next section.
During the requirements installation you may get a missing library error , for instance : /usr/bin/ld: cannot find -lz .Please install the missing library manually (f.e apt-get install zlib1g-dev).
3. Adding the pre-commit hook
This pre-commit hook will check your code for PEP8 problems before you commit. We recommend that you set it up:
$ pip install pep8 $ curl -L http://git.io/4EeNZA > .git/hooks/pre-commit
4. Install external modules
We need to install the external modules (jQuery, qTip, etc...)
$ fab setup_deps
Some known issues:
- Missing curl: try to run the command with --show=debug to confirm, but most probably you will need to install curl
- Mac OS: make sure you have installed XCode
- Sometimes fab setup_deps just fails (e.g. failing to download some package) and retrying usually works ;)
5. Launching Indico
- Since you are running Indico from a virtualenv, you do not need root privileges. This said, you should chown your whole Indico directory (the one you specified in developer_config and that contains log, db, etc...) to your user:
$ chown -R youruser:youruser /home/youruser/code/indico
- You should also edit etc/zdctl.conf and replace:
user www-data
With
user youruser
- Finally, you'll have to edit etc/indico.conf and replace all the occurrences of the URL http://localhost with http://localhost:8000 and https://localhost with https://localhost:8443. Done it? Great.
- To start the ZODB database, type:
$ zdaemon -C etc/zdctl.conf start
- Then, start a development web server:
$ indico_shell --web-server --with-ssl --reload-on-change
- Open your browser and go to http://localhost:8443/indico/ - Indico should be up and running!
6. What do I do now?
Now you need to setup your Git repo and start working.
Git
Learning Git
Read Git's online manual. Maybe you'll want to print the cheat sheet and put it on your wall. Go ahead, print it!
There is also a very nice GitHub page with an interactive Git walkthrough.
Configuring Git
The first time you use Git you will need to set up your identity:
git config --global user.name "John Doe" git config --global user.email john.doe@cern.ch
That should be enough.