Personal tools
  • Help

webmill:Server Configuration

From NITRC Wiki

Jump to: navigation, search

Contents

OS: Ubuntu (or Kubuntu or Xubuntu) 9.04

  • Instructions are specifically for the Ubuntu platform due to the use of apt-get. However, installation on CentOS/Fedora/Red Hat Enterprise Linux/Other distributions is straight forward with a slight change to how packages are retrieved.
  • All commands executed in terminal. ${user} is the name of os account, ${svn.user} is the name of svn account,
  • Google credentials: ${google.account.name} and ${google.account.password}. Change these strings to appropriate values.

Virtualized Services (Optional)

  • The following instructions may be carried out on a native installation of Linux or on a virtual machine installation.
  • We typically use Xubuntu for VM installations for it's clean, but light weight graphical interface. Download the install CD iso images here: http://www.xubuntu.org/
  • Be sure to use a dedicated or bridged network adapter on the VM so that the web services may be accessed by computers located outside of the VM.

Deployment from source

Prerequisites

Note: The following steps may be combined, if desired.

1. Install Sun JRE 6

sudo apt-get install sun-java6-jre

1b. New

 sudo apt-get install sun-java6-jdk 

1c. Set JAVA_HOME to an appropriate location for your distribution version

 For example: export JAVA_HOME=/usr/lib/jvm/java-6-sun/

2. Install Mysql server

sudo apt-get install mysql-server
Record the mysql root password: ${mysql-root-password}

3. Install SVN client

sudo apt-get install subversion

4. Install Apache Ant

sudo apt-get install ant

5. Install Apache Maven

sudo apt-get install maven2

6. Install Apache Tomcat 6

sudo apt-get install tomcat6

Optional:

  • Install emacs
sudo apt-get install emacs
  • If you plan on using the server's browser to test the wiki, be sure to install the browser plugin for java 1.6
sudo apt-get install sun-java6-plugin

Installation

1. cd /home/${user}/

2. mkdir WebMill

3. cd WebMill

4. Download WebMill sources

svn co --username ${svn.user} https://www.nitrc.org/svn/webmill/trunk

5. cd trunk

6. cp build.properties.eg build.properties

7. Edit build.properties

pico build.properties
Gmail example:
mail.host=smtp.gmail.com
mail.user=${google.account.name}
mail.user=${google.account.password}
mail.smtp.port=587
mail.smtp.starttls.enable=true

8. cd delineation-tool

9. cp build.properties.eg build.properties

10. cd ..

11. ant

NOTE: If you have network problems during a build... for example, you try to build in a coffee shop and the coffee shop redirects some of your web requests to their website... you might want to remove the .m2 directory in the users home folder and retry.

12. cd /var/lib/tomcat6

13. Generate self-signed certificate for Tomcat. Additional info http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html

sudo keytool -genkey -alias tomcat -keypass changeit -keyalg RSA -keystore .keystore -storepass changeit

14. cd conf

15. Configure SSL (as root) sudo pico server.xml

Uncomment SSL HTTP/1.1 Connector and add keystore settings:
<Connector SSLEnabled="true" clientAuth="false" maxThreads="150"
port="8443" protocol="HTTP/1.1" scheme="https" secure="true"
sslProtocol="TLS" keystoreFile="${catalina.base}/.keystore" keystorePass="changeit" />

16. cd policy.d

17. Cofigure policies

1 There is a bug in current version of Tomcat (6.0.18-0ubuntu6.1) which used with current JRE (6b14-1.4.1-0ubuntu10)
Policy fix required
sudo pico 03catalina.policy
Add after this line: grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {

permission java.lang.RuntimePermission "setContextClassLoader";

2 Add permissions for WebMill and JamWiki
sudo pico 50local.policy
Add these lines:
grant codeBase "file:${catalina.base}/webapps/webMill/-" {
permission java.security.AllPermission;
};
grant codeBase "file:${catalina.base}/webapps/jamwiki/-" {
permission java.security.AllPermission;
};

18. Restart tomcat

sudo /etc/init.d/tomcat6 stop
sudo /etc/init.d/tomcat6 start

Configure the Database

1. Configure mysql db and user

cd /home/${user}/WebMill/trunk/etc/db_script

2. mysql -u root -p < create_db.sql

3. cd /home/${user}/WebMill/trunk

4. ant schemaexport

5. Create a database for the wiki:

mysql -u root -p
<enter password>
mysql> CREATE DATABASE webMillWiki;
mysql> \q

6. Load the initial wiki database state.

cd trunk/systemState/prototype1
mysql -u root -p webMillWiki < webMillWiki.sql

Deploy Webapps

1. WebMill:

sudo cp /home/${user}/WebMill/trunk/dist/webMill.war /var/lib/tomcat6/webapps/webMill.war

2. JamaWiki

sudo cp /home/${user}/WebMill/trunk/dist/jamwiki.war /var/lib/tomcat6/webapps/jamwiki.war

3. Restart tomcat

sudo /etc/init.d/tomcat6 stop
sudo /etc/init.d/tomcat6 start

Setup on First Connection

0. Make a temp directory:

sudo mkdir /var/lib/tomcat6/temp
sudo chown tomcat6:tomcat6 /var/lib/tomcat6/temp


1. Setup JamWiki.

https://<hostname>:8443/jamwiki
Note that IPv6 support is not enabled, so connections to 'localhost' may fail. Use 127.0.0.1 or the machine's true hostname/IP address instead.

2. Fill out the form and click continue when warned about over-writing:

3. Go to /var/lib/tomcat6/webapps/jamwiki

4. Extract the images:

tar -xvzf /home/<username>/WebMill/trunk/systemState/prototype1/upload.tar.gz 

5. Fix the permissions

chown -R tomcat6:tomcat6 upload

6. To connect to the server. Use https://<hostname>:8443/webMill

7. The above installation uses self-signed certificates. Browsers may prevent access to the site and/or flag this site as a potential security problem.

Powered by MediaWiki
  • This page was last modified 02:59, 6 February 2010.
  • This page has been accessed 8,668 times.
  •