1. How to install Habitat

To download the latest stable release of Habitat, please browse the download section of this page. If you are using Debian/Ubuntu, please download and install the deb package. It will set up everything for you and you can find Habitat in the "Accessories" menu.

If you want to try out the latest code, you can access it from our SVN. On Unix/Linux/Mac OS, you can use the following svn command:

  svn co https://huc.svn.sourceforge.net/svnroot/huc/trunk/habitat habitat
On Windows, you might want to install TortoiseSVN to run the above command.

You may run Habitat in 4 modes: Standard, Extended, Basic and Tiny. Under "Tiny" mode, you can even get most things done with a SINGLE cgi script (only 200kB in size)!

It is recommended to run Habitat under the Standard mode. With this mode, sqlite database is used as the backend, which not only saves a lot of disk space, but also makes it super fast for searching and data backup.

To use the Standard mode, you must make sure the following perl modules are installed on your system:

  DBI, DBD::Sqlite3, Text::Diff, Text::Patch, Crypt::DES
If you are running a Debian/Ubuntu desktop, you can install all the dependencies using the following command:
  sudo apt-get install perl python sqlite3 libdbd-sqlite3-perl 
     libtext-diff-perl libtext-patch-perl libcrypt-des-perl
In most cases, perl and python have already been installed. So, the above command only adds about 1M space. If you do not have permission to install these modules, you can download the pre-compiled modules from our website. Extract the downloaded modules into a subfolder called "lib" under the Habitat main directory.

The next step is to initialize database, please run the following command from Habitat's main folder:

  sqlite3 db/habitatdb.db '.read db/gendb.sql'
For safety reasons, we strongly suggest you setting your own administrator password and site hash. To do so, you need to edit a global config file with command:
  nano habitatdb/config
search for AdminPass and CaptchaKey, replace the values in the quotations to whatever password you prefer. Note, CaptchaKey must be a 16digit hex number. You should also consider moving the habitatdb directory to a safe place to avoid direct exposing of the config file. A suggested place is /var/lib/habitatdb/. Remember to update the value for DataDir variable at the beginning of index.cgi if you have moved the habitatdb folder.

Now it is time to test Habitat. Open a terminal, and navigate to the Habitat main folder, and run

 ./runlocal.sh
A browser window will pop-up, and the home page will be displayed. If you prefer to use Chinese (or other languages) as the default language, edit "index.cgi", search for LangID="en", and replace en to cn (or other language codes).
Powered by Habitat