Habitat Organic Wiki

1. What is Habitat
2. How to install Habitat
3. How to use Habitat
4. Where to get help

1. What is Habitat

Habitat is a light-weight, fast, easy-to-install and highly customizable wiki engine. With Habitat, you can set up a user-editable website in just a few minutes. Once it's up and running, your Habitat-based website can be accessed from anywhere by a web browser, allowing you and your collaborators to jointly create, edit and manage web pages using a rich-format wiki syntax. Habitat is ideal small-sized projects, though, it has been used for large-scaled open-source communities involving thousands of contributors.

Habitat is highly versetile, featuring a Wikipedia-like text formatting language, hierachical page structure, excellent content reusability, plug-in interface for easy extensions, and much more. Being a wiki, Habitat provides a dynamic website that users can add new content or edit existing pages over time. It is particularly useful when multiple users jointly develop documentations or resources in a collaborative project.

Habitat was derived from UseModWiki by Qianqian Fang, who had also founded the collaborative font development project - WenQuanYi. Habitat is a result of over a decade continuous improvement of the WenQuanYi Wiki. See What's New for a full list of the new features.

2. 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 Github repository at https://github.com/fangq/habitat . On Unix/Linux/Mac OS, you can use the following git command:

  git clone https://github.com/fangq/habitat.git
On Windows, you might want to install TortoiseGit to run the above command.

You may run Habitat in 4 modes: "Standard", "Extended", "Basic" and "Compatibility". Under the "Compatibility" mode, you can get a fully functional wiki even by using a SINGLE 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).

3. How to use Habitat

If you run Habitat for the first time, you need to click on the "Register" link on the left to create a username/password for yourself. You can also apply the admin password you set during the initial setup. Otherwise, you will be considered as an anonymous user and Habitat will only display your IP address.

If you want to set yourself as the only user who can make changes, you have to login as an administrator (by setting the admin password in the register page), and set EditAllowed to 0 in the config file. If you want to run Habitat for personal use, this is highly recommended.

To create or modify pages, simply click on the "Edit this page" link on the top. Habitat supports many common Wiki markup rules used by UseModWiki or Wikipedia. Please check out Markup Format and NewSyntax pages for more details about formatting.

A new feature of Habitat is the support of hierarchical pages. You can create something like "Page/Subpage" or "Page/Subpage/Subsubpage" to represent more complex information or resources.

4. Where to get help

Please visit the Habitat forum to get more information related to Habitat. We also actively post new versions or patches at the Habitat website.

Habitat is an open-source project. You are welcome to contribute and become a developer. Please visit Habitat website for more details.