Ubuntu-JeOS 8.04.1 (Hardy Heron) Install

This page is deprecated.

Attention! This is a work in progress. The process has not been tested yet. It will be fully tested when this disclaimer is gone.

Install the distribution

  • Download the Ubuntu JeOS 8.04.1 image.
  • Create a new VMware Virtual Machine.
  • Set the Hard Disk as type "IDE" and not "SCSI" (available via custom settings. Do not choose "typical")
  • Configured to use the same physical NIC (bridged mode).

Configure the distribution

Switch to root

Note: on Ubuntu you can type:

sudo su

to permanently obtain root shell.

Update the aptitude repository:

aptitude update

Install packages

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

apt-get 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

optional install: openssh-server memecached

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
./configure
make
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=memcache.so" >> /etc/php5/conf.d/memcache.ini
echo "extension=xdiff.so" >> /etc/php5/conf.d/xdiff.ini

Memcached is optional and caching is disabled by default in Wikidot.

OPTIONAL: Reconfigure PCRE (important for processing long pages)

mkdir /usr/src/debian
mkdir /usr/src/debian/pcre
cd /usr/src/debian/pcre
apt-get -y source libpcre3
apt-get -y build-dep libpcre3
cd pcre3-*/
sed -i 's/--enable-utf8 --enable-unicode-properties/--enable-utf8 --disable-stack-for-recursion --enable-unicode-properties/' debian/rules
fakeroot debian/rules binary
dpkg -i ../*.deb
pcretest -C | grep 'Match recursion'

The last command should say: Match recursion uses heap

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

Initialize database structure from within the postgres user:

cd /var/www/wikidot
su postgres
psql --command "CREATE USER wd PASSWORD 'wdpass'"
createdb --owner wd wd1
createlang plpgsql wd1
psql --command "CREATE SCHEMA ts2 AUTHORIZATION wd" wd1
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

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

Configure Wikidot

cd /var/www/wikidot
cp conf/GlobalProperties.php.orig conf/GlobalProperties.php

Edit GlobalProperties to fit desired settings, change at least URL_DOMAIN you could use the VIM editor:

vim conf/GlobalProperties.php

Generate necessary files:

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

  • open a webbrowser and navigate to www.yourdomain.com, click login
    • use e-mail: admin@wikidot ; password: ADMIN1

OPTIONAL: Additional actions

  • add apache, postgres, memcached to runlevel
  • increase file upload limit, post limit, memory limit and set fopen url to On in /etc/php5/{apache2,cli}/php.ini

Troubleshooting

Problems with diffs

On some architectures xdiff is broken. The quick fix is to download our version and substitute it.

pecl uninstall xdiff
cd /usr/src
wget http://www.wikidot.org/local--files/download/xdiff-1.4-wikidot.tgz
tar xzf xdiff-1.4-wikidot.tgz
cd xdiff-1.4
phpize
./configure
make
make install
/etc/init.d/apache2 restart
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License