-
Notifications
You must be signed in to change notification settings - Fork 3
vitrolib install commands
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:
Is Java installed?
java -version
Install OpenJDK, version 8
sudo yum install java-1.8.0-openjdk-devel
Is Git installed?
git --version
Install Git
sudo yum install git
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
Reset Java preferences
sudo alternatives --config javac
sudo alternatives --config java
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"
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
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
chgrp -R tomcat Vitro
chmod -R g+rw Vitro
chmod g+s `find Vitro -type d`
git init --bare --shared=all Vitro
git clone https://github.com/ld4l-labs/vitrolib.git -b master
chgrp -R tomcat vitrolib
chmod -R g+rw vitrolib
chmod g+s `find vitrolib -type d`
git init --bare --shared=all vitrolib
Create the settings file
cp vitrolib/installer/example-settings.xml vitrolib-settings.xml
vi vitrolib-settings.xml
Create the vitrolib home directory
sudo mkdir /cul/data/vitrolib_home
sudo chown tomcat:tomcat /cul/data/vitrolib_home/
Run the installation script
cd vitrolib
sudo -u tomcat mvn install -s ../vitrolib-settings.xml
mysql -u root -p
CREATE DATABASE vitrodb CHARACTER SET utf8;
GRANT ALL ON vitrodb.* TO 'vitrolibUser'@'localhost' IDENTIFIED BY 'vitrolibPass';