NB: This page is rather old, and describes a really old version of JSPWiki. The current documentation is at http://doc.jspwiki.org/2.4/

I just got through the installation of my JSPWiki. I'm quite new to Linux and especially to Wiki. But I found that the documentation is very poor. So I wanted to make a start.....

You might want to consider using alien on the Debian package --Killer


I just want to give you my configuration as an example. Perhaps it helps somebody..

I use this software:

In the following you can see how I got my Wiki running. It seems to take a lot of time. But each step will only take some seconds..

What I did:#

  1. Download the JSPWiki distribution (Debian users: try '$apt-get install tomcat4', continue on step 2.2)
  2. Get tomcat running
    1. Unzip tomcat and copy it somewhere (in my case /opt)
    2. Start tomcat (in my case (/opt/tomcat4/bin/startup.sh) (Debian users: try '$/etc/init.d/tomcat4 start')
    3. Check if it's running (http://localhost:8080) (Debian users: try http://localhost:8180 )
    4. Stop tomcat (/opt/tomcat4/bin/shutdown.sh) (Debian users: try '$/etc/init.d/tomcat4 stop')
  3. Get JSPWiki running. For this example, we'll make a wiki called JSPWiki. You should choose another name.
    1. Unzip it and copy JSPWiki.war-file to /opt/tomcat4/webapps/ (Debian users: /var/lib/tomcat4/webapps)
    2. Start tomcat again.
    3. Check if it's running (http://localhost:8080) (Debian users: http://localhost:8180 )
    4. Go to http://localhost:8080/JSPWiki (Debian users: http://localhost:8180/JSPWiki )
    5. After some time you will see a white page -> that's very good
    6. Stop tomcat again
    7. tomcat has now created a JSPWiki directory under your Tomcat webapps /opt/tomcat4/webapps/JSPWiki/ (Debian: /var/lib/tomcat4/webapps/JSPWiki/)
  4. Transfer the Wiki-data
    1. Create a directory to hold the page data files. This should probably be outside the web root, for security reasons, e.g. /opt/tomcat4/jspwiki-pages/. The original author of this page suggested /opt/tomcat4/webapps/JSPWiki/pagedata/ instead.
    2. If you have a file called JSPWiki-samplepages.zip inside the JSPWiki ZIP file, then unzip it inside the above directory, to create About.txt, Main.txt, etc.
    3. Otherwise, copy the "default-page" (whatever that is) from the Wiki.zip to the above directory.
  5. Edit the jspwiki.properties in /opt/tomcat4/webapps/JSPWiki/WEB_INF/
    1. Change the value of jspwiki.pageProvider to VersioningFileProvider (so Wiki knows who did what)
    2. Change the value of jspwiki.fileSystemProvider.pageDir to the page data directory (e.g. /opt/tomcat4/jspwiki-pages/), so that JSPWiki knows where your pages are.
    3. Change the value of jspwiki.basicAttachmentProvider.storageDir to the same as above, or to a different directory where you would like attachments to be stored.
    4. Make sure that user owns the page and attachment storage directories is the user who Tomcat runs as (maybe tomcat or root). For example, chown -R tomcat /opt/tomcat4/jspwiki-pages/.
  6. Try if it works
    1. Start tomcat (you know how..)
    2. Go to http://localhost:8080/JSPWiki/ (Debian: http://localhost:8180/JSPWiki )
    3. Now you should see the Wiki-default-page

In additon, you can add

Access restriction (basic authentication)#

  1. Stop tomcat
  2. Edit /opt/tomcat4/conf/server.xml
    1. Uncomment Realm className="org.apache.catalina.realm.MemoryRealm" />
  3. Edit /opt/tomcat4/conf/tomcat-users.xml
    1. Add a user, and assign it to a role. (If you want to use the Tomcat special features, assign a user to the manager and admin groups
  4. Edit /opt/tomcat4/webapps/JSPWiki/WEB-INF/web.xml
    1. Uncomment the <security-constraint> section, and set the <auth-constraint> role to what you chose in tomcat-users.xml above.
    2. I also needed to add the following pragma

<!-- Security roles referenced by this web application --> <security-role> <role-name>wiki-user</role-name> </security-role>

  1. Start tomcat
  2. Open your Wiki
  3. Log in with your username and password

At last: make it look nice!

Templates#

  1. Stop tomcat
  2. Copy the mrg-template to /opt/tomcat4/webapps/JSPWiki/templates/mrg/
  3. Edit /opt/tomcat4/webapps/JSPWiki/WEB_INF/jspwiki.properties
    1. Change: jspwiki.templateDir = mrg
  4. Start tomcat
  5. now look at your page

Hits and Traps#

  • Shutting down and starting up tomcat needs some time - be patient
  • Opening Wiki also may need some time in the beginning - be patient
  • Better make a backup, when you achieved a good result
  • I don't know if you always need to shutdown tomcat. Sometimes it works without. But if you're not sure, better do it.
You don't need to stop/start tomcat every time. If you add yourself to the manager group (see the user restriction chapter, above) in tomcat-users.xml, you will be able to access the URL http://laura.fi.basen.net:8080/manager/html/ and stop/start/reload single webapps conveniently. Some containers - Resin, especially - are usually able to reload completely automatically. --ebu

I apologize for my bad english. I'm not used to writing in english..

Please correct my faults!#

TopDeluxe from Hamburg, Germany

..done
nevertheless: nice writing! Rue
I changed some other small typos. Thanks for making a LinuxInstall page; I've been needing one. --SabreDanse

FiveSticks from Chicago I got a little caught up with permissions. Be sure set them. I:

  • created $CATALINA_HOME/webapps/JSPWiki/data/pages - attach - logs (3 dirs)
  • CHOWN -R tomcat4:root $CATALINA_HOME/webapps/JSPWiki/data
  • and then I had to CHOWN the sample pages as well once I move those over.

Great fun -- thanks for the other ideas!

Martin West I had to insert an additional pragma to get authorized access to prompt. See above.

Thanx for a great howto which not only helped me get the Wiki to work, but gave me some directions on Tomcat as a whole. I added some extra directions that I hope will save a few minutes for thaws who use Debian. ..Sander

Should be part of the TLDP

#

page

hello ...

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-71) was last changed on 10-Jun-2012 10:43 by Janne Jalkanen