Debian Quickstart

This page is deprecated.

Install the distribution

Debian 4.0
Medium: netinst, smallcd
Packages: Standard system only

OR

Ubuntu 7.10 Server
Plain istallation

  • If using VMWare configure network access:
    • Configured to use the same physical NIC (bridged mode).

Configure the distribution

Note: on Ubuntu you can do

sudo -s

to permanently obtain root shell.
  • update repo:
aptitude update
  • optional install: openssh-server
  • install: memcached apache2 php5 php5-cli php-pear php5-dev tetex-bin tetex-extra gs-gpl imagemagick build-essential fakeroot dpkg-dev libmagic1 libmagic-dev subversion postgresql-8.2 postgresql-contrib-8.2 php5-tidy php5-pgsql php5-gd zip

* Note for Debian 4.0. apt-get will not install postgresql-8.2. You'll get a "Couldn't find package" error. If you choose postgresql postgresql-contrib It will install the default version of 7.4. The newer version will have to be compiled from source.

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

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/PEAR 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.

You need http_client PEAR library if you want to use FlickrModule:

pear install http_client

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 or download

  • 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

  • now 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
# initialize tsearch2 (search engine) in a separate schema
psql --command "CREATE SCHEMA ts2 AUTHORIZATION wd" wd1
cat /usr/share/postgresql/8.2/contrib/tsearch2.sql | sed '1,5s/SET search_path = public/SET search_path = ts2/' | psql wd1
psql --command "GRANT ALL ON ts2.pg_ts_cfg, ts2.pg_ts_cfgmap, ts2.pg_ts_parser, ts2.pg_ts_dict TO wd"
psql wd1 < files/dump.sql
exit # exits su postgres
  • if you are using PostgreSQL 8.3, the GRANT ALL… command is not required.

Note on configuring PostgreSQL:

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

If you are using a different version of PostgreSQL, change the path of the tsearch2 init script.

Configure Wikidot

  • Change dir to your new installation:
cd /var/www/wikidot
  • Configure Wikidot:
cp conf/GlobalProperties.php.orig conf/GlobalProperties.php
  • Edit GlobalProperties to fit desired settings, change at least URL_DOMAIN. you could use a nano editor:
nano conf/GlobalProperties.php
  • edit the properties — as many as you need, save with ctrl+x
  • Generate necessary files:
php bin/configure.php
  • Generate (update) database files:
php bin/generate_om.php
  • Copy Apache VirtualHost file to the proper place and make it define the FIRST vhost for Apache, on Debian:
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 .
  • start/restart apache & PostgreSQL
/etc/init.d/apache2 restart
/etc/init.d/postgresql-8.1 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

Should work.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License