I am not using the Ubuntu server (probably should have, but this is a test machine and needed wireless).
So far this is a work in progress, I am just recording progress on the wiki, please forgive if it doesn't work.
Since Ubuntu 7.04 considers php4 defunt we will install the php5 versions of everything. Let's hope it works.
Use this apt-get install command:
apt-get install apache2 mysql-server php5 php5-cli php-pear php5-mysql libapache2-mod-php5 php5-imagick php5-mcrypt php5-mhash php5-xsl imagemagick wv pdftohtml pwgen make pdftohtml html2text aspell links mono mono-mcs libmono0 libmono-cecil0.4-cil libmono-sqlite1.0-cil libmono-sqlite2.0-cil
did this because the 6.06 people did it:
pear install XML_RPC
pear install Cache_Lite
Open dekiwiki-current/dekiwiki/extensions/MWSearchUpdater.php and change the 5th line from /usr/share/pear to /usr/bin/pear
Edit /etc/php5/apache2/php.ini and make the following changes:
post_max_size = 32MB upload_max_filesize = 32MB
Configure Apache
DekiWiki use mod_rewrite to provide "friendly" URLs. To enable mod_rewrite, do the following (as root):
a2enmod rewrite /etc/init.d/apache2 force-reload
Configure MySQL
If you didn't previously have MySQL installed you'll need to set the MySQL root password:
mysql -u root -e "set password = password('my_password');" Get the latest DekiWiki bits from Open Garden
Direct Download: http://www.opengarden.org/download/dekiwiki-current.tar.gz
Extract the files
tar xfvz dekiwiki-current.tar.gz
DekiWik use DotLucene and mwsearch for search indexing. To install and configure, do the following:
Build mwsearch (as root):
cd dekiwiki-current/mwsearch make install cp mwsearch.conf.mks /etc/mwsearch.conf mkdir /var/run/mwsearch cp mwlucene /etc/init.d/mwlucene chmod +x /etc/init.d/mwlucene ln -s /etc/init.d/mwlucene /etc/rc2.d/S20mwlucene
Add MySQL root password to /etc/mwsearch.conf and change
password=
to
password=your_mysql_root_password
OPTIONAL: rebuild the search index each day at midnight
Add the following to /etc/crontab
echo "# Rebuild MWLucene Search Index" >> /etc/crontab echo "0 2 * * * root /usr/local/bin/MWUpdater --rebuild > /var/log/MWUpdater.log" >> /etc/crontab echo "30 2 * * * root /etc/init.d/mwlucene restart > /dev/null" >> /etc/crontab
Whew! The prerequisites are out of the way so let's install the DekiWiki bits. To make this process easier, we've provided an install script.
In your deki-current directory run ./installWiki.sh
installWiki.sh
Usage: ./installWiki.sh --wikiName wiki_name --domainName domain_name --dbRootPwd db_root_password [--wikiInstallBaseDir base_install_directory] [--dbName databaseName] Parameters: --wikiName: The name of your wiki. This is also used as the hostname for you wiki. Example: mywiki => mywiki.somedomain.com --domainName: Your domain name --dbRootPwd: MySQL password for root@localhost user. This is required in order to create the DekiWiki database --wikiInstallBaseDir: installation directory. Default is /var/www/ --dbName: The database name you want created. Defaults to --wikiName if not specified
This script performs the following actions:
Example: (as root)
./installWiki.sh --wikiName mywiki --domainName example.com --dbRootPwd my_mysql_root_pass
This will create your DekiWik at /var/www/mywiki.example.com/
NOTE: this script will provide the Sysop password that you'll need to log in to the wiki once we're all done.
Finally, it's time to configure Apache to serve up your DekiWiki installation. We're using name-based virtual hosting in apache so we'll create a config as follows (don't forget to enter your configuration data):
/etc/apache2/sites-available/dekiWiki
<VirtualHost *>
ServerName mywiki.example.com
ServerAdmin webmaster@mywiki.example.com
ErrorLog /var/log/apache2/mywiki.example.com-error_log
CustomLog /var/log/apache2/mywiki.example.com-access_log common
DocumentRoot /var/www/mywiki.example.com/
RewriteEngine on
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^/$ /index.php?title=Home [L,NE]
RewriteCond %{REQUEST_URI} !/(attachments|ControlPanel|editor|stylesheets|images|skins)/
RewriteCond %{REQUEST_URI} !/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !/favicon.ico
RewriteCond %{REQUEST_URI} !/robots.txt
RewriteCond %{QUERY_STRING} ^$ [OR] %{REQUEST_URI} ^/Special:Search
RewriteRule ^/(.*)$ /index.php?title=$1 [L,QSA,NE]
</VirtualHost> Create a symlink in /etc/apache2/sites-available
ln -s /etc/apache2/sites-available/dekiWiki /etc/apache2/sites-enabled/001-dekiWiki
Now reload apache
/etc/init.d/apache2 force-reload
Please note, after doing this my site would not work properly, so I used webmin to make the dekiwiki answer all requests. I don't know if you have that luxury. I am not so expert in Apache settings.
As soon as your DNS entry for mywiki.example.com is setup (or you've configured your /etc/hosts or c:\windows\system32\drivers\etc\hosts) you will be able to access your wiki by going to: http://mywiki.example.com. Log into your DekiWiki using the Sysop password provided by the installWiki.sh script (the passowrds are also available in a file named password-mywiki.example.com in your DekiWiki directory.
Once DekiWiki is installed we recommend that you do the following: