VRL

Resources

How do I setup a wiki for my project/course?

pmWiki Setup

1. Download the pmwiki tar ball from
http://www.pmwiki.org/wiki/PmWiki/Download
or click the link below
http://pmwiki.org/pub/pmwiki/pmwiki-latest.tgz

2. Copy the pmwiki in the directory where you want to install it.
For example, in my case I am copying it to myWikiSetup directory in my home directory
i.e. http://www.cs.pitt.edu/~mdabedul/myWikiSetup/

As basic good sense, if you're creating a wiki for an existing course, please take care you don't over-write any existing wikis. Make a subfolder labeled with the current year (e.g. 2013) in the course folder, and install the wiki in there.

3. Extract the file
tar -xvzf pmwiki-latest.tgz
I have renamed the extracted folder as Wiki.

4. Go to the folder and give the web server read and write access recursively to it:
find . -type d -exec fs sa -dir \{\} -acl webserver rlw \; -print
You should now be able to access the wiki via a browser; in my case that would be http://www.cs.pitt.edu/~mdabedul/myWikiSetup/Wiki/pmwiki.php

If browser access failed, you will probably see a message about needing to create a wiki.d directory; create such a directory inside the extracted Wiki folder.

Now you should be fine. Congrats.

5. However, having a wiki is not enough; it needs to have secure and private access, or, btw, Pitt CSSD will shut your wiki down pronto.

Now the difficult part begins. You probably don't want just anyone to have access to the wiki (it's against Pitt codes anyway), and you want to use SSL encryption (Pitt codes as well).

Let's enforce SSL encryption first. Copy the sample config file from the wiki subdirectory 'docs' to 'local' and rename to config.php.
After the first line of code in the config file you need to add the code lines from here.

In the code above, you also need to replace cs3610/2013 with your wiki location and make sure the link is spelled with https instead of http everywhere (including in the link to the wiki from the course homepage).

Next, let's set up password-protected access to the wiki. Go to the config.php file again and uncomment the line # $DefaultPasswords['admin'] = crypt('secret'); . Replace 'secret' with a password of your choice. This step sets for the time being a site-wide password of your choice.

Let's say we want to create a generic account alice, where alice will have admin and editing rights, and a more restricted accounb bob which will only have editing rights.

To set up these accounts, first go to a browser and access your wiki's SiteAdmin.AuthUser page. For me that page is located at:
http://www.cs.pitt.edu/~mdabedul/myWikiSetup/Wiki/pmwiki.php?n=SiteAdmin.AuthUser.

Edit this page by adding user accounts in the following form at the end of the page:
username: (:encrypt password:), so for example, alice: (:encrypt wonderland:) would create a user 'alice' with password 'wonderland'. Do the same for user bob.

Next, also on the same page, add alice to a let's say admins group: for example @admins: alice creates a group 'admins' made up of user 'alice'.

Then make an editors group: @editors: alice, bob creates a group 'editors' made up of users 'alice' and 'bob'.

Save the page.

Next, go back to the config file. Comment out the $DefaultPasswords['admin'] = crypt( etc that you've uncommented earlier.

Then add the admins and editors groups in the config file in the following form:
$DefaultPasswords['admin'] = array('@admins'); and/or $DefaultPasswords['edit'] = array('@admins','@editors');

You also need to add the following line to the config file: include_once("$FarmD/scripts/authuser.php");

Save the file.
Done.





6. You can now move on the the initial setup of the wiki.
Some of the lines in the config file you might want to uncomment and/or customize to your site are:
$WikiTitle = 'PmWiki';
# $PageLogoUrl = "$PubDirUrl/skins/pmwiki/pmwiki-32.gif";
$EnableGUIButtons = 1;
$EnableUpload = 1;
...


7. Here's how you restrict editing rights for specific pages (for example the 'edit SideBar' page): by adding a page action for that page.
What you do is add '?action=attr' at the end of the address in the address bar. So this would be the address you need to restrict edit rights to admins only:
https://www.cs.pitt.edu/~mdabedul/myWikiSetup/Wiki/pmwiki.php?n=Site.SideBar?action=attr
Then type '@lock' in the 'Set new edit password:' box.
Save. Done

8. You can take a look at some of the pmwiki based websites

http://vis.cs.pitt.edu/wiki/
http://vis.cs.pitt.edu/teaching/outreach/tli10/
http://vis.cs.pitt.edu/teaching/cs2620/wiki/pmwiki.php
http://vis.cs.pitt.edu/teaching/cs1699/wiki/wiki.php

vis.cs.pitt.edu is located at /afs/cs.pitt.edu/projects/vis/visweb