Note: This is a step-by-step guide for hatta prior to 1.5.0. For 1.5.0 and newer, refer to Install.
Open a terminal and follow the instructions. Commands that use sudo will ask you for your password. (Running Etch? Also see the additional instructions specific to Etch).
First you need to install the dependencies:
sudo apt-get install mercurial python-werkzeug
Optionally install Pygments for syntax highlighting:
sudo apt-get install python-pygments
If your version of python is 2.4, you will also need
sudo apt-get install python-wsgiref
If you are installing the development version, you will also need
sudo apt-get install python-pkg-resources python-jinja2
Download the most recent version of the script from http://hatta-wiki.org/Download, rename it to
hatta.py and make it executable with:
chmod a+x hatta.py
Just execute the script:
This will create two subdirectories:
cache, and also start a new Mercurial repository in the
docs directory. Then it will start a web server on port 8080. You can now open your web browser and type
http://localhost:8080/ into the address bar to use the wiki.
Note: When Hatta starts, you will see a warning message, it's harmless, seems to be a glitch in the Debian's install of Mercurial, see Running on Debian stable (etch)? for more details.
If you start Hatta in an existing Mercurial repository, it will also create the directories as above, but won't start a new repository in the
docs directory – instead all the changes will be commited to your existing repository.
You might want to add the
cache directory to
.hgignore, so that you are not bothered about the files in it.
See Script settings.
In case you're running Hatta on your own server you might want to ensure that Hatta will be up and running also after rebooting the server. Using Ubuntu's Upstart is a nice and easy way of doing this. Login as root and create a file named
/etc/init with the following contents:
start on startup script cd /path/to/hatta python hatta.py end script
Now Hatta will be started on server boot, in addition you can use the
initctl command to control Hatta:
sudo initctl start hatta *or* sudo initctl restart hatta *or* sudo initctl stop hatta