Tuesday, January 16, 2024

Installing VIVO 1.14 (Latest Version) on ubuntu 22.04 (LTS)

 Minimum Requirement to install VIVO in ubuntu 22.04 (LTS).

  1. Operating System (VIVO can be install in any operating system - UNIX-like  (eg, Linux, CentOS), macOS, Windows)
  2. Java 8 or 11
  3. Maven 3.6.1 or later
  4. Tomcat 8 or 9
  5. Solr 8.x
  6. Optional - MySQL / MariaDB 5.5 or later (or any other supported by Jena SDB)



==============Update and Upgrade ubuntu==============
sudo apt update && sudo apt upgrade -y

This command help to updated the local package index as well as and upgrades packages to their latest available versions


==============Install Java 11==============

If Java is not installed, install version 8 or 11 for VIVO 1.14 version:

         sudo apt install openjdk-11-jdk -y


==============Install Maven 3.6.1 or later==============

sudo apt install maven -y



==============
Install Tomcat 9==============

 While installing the Apache Tomcat 9, the current version is 9.0.83 kindly check the current version

cd /tmp/

wget https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.83/bin/apache-tomcat-9.0.83.tar.gz

sudo tar -zxvf apache-tomcat-9.0.83.tar.gz -C /opt/

sudo mv /opt/apache-tomcat-9.0.83 /opt/tomcat

 

==============Create a User tomcat==============

sudo useradd -r -U -d /opt/tomcat -s /bin/false tomcat

==============Set the permission==============

sudo chown -R tomcat:tomcat  /opt/tomcat

sudo chown -R tomcat:tomcat  /opt/vivo

sudo chown -R tomcat:tomcat  /usr/share/maven

sudo chown -R tomcat:tomcat  /usr/share/maven-repo/

Note: 
        The maven user has write permission to the Tomcat webapps directory
        The tomcat user has write and read permission to the <vivo-dir>/home  directory.



==============Set Environmental Variables==============

Edit your ~/.bashrc or ~/.bash_profile file to add the following environment variables:

export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

export MAVEN_HOME=/usr/share/maven

export CATALINA_HOME=/opt/tomcat

export CATALINA_BASE=/opt/tomcat

export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin:$CATALINA_HOME/bin

export VIVO_HOME=/opt/vivo/



==============Create the SystemD Unit File for Tomcat automatically restart on startup==============
sudo nano /etc/systemd/system/tomcat.service

Paste the following configuration in /etc/systemd/system/tomcat.service:

[Unit]

Description=Tomcat9

After=network.target


[Service]

Type=forking

Environment=CATALINA_PID=/opt/tomcat/tomcat9.pid

Environment=JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64

Environment=CATALINA_HOME=/opt/tomcat

Environment=CATALINA_BASE=/opt/tomcat

Environment="CATALINA_OPTS=-Xms512m -Xmx512m"    # optional

Environment="JAVA_OPTS=-Dfile.encoding=UTF-8"    # optional

ExecStart=/opt/tomcat/bin/startup.sh

ExecStop=/opt/tomcat/bin/shutdown.sh


[Install]

WantedBy=multi-user.target

 

Save and close the file.




============Enable the Tomcat service and start it and use the following command to manage it============
sudo systemctl daemon-reload
sudo systemctl enable tomcat
sudo systemctl start tomcat
sudo systemctl status tomcat


========================
==================================================
==============
==============Download the VIVO 1.14 file from github repository==============

Copy the latest release of the VIVO file from the VIVO github repository 

sudo wget https://github.com/vivo-project/VIVO/archive/refs/tags/vivo-1.14.0.tar.gz

sudo tar -xzf vivo-1.14.0.tar.gz

sudo mv VIVO-vivo-1.14.0/ /opt/vivo


 

==============Configure before installing VIVO-1.14==============

sudo cp -r /opt/vivo/installer/example-settings.xml /opt/vivo/installer/settings.xml
sudo nano /opt/vivo/installer/settings.xml

Change this line

                <vivo-dir>/usr/local/vivo/home</vivo-dir>
                <tomcat-dir>/usr/local/tomcat</tomcat-dir>

Into this line

                <vivo-dir>/opt/vivo/home</vivo-dir>
                <tomcat-dir>/opt/tomcat</tomcat-dir>

save and close the file

 



==============Installing VIVO-1.14==============

cd /opt/vivo/installer/
sudo mvn install -s settings.xml

Wait for Build to Complete it will take some minute to complete based on your network speed

Maven will download dependencies, compile code, and perform other tasks during the build. If everything is set up correctly, you should see a "BUILD SUCCESS" message at the end.



==============Completing the Installation==============

Configure the Home Directory (/opt/vivo/home)

    There are two configuration files that are required to be in the home directory.

  •     example.runtime.properties
  •     example.applicationSetup.n3

cd /opt/vivo/home/config

sudo cp example.runtime.properties runtime.properties
sudo cp example.applicationSetup.n3 applicationSetup.n3



==============VIVO harvestor==============

sudo wget https://github.com/vivo-community/VIVO-Harvester/archive/refs/tags/v1.5.tar.gz
sudo tar -xzf v1.5.tar.gz
sudo cp -r VIVO-Harvester-1.5/ /opt/vivo/harvester

Change the harvester location path in runtimes.properties
sudo nano /opt/vivo/home/config/runtimes.properties
            harvester.location = /opt/vivo/harvester/




==============Verify the basic configuration setting of  your Installation==============
sudo nano /opt/vivo/home/config/runtimes.properties

Check the following mention line and match the setting based on your installation in the runtimes.properties

  • Vitro.defaultNamespace
  • rootUser.emailAddress
  • email.smtpHost
  • vitro.local.solr.url
  • selfEditing.idMatchingProperty
  • homePage.geoFocusMaps
  • multiViews.profilePageTypes
  • http.createCacheHeaders
save and closed the file



==============Install Solr 8 and config Solr with VIVO==============
  • Download and install the latest 8.x version of Solr
    While installing the apache solr 8, the current version is 8.11.2. Check and Verify the current version 
sudo wget https://archive.apache.org/dist/lucene/solr/8.11.2/solr-8.11.2.tgz
sudo tar xzf solr-8.11.2.tgz solr-8.11.2/bin/install_solr_service.sh --strip-components=2
sudo bash ./install_solr_service.sh solr-8.11.2.tgz

  • Installing and Configure vivocore directory into Solr
    Download the latest release of vivocore directory of the vivo-solr github repository (check the instruction here)
sudo wget https://github.com/vivo-project/vivo-solr/archive/refs/tags/vivo-solr-1.11.0.tar.gz
sudo tar -xzf vivo-solr-1.11.0.tar.gz
sudo mv vivo-solr-vivo-solr-1.11.0 vivo-solr
sudo cp -r /opt/vivo-solr/vivocore/ /var/solr/data/
sudo chown -R solr:solr /var/solr/data/vivocore/
sudo systemctl restart solr
sudo rm /var/solr/data/vivocore/conf/schema.xml
ln -s /var/solr/data/vivocore /opt/solr-8.11.2/server/solr


==============Update Ulimit and Max Processes Limit==============
sudo nano /etc/security/limits.conf
Add the following lines at the end of the file and save it:
soft nofile 65000
hard nofile 65000
soft nproc 65000
hard nproc 65000
Update Solr Configuration
sudo nano /opt/solr/bin/solr.in.sh

Search, add, or update the following lines (remove # then add false) and save the file:

#SOLR_ULIMIT_CHECKS=

SOLR_ULIMIT_CHECKS=false

Use the following command to manage the solr service

sudo systemctl stop solr
sudo systemctl start solr
sudo systemctl restart solr
sudo systemctl status solr


==============Set the permission==============

sudo chown -R solr:solr  /opt/solr*

          sudo chown -R tomcat:tomcat  /opt/vivo  





==============Start the application==============Check and verify the tomcat, solr is running

Command for managing Apache Tomcat:

sudo systemctl stop tomcat
sudo systemctl status tomcat
sudo systemctl start tomcat
sudo systemctl restart tomcat
Command for managing Apache Solr:
sudo systemctl stop solr
sudo systemctl status solr
sudo systemctl start solr
sudo systemctl restart solr

Open the browser and type localhost:8080/vivo

Note: 
  • When you Start tomcat, you see that Tomcat recognizes the webapp, and that the webapp is able to present the initial page. 
  • 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. 
  • Log in as root. Your root username is vivo_root@mydomain.edu (or the email you configured in runtime.properties in the line rootUser.emailAddress ).  The first-time root password is rootPassword.  You will be asked to change it after login.


Important links:

  • https://vivo.lyrasis.org/
  • https://wiki.lyrasis.org/display/VIVODOC/All+Documentation
  • https://github.com/vivo-project/VIVO
  • https://github.com/vivo-project/vivo-solr/tree/vivo-solr-1.11.0
  • https://dlcdn.apache.org/tomcat/tomcat-9/v9.0.84/bin/
  • https://archive.apache.org/dist/lucene/solr/
  • https://tomcat.apache.org/
  • https://maven.apache.org/
  • https://solr.apache.org/


No comments:

Post a Comment