Skip to content

vitrolib install commands

Jim Blake edited this page Dec 5, 2016 · 20 revisions

Commands to use when installing Vitrolib

These commands are mentioned in the VitroLib Installation video, and are included here for your convenience. You can reach this page by either of these URLs:

Installing pre-requisites

Java

Is Java installed?

java -version

Install OpenJDK, version 7

sudo yum install java-1.7.0-openjdk

Git

Is Git installed?

git --version

Install Git

sudo yum install git

Maven

Is Maven installed?

mvn --version

Is Maven available to yum?

yum search maven

Make Maven available to yum. (Only if the previous command failed)

sudo wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo \
     -O /etc/yum.repos.d/epel-apache-maven.repo

sudo sed -i s/\$releasever/6/g /etc/yum.repos.d/epel-apache-maven.repo

Install Maven

sudo yum install apache-maven

Tomcat

Create the tomcat group. (This will do nothing if the group already exists.)

sudo groupadd tomcat

Create the tomcat user ID in the tomcat group. (Again, if the user already exists, this will have no effect.)

sudo useradd tomcat -g tomcat

Install Tomcat

sudo yum install tomcat7 tomcat7-webapps

Start Tomcat

sudo service tomcat7 start

Stop Tomcat

sudo service tomcat7 stop

Where is Tomcat installed? (Tomcat must be running.)

ps -ef | grep tomcat

Create setenv.sh

cd /usr/share/tomcat7/bin
sudo touch setenv.sh
sudo chgrp tomcat setenv.sh
sudo vi setenv.sh

Contents of setenv.sh

export CATALINA_OPTS="-Xms2G -Xmx2G"

MySQL

Is MySQL installed?

mysql --version

Install MySQL

sudo yum install mysql-server

Ensure that MySQL start when the system is re-booted.

sudo chkconfig mysqld on

Make MySQL more secure

/usr/libexec/mysql55/mysql_secure_installation

Start MySQL

sudo service mysqld start

Installing Vitrolib

Add your account to the tomcat group (use your own account name instead of my_account)

sudo usermod -a -G tomcat my_account

Create the distribution directory (use your own path for distribution directory instead of /cul/src/vitrolib_distribute, and your own account name instead of my_account)

sudo mkdir /cul/src/vitrolib_distribute
sudo chown my_account:tomcat /cul/src/vitrolib_distribute
sudo chmod g+rw /cul/src/vitrolib_distribute
sudo chmod g+s /cul/src/vitrolib_distribute
cd /cul/src/vitrolib_distribute

Clone the source repositories

git clone https://github.com/ld4l-labs/Vitro.git -b vitrolib/master
git clone https://github.com/ld4l-labs/vitrolib.git -b master

Create the settings file

cp vitrolib/installer/example-settings.xml vitrolib-settings.xml
vi vitrolib-settings.xml

Run the installation script

cd vitrolib
sudo -u tomcat mvn install -s ../installation-settings.xml

Clone this wiki locally