Installing Foswiki 1.1.3 on CentOS 6.0 Virtual Machine (for relative noobies)

Scenario / Background

I set this up as proof of concept for myself using the template from the other CentOS install page, some info from the official installation page and some trial and error.

This will get you up and running. Not sure about security though!?? Please edit the steps if you have an easier/better way of installing. I am not a professional developer/webmaster.

This is a vanilla install of CentOS 6.0 desktop with standard updates applied, installed on VMware Player.

Installation Steps

Install required packages

yum install php

yum install perl-libwww-perl

I downloaded and installed the below package as I couldn't get to the 'configure' page due to missing CGI::Carp. Installing CGI::Carp via CPAN did not work.

yum install rcs

yum install perl-CPAN
perl -MCPAN -e shell
install HTML::Tree # Click yes though each question (takes a while). Did see there's a package called perl-HTML-Tree that might be the one to install via yum?
# install CGI::Carp # Not required if the installer above is used. Did see there's a package called perl-Carp-Clan that might be the one to install via yum?
reload cpan

Download and Extract

cd /tmp
cd /var/www/
tar -xvf /tmp/Foswiki-1.1.3.tgz
mv Foswiki-1.1.3/ foswiki/
chown -R apache:apache /var/www/foswiki

Create LocalLib.cfg

cd /var/www/foswiki/bin
cp LocalLib.cfg.txt LocalLib.cfg
chown apache:apache LocalLib.cfg
vi LocalLib.cfg
Change the row $foswikiLibPath into $foswikiLibPath = "/var/www/foswiki/lib";

Protect configuration page

cd /var/www/foswiki/data
htpasswd -c .htpasswd AdminConfigure #creates the "Configure" username and password. choose a password (if you forget just delete and recreate the file)
chown apache:apache .htpasswd

Create conf file for apache

Open the following URL:

Fill the fields as follows (leave blank or unchecked the parameters not listed here):

* Host Name: localhost.localdomain (this is the default hostname set up when installing CentOS)
* Port: leave blank
* Path: /var/www/foswiki
* URL Path: / (for short URL)
* Short-URLs: Enabled (you'll need an Apache module for this to work: mod_rewrite)
* Runtime Engine: CGI
* Check the OR radio button
* Enter the list of user names that are allowed to access configure: AdminConfigure
* Choose your Login Manager: TemplateLogin
* Page to return when authentication fails: UserRegistration
* Click on "Update config file" button
* Copy the text that appears in the box below
* Paste the configuration in foswiki.conf file: vi /etc/httpd/conf.d/foswiki.conf

Change the FilesMatch section of /etc/httpd/conf.d/foswiki.conf to match the below:
<FilesMatch "^(configure)$">
    SetHandler cgi-script
    Order Deny,Allow
    Deny from all
    Require user AdminConfigure
   Satisfy Any

* Save and exit the file: :wq!
* Restart the webserver: service httpd restart

Now go to http://localhost/bin/configure or http://localhost:8080/bin/configure if you entered a port number above - for example 8080 here.

Create the first administrator

Once the first page of the wiki is loaded log in as:
  • user = admin
  • password = the one chosen in "Protect your configuration" chapter
Go to: And follow the instructions in the yellow box.
You can use a wikiname that still doesn't exist (let's say MyName).
After you completed the steps editing the AdminGroup topic just register with the wikiname used in the previous step (eg. MyName): Now you have an administrator user!

Open the firewall to allow access

Open port 80 (www) on the firewall to gain access via the host IP address from another machine. (ifconfig will tell you the IP address). You will probably want to configure a static IP rather than leave it DHCP configured.

-- TimHandy - 11 Oct 2011
Topic revision: r3 - 12 Oct 2011, TimHandy - This page was cached on 20 Sep 2017 - 20:51.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License