Installing mwforum on Debian Lenny 5.0 and 6.0
There are many perl packages required by MWForum, Im not totally sure if all of them are required, but here is the list of packages that will get MWForum fully working with Image Uploading, Image resizing, attaching image, Avatar, text quote and email support.
Install required debian packages with aptitude:
# aptitude install libgd-gd2-perl libgd2-xpm imagemagick libimage-base-bundle-perl libimage-magick-perl libimage-info-perl libimage-exif-perl libimage-base-perl libimage-imlib2-perl libimage-size-perl libgeo-ip-perl libgeo-ipfree-perl libemail-mime-perl libmail-sendmail-perl libmail-rfc822-address-perl libmail-sender-perl libmail-perl libnet-cidr-lite-perl libtext-reform-perl libtext-quoted-perl mysql-server libdbd-mysql-perl libdbi-perl libcompress-zlib-perl libwww-perl liburi-perl libxml-perl libxml-regexp-perl libxml-sax-expat-perl libxml-sax-perl libxml-xslt-perl perl-modules perlmagick libtext-iconv-perl libsocket6-perl libtimedate-perl libnet-daemon-perl libmailtools-perl libhtml-clean-perl libhtml-format-perl libhtml-parser-perl libhtml-tree-perl libcflow-perl libdata-flow-perl apache2-mpm-prefork libapache2-mod-perl2 libapache2-mod-apreq2 libapreq2 libapache2-request-perl -V
Now check latest version for download from http://www.mwforum.org/forum/topic_show.pl?tid=4222
In this setup I will put mwforum in /var/www/mwforum/htdocs/ (gentoo style folder)
Download MWforum and extract
# mkdir -p /var/www/mwforum/ # cd /var/www/mwforum/ # wget http://www.mwforum.org/dl/stable/mwforum-2.24.1.tar.gz # tar xpf mwforum-2.24.1.tar.gz # mkdir htdocs # cp -a mwforum-2.24.1/script/* htdocs/ # cp -a mwforum-2.24.1/data/* htdocs/
Setup Configuration files
# cd ./htdocs # mv MwfConfigGlobalDefault.pm MwfConfigGlobal.pm # mv MwfConfigDefault.pm MwfConfig.pm
Edit config file with your mysql username/password, site name and url.
# vi MwfConfig.pm
Inside Mysql shell create database and username/password for mwforum:
mysql> CREATE DATABASE mwforum CHARSET=utf8; Query OK, 1 row affected (0.30 sec) mysql> GRANT ALL ON mwforum.* TO mwforum@localhost IDENTIFIED BY 'sk8hg4I2mxW'; Query OK, 0 rows affected (0.60 sec) mysql> flush privileges;
Install MWForum database:
# perl install.pl
Activate Apache modules:
# a2enmod perl # a2enmod apreq # a2enmod headers
Add the apache Virtualhost config file:
# vi /etc/apache2/sites-availables/mwforum
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | <VirtualHost *:80> ServerName myforum.com ServerAlias www.myforum.com ServerAdmin webmaster@myforum.com DocumentRoot /var/www/mwforum/htdocs DirectoryIndex forum_show.pl #XSendFile on #XSendFileAllowAbove on ScriptAlias /cgi-bin/ "/var/www/mwforum/htdocs/" <Directory "/var/www/mwforum/htdocs"> Options +ExecCGI FollowSymLinks -Indexes AllowOverride All Order allow,deny Allow from all </Directory> RewriteEngine On # Uncomment to force redirect to https, but you need to create https vhost # RewriteCond %{HTTPS} off # RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} </VirtualHost> |
Add PerlSwitches:
# vi /etc/apache2/conf.d/mwforum
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | PerlSwitches -I/var/www/mwforum/htdocs <Directory /var/www/mwforum/htdocs/> DirectoryIndex forum.pl Options -Indexes <Files "*.pl"> Options +ExecCGI SetHandler perl-script PerlResponseHandler ModPerl::Registry PerlOptions -SetupEnv -ParseHeaders </Files> <Files "*.pm"> Deny from all </Files> </Directory> |
Now activate mwforum and check for configurations
# a2ensite mwforum # apache2ctl configtest Syntax OK
If syntax OK, then restart
# /etc/init.d/apache2 restart
Security and Cleanup:
# rm install.pl upgrade.pl # cat ./mwforum-2.24.1/example/script.htaccess >> htdocs/.htacess # cat ./mwforum-2.24.1/example/attach.htaccess >> htdocs/.htacess


Mathaba.net