Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The default installation structure for Weave, which includes the OSGi/Weave platform and the Jetty web server, are setup so that the weave.war file can locate the platform directory when started. If a separate web server is used or a different directory structure is required, then it is possible to supply an init parameter to the weave.war file to tell it the location of the platform directory. Alternatively the entire Weave platform directory can be embedded within the weave.war file.

Starting the installer

The installer requires a Java runtime to be available to start the installer. If you're running the installer from the ISO image there is already a Java runtime available and will be used if the setup.cmd or setup.sh file is used to start the installer. If you're not using the .ISO image and are running the weave-installer-x.y.z.jar file directly then you will need to have a Java runtime already installed on the target server.

When Weave is installed it will install a Java runtime that is used to run Weave, unless you disable the option and point the installer to an existing Java runtime.

The installer determines if the server you're installing on is a 32-bit or 64-bit architecture and provides the appropriate options as to what Java runtime to install. It will only provide the 32-bit option if you're installing on a 32-bit machine, but will provide both 32-bit and 64-bit options if installing on a 64-bit server.

Info

If you're installing Weave onto a virtual machine the installer may think that you're running on a 32-bit server, when in fact you're using a 64-bit architecture, which will remove the option to install the 64-bit Java runtime.

To overcome this restart the installer with the system property is64=true, e.g.

java -Dis64=true -jar weave-installer-x.y.z.jar


Basic Directory Structure

Below is a cut-down directory structure showing the main directories and files for a default Weave installation

  • weave
    • jdkjre
    • jetty
    • logs
    • platform
      • configuration
      • features
      • plugins
      • workspace
        • config.xml
        • jdbc
    • webapps
      • weave.war
      start
    • service
      • bin
      • bat
      • conf
        • wrapper.conf
    • startup.sh
    • startstartup.cmd
    • shutdown.sh
    • shutdown.cmd

startstartup.sh, startstartup.cmd, shutdown.sh and startshutdown.sh are Unix Linux and Windows files for starting and stopping the Weave server from the command line. There are additional files available for Windows in the service directory that will install Weave as a Windows service .The jetty directory contains instructions and files for installing Jetty so that it starts when the server starts on linux/unix. A Windows installation will contain a batch file for installing or uninstalling a serviceor Linux daemon. The service\bin directory is for Linux and the service\bat directory is for Wndows. The service\conf\wrapper.conf file will configure the service/daemon.

The weave.war file is the web application described earlier, and config.xml is the main Weave configuration file.

...

Code Block
xml
xml
linenumberstrue

<init-param>
	<param-name>platform</param-name>
	<param-value>/usr/me/weave/platform</param-value>
</init-param>

...

  • current versions of Weave are compiled against Java 1.6 8 and will not work under Java 1.5 7 or earlier, or Java 9 and later.
  • OSGI needs some environment variables set and -Dosgi.clean=false must be included in your JVM arguments
  • if you need to connect to the OSGI console, then -Dosgi.console=xxx (where xxx is your desired port number (>1024)) must be included in your JVM arguments

...

To change the port number of the Jetty instance you can edit the jetty.xml file in the weave_home directory. In there you will see a section that looks like

Code Block

<Call name="addConnector">
  <Arg>
    <New class="org.mortbay.jetty.nio.SelectChannelConnector">
      <Set name="host"><SystemProperty name="jetty.host"/></Set>
      <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
      <Set name="maxIdleTime">30000</Set>
      <Set name="Acceptors">2</Set>
      <Set name="statsOn">false</Set>
      <Set name="confidentialPort">${jetty.https.port}</Set>
      <Set name="lowResourcesConnections">5000</Set>
      <Set name="lowResourcesMaxIdleTime">5000</Set>
      <Set name="responseBufferSize">64000</Set>
    </New>
  </Arg>
</Call>

Change the instance of 8080 to a port that is currently not being used on the system.
e.g. the change would enable Weave to run on port 8081

Code Block

<Call name="addConnector">
  <Arg>
    <New class="org.mortbay.jetty.nio.SelectChannelConnector">
      <Set name="host"><SystemProperty name="jetty.host"/></Set>
      <Set name="port"><SystemProperty name="jetty.port" default="8081"/></Set>
      <Set name="maxIdleTime">30000</Set>
      <Set name="Acceptors">2</Set>
      <Set name="statsOn">false</Set>
      <Set name="confidentialPort">${jetty.https.port}</Set>
      <Set name="lowResourcesConnections">5000</Set>
      <Set name="lowResourcesMaxIdleTime">5000</Set>
      <Set name="responseBufferSize">64000</Set>
    </New>
  </Arg>
</Call>

...

Within either the startup.cmd or startup.sh you will find the following.  Change the 8070 to another free port on the server

Code Block

JAVA_OPTS="$JAVA_OPTS -DSTOP.PORT=8070 -DSTOP.KEY=seekrit"

The shutdown.cmd or shutdown.sh will also need to reference this change.

Code Block

JAVA_OPTS="-DSTOP.PORT=8070 -DSTOP.KEY=seekrit"

If you start Weave as a Windows service then you should also edit the telnet port n weave-service.conf, if it's been set, so that it doesn't conflict with the copied instance. This is done by changing the 'osgi.console' value in the weave-service.conf file. Note this value may also be set in the startup.cmd file and should also be checked when copying an instance.

Additional Requirements

The OGR libraries, used to inter-operate with some spatial engines, requires the installation of the Microsoft Visual C++ 2013 Redistributable libraries.

They can be downloaded from Microsoft from here.