Ubuntu 8.04.1 (Hardy Heron) Local Install

This page is deprecated.

These instructions are for installing Wikidot on Ubuntu 8.04 desktop edition. Installing Wikidot on the desktop is a bit easier for a novice and provides a good environment to learn the process. Although the command line will be used extensively you'll have the benefit of cut/paste and the gedit text editor.

Configure the distribution

Open a terminal

In the Applications menu select Accessories > Terminal.

Switch to root

Ubuntu uses the command "sudo" to switch to the "root" account temporarily during an operation where administrative access is needed. We don't want to have to use the command to prefix everything that we're about to do, so we'll switch to the root user permanently for now by entering the following:

sudo su

Note: You might be wondering why you're at the command line when you have all of these beautiful buttons, dialogs, and windows to use. The answer is because it's much faster this way. And remember, you can cut and paste from here to your terminal. Alternately, you can select, click, and drag text from this web page into the terminal.

Update the aptitude repository:

aptitude update

Install packages

Install the following packages using the 'aptitude' command.

  • apache2
  • php5
  • php5-cli
  • php-pear
  • php5-dev
  • php5-tidy
  • php5-pgsql
  • php5-gd
  • tetex-bin
  • tetex-extra
  • gs-gpl
  • imagemagick
  • build-essential
  • fakeroot
  • dpkg-dev
  • libmagic1
  • libmagic-dev
  • subversion
  • postgresql-8.3
  • postgresql-contrib-8.3
  • zip
  • wget


  • memcached
  • openssh-server
  • pgadmin3

Like so:

aptitude install apache2 php5 php5-cli php-pear php5-dev php5-tidy php5-pgsql php5-gd \
tetex-bin tetex-extra gs-gpl imagemagick build-essential fakeroot dpkg-dev \
libmagic1 libmagic-dev subversion postgresql-8.3 postgresql-contrib-8.3 \
zip wget

And optionally:
aptitude install memcached openssh-server pgadmin3

Note: Although using Apt via the 'apt-get' command will work, Aptitude handles dependencies a bit better. You may also use the graphical Synaptic Package Manager but it will take a bit longer to do. No matter which package manager you wish to use do not switch back and forth. The three do not keep track of each other; so if you use Apt for 6 months, and then try Aptitude, it will try uninstalling all of the packages you have installed over the previous 6 months.

Get libxdiff

cd /usr/src
wget http://www.xmailserver.org/libxdiff-0.22.tar.gz
tar -xzf libxdiff-0.22.tar.gz
cd libxdiff-0.22
make install

Get PECL extensions

(If pecl asks for anything, just press Enter/Return — it then uses some default settings).

pecl install FileInfo memcache xdiff

Install compiled extensions:

echo "extension=fileinfo.so" >> /etc/php5/conf.d/fileinfo.ini
echo "extension=xdiff.so" >> /etc/php5/conf.d/xdiff.ini

And optionally:

echo "extension=memcache.so" >> /etc/php5/conf.d/memcache.ini

Configure Apache

cd /etc/apache2/mods-enabled
ln -s ../mods-available/rewrite.load ../mods-available/expires.load ../mods-available/headers.load ../mods-available/deflate.* .

Checkout Wikidot with subversion

Make room for Wikidot and checkout the latest version:

mkdir /var/www/wikidot
cd /var/www/wikidot
svn checkout http://svn.wikidot.org/repos/wikidot1/trunk .

Configure PostgreSQL

The following steps will initialize the database structure from within the postgres user.
If you're not already there, change to the wikidot directory:

cd /var/www/wikidot

Switch to the postgres user:
su postgres

Note: If you plan on using pgadmin3, the graphical interface for postgreSQL, you will want to give the postgres user a password as pgadmin3 requires it. Like so: psql -c "ALTER USER postgres WITH PASSWORD 'secret'" where "secret" is replaced with your password.

Now set up the wd1 database, the wd user, the plpgsql procedural language, and the ts2 schema:
psql --command "CREATE USER wd PASSWORD 'wdpass'"
psql --command "CREATE DATABASE wd1 OWNER wd;"
psql --command "CREATE LANGUAGE plpgsql;" wd1
psql --command "CREATE SCHEMA ts2 AUTHORIZATION wd;" wd1

Or perhaps a more elegant way would be to issue the commands from within psql by first entering the psql terminal like so:

At the psql terminal type:
\c wd1;

Then, as postgres enter:

cat /usr/share/postgresql/8.3/contrib/tsearch2.sql | sed '1,5s/SET search_path = public/SET search_path = ts2/' | psql wd1
psql wd1 < files/dump.sql
exit # exits su postgres

Note: If you have permissions problems or have trouble making the above syntax work, see the how-to: Wikidot Home Network install.

Configure Wikidot

From /var/www/wikidot

cp conf/GlobalProperties.php.orig conf/GlobalProperties.php

Edit GlobalProperties using gedit

gedit conf/GlobalProperties.php

Change at least the URL_DOMAIN property. Enter your local domain name like so. You may use a different domain name, just make sure that if you use a public address like ".com" you'll need to own the domain. For a local network install, use something like ".dev" or ".local". Also make sure you use the same domain name in your /etc/hosts file.

public static $URL_DOMAIN = "mywikidot.local";

Edit your hosts file:

gedit /etc/hosts

Add the line:    www.mywikidot.local profiles.mywikidot.local    templates-en.mywikidot.local test.mywikidot.local

Generate necessary files:

In your terminal:

php bin/configure.php
php bin/generate_om.php

Copy Apache VirtualHost file to the proper place and make it define the FIRST vhost for Apache:

cp files/apache.vhost.wikidot.conf /etc/apache2/sites-available/
rm /etc/apache2/sites-enabled/000-default
ln -s /etc/apache2/sites-available/apache.vhost.wikidot.conf /etc/apache2/sites-enabled/000-wikidot

Append Wikidot cronjobs to the global crontab:

cat files/crontab >> /etc/crontab

Change the owner of wikidot files:

chown www-data:www-data -R .

Restart Apache & PostgreSQL:

/etc/init.d/apache2 restart
/etc/init.d/postgresql-8.3 restart

Log in to your Wikidot



  • If you get a "The site does not exist.", Wikidot is working. You likely have an issue with your $URL_DOMAIN property in the /var/www/wikidot/conf/GlobalProperties.php file. Make sure that if you are using a .com address in place of "mywikidot.local" you must own that address. See the forums for more info.
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License