Versions Compared

Key

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

...

Completing The Installation

Verify Your Installation

 

Anchor
Distribution
Distribution
Installing from Distribution

Overview

 TODO Complete this section

Code Block
languagetext
vivo-1.9.0-rel/
  pom.xml
  default-settings.xml
  home/
    pom.xml
    src
  solr/
    pom.xml
    src
  webapp/

    pom.xml
    src

...

Anchor
Completing
Completing
Completing The Installation

Configure the Database Schema

The default configuration of VIVO is to use MySQL as a backing store for Jena SDB. Whilst VIVO / Jena will create the necessary tables for the triple store, a database (schema) and authentication details need to have been created first. To do so, log in to MySQL as a superuser (e.g. root) 

Code Block
languagesql
$ mysql -u root -p
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.9 MySQL Community Server (GPL)
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
 
mysql> CREATE DATABASE vivodb CHARACTER SET utf8;
mysql> GRANT ALL ON vivodb.* TO 'vitrodbUsername'@'localhost' IDENTIFIED BY 'vitrodbPassword';

Configure the Home Directory

There are two configuration that are required to be in the home directory. By default, the installer does not create them, so that they are not overwritten when you redeploy the application. Instead, example files are created in the home directory, which can be copied and used as the basis for your installation.

...

Note
titleMinimum Configuration Required

In order for your installation to work, you will need to edit the runtime.properties, and ensure that the VitroConnection properties are correct for your database engine. They should look something like this.

Code Block
languagetext
VitroConnection.DataSource.url = jdbc:mysql://localhost/vivodb
VitroConnection.DataSource.username = vitrodbUsername
VitroConnection.DataSource.password = vitrodbPassword

Configure and Start Tomcat

Set JVM parameters

VIVO copies small sections of your RDF database into memory in order to serve Web requests quickly (the in-memory copy and the underlying database are kept in synch as edits are performed).

VIVO may require more memory than that allocated to Tomcat by default. With most installations of Tomcat, the setenv.sh or setenv.bat file in Tomcat's bin directory is a convenient place to set the memory parameters. If this file does not exist in Tomcat's bin directory, you can create it. 

For example:

export CATALINA_OPTS="-Xms512m -Xmx512m -XX:MaxPermSize=128m"

This tells Tomcat to allocate an initial heap of 512 megabytes, a maximum heap of 512 megabytes, and a PermGen space of 128 megs. Larger values may be required, especially for production installations in large enterprises. In general, VIVO runs more quickly if given more memory.

If an OutOfMemoryError occurs during VIVO execution, increase the heap parameters and restart Tomcat.

Set security limits

VIVO is a multithreaded web application that may require more threads than are permitted under your Linux installation's default configuration. Ensure that your installation can support the required number of threads by making the following edits to /etc/security/limits.conf:

apache hard nproc 400

tomcat6 hard nproc 1500

Set URI encoding

In order for VIVO to correctly handle international characters, you must configure Tomcat to conform to the URI standard by accepting percent-encoded UTF-8.

Edit Tomcat's conf/server.xml and add the following attribute to each of the Connector elements: URIEncoding="UTF-8".

<Server ...>

  <Service ...>

    <Connector ... URIEncoding="UTF-8"/>

      ...

    </Connector>

  </Service>

</Server>

Some versions of Tomcat already include this attribute as the default.

Take care when creating Context elements

Each of the webapps in the VIVO distribution (VIVO and Solr) includes a "context fragment" file, containing some of the deployment information for that webapp.

Tomcat allows you to override these context fragments by adding Context elements to server.xml. If you decide to do this, be sure that your new Context element includes the necessary deployment parameters from the overridden context fragment.

Starting Tomcat

If everything has been completed successfully, then you should simply be able to start Tomcat at this point, and VIVO will be available. If you are using a Tomcat supplied by your operating system / package manager, then use your normal means for starting the application server.

Otherwise, start Tomcat by running the startup script - e.g.

Code Block
$ /usr/local/tomcat/bin/startup.sh

Anchor
Verify
Verify
Verify Your Installation

If you have completed the previous steps, you have good indications that the installation was successful.

  • When you Start tomcat, you see that Tomcat recognizes the webapp, and that the webapp is able to present the initial page.
  • When you Log in and add RDF data, you verify that you can log in to the root VIVO account.

The startup status will indicate if the basic configuration of the system was successful. If there were any serious errors, you will see the status screen and will not be allowed to continue with VIVO. If there are warnings, you will see the status screen when you first access VIVO, but after that you may use VIVO without hinderance. In this case, you can review the startup status from siteAdmin -> Startup status.

Here is a simple test to see whether the ontology files were loaded:

  • Click on the "Index" link on the upper right, below the logo. You should see a "locations" section, with links for "Country" and "Geographic Location." The index is built in a background thread, so on your first login, you may see an empty index instead. Refresh the page periodically to see whether the index will be populated. This may take some time: with VIVO installed on a modest laptop computer, loading the ontology files and building the index took more than 5 minutes from the time that Tomcat was started.
  • Click on the "Country" link. You should see an alphabetical list of the countries of the world.

Here is a test to see whether your system is configured to serve linked data:

  • Point your browser to the home page of your website, and click the "Log in" link near the upper right corner. Log in with the rootUser.emailAddress you set in runtime.properties. If this is your first time logging in, you will be prompted to change the password.
  • After you have successfully logged in, click "site admin" in the upper right corner. In the drop down under "Data Input" select "Faculty Member(core)" and click the "Add individual of this class" button.
  • Enter the name "test individual" under the field "Individual Name," scroll to the bottom, and click "Create New Record." You will be taken to the "Individual Control Panel." Make note of the value of the field "URI" - it will be used in the next step.
  • Open a new web browser or browser tab to the page http://marbles.sourceforge.net/. In the pink box on that page enter the URI of the individual you created in the previous step and click "open."
  • In the resulting page search for the URI of the "test individual." You should find it towards the bottom of the page next to a red dot followed by "redirect (303)." This indicates that you are successfully serving linked RDF data. If the URI of the "test individual" is followed by "failed (400)" you are not successfully serving linked data.

Finally, test the search index.

  • Type the word "Australia" into the search box, and click on the Search button.You should see a page of results, with links to countries that border Australia, individuals that include Australia, and to Australia itself. To trigger the search index, you can log in as a site administrator and go to Site Admin -> Rebuild search index.