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.....
I just want to give you my configuration as an example. Perhaps it helps somebody..
I use this software:
- Operating system: SuSE 8.0
- Java: j2sdk1.4.0_03
- Be reminded that the page will redirect to Java for Business.
- Anyone know a Free Java for JSPWiki ??
- Servlet/JSP container: jakarta-tomcat-4.1.19 (bin)
- Wiki: JSPWiki 2.0.32
- Template: mrg
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:#
- Download the JSPWiki distribution (Debian users: try '$apt-get install tomcat4', continue on step 2.2)
- Get tomcat running
- Unzip tomcat and copy it somewhere (in my case /opt)
- Start tomcat (in my case (/opt/tomcat4/bin/startup.sh) (Debian users: try '$/etc/init.d/tomcat4 start')
- Check if it's running (http://localhost:8080) (Debian users: try http://localhost:8180 )
- Stop tomcat (/opt/tomcat4/bin/shutdown.sh) (Debian users: try '$/etc/init.d/tomcat4 stop')
- Get JSPWiki running. For this example, we'll make a wiki called JSPWiki. You should choose another name.
- Unzip it and copy JSPWiki.war-file to /opt/tomcat4/webapps/ (Debian users: /var/lib/tomcat4/webapps)
- Start tomcat again.
- Check if it's running (http://localhost:8080) (Debian users: http://localhost:8180 )
- Go to http://localhost:8080/JSPWiki (Debian users: http://localhost:8180/JSPWiki )
- After some time you will see a white page -> that's very good
- Stop tomcat again
- tomcat has now created a JSPWiki directory under your Tomcat webapps /opt/tomcat4/webapps/JSPWiki/ (Debian: /var/lib/tomcat4/webapps/JSPWiki/)
- Transfer the Wiki-data
- 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.
- 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.
- Otherwise, copy the "default-page" (whatever that is) from the Wiki.zip to the above directory.
- Edit the jspwiki.properties in /opt/tomcat4/webapps/JSPWiki/WEB_INF/
- Change the value of jspwiki.pageProvider to VersioningFileProvider (so Wiki knows who did what)
- 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.
- 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.
- 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/.
- Try if it works
In additon, you can add
Access restriction (basic authentication)#
- Stop tomcat
- Edit /opt/tomcat4/conf/server.xml
- Uncomment Realm className="org.apache.catalina.realm.MemoryRealm" />
- Edit /opt/tomcat4/conf/tomcat-users.xml
- 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
- Edit /opt/tomcat4/webapps/JSPWiki/WEB-INF/web.xml
- Uncomment the <security-constraint> section, and set the <auth-constraint> role to what you chose in tomcat-users.xml above.
- 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>
- Start tomcat
- Open your Wiki
- Log in with your username and password
At last: make it look nice!
- Stop tomcat
- Copy the mrg-template to /opt/tomcat4/webapps/JSPWiki/templates/mrg/
- Edit /opt/tomcat4/webapps/JSPWiki/WEB_INF/jspwiki.properties
- Change: jspwiki.templateDir = mrg
- Start tomcat
- 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!#
- 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