-
Notifications
You must be signed in to change notification settings - Fork 1
install prereq
Notes initially adapted from the wiki page describing a host migration of the system. CentOS was the target machine in that opportunity. Package installation commands may need to be changed to the corresponding install commands for the target OS.
- JDK 7
- Apache HTTP server
- Apache Tomcat
- AllegroGraph server
- MySQL
- BioPortal core
JDK 7
(This link was useful to me.)
Get the latest JDK7 available from Oracle. The following was with jdk-7u21-linux-x64.rpm
as used for the TAMU server. Adjust instructions as needed.
(Note: ideally, we would prefer JDK8, but there's a bug in the underlying Spring library used by Bioportal, so we need to stick with 7.)
$ cd /opt/MMI-ORR/Downloads
$ sudo rpm -Uvh jdk-7u21-linux-x64.rpm
$ sudo alternatives --config java
There are 5 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.7.0-openjdk.x86_64/bin/java
2 /usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java
3 /usr/lib/jvm/jre-1.5.0-gcj/bin/java
4 /usr/java/latest/jre/bin/java
5 /usr/java/jdk1.7.0_21/jre/bin/java
Enter to keep the current selection[+], or type selection number: 5
[__@mmisw MMI-ORR]$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
Apache HTTP server (devel)
$ sudo yum install httpd-devel.x86_64
Apache Tomcat
Get the latest Tomcat 7 available from Apache. The following was with apache-tomcat-7.0.40.tar.gz
as used for the TAMU server. Adjust instructions as needed.
$ wget "http://apache.mirrors.tds.net/tomcat/tomcat-7/v7.0.40/bin/apache-tomcat-7.0.40.tar.gz"
$ cd /opt/
$ sudo tar zxf ~-/apache-tomcat-7.0.40.tar.gz
$ sudo ln -s /opt/apache-tomcat-7.0.40 ./tomcat
$ sudo chown -R tomcat:tomcat /opt/tomcat/
Apache Ant
$ wget "http://mirror.cogentco.com/pub/apache//ant/binaries/apache-ant-1.9.0-bin.tar.gz"
$ cd /opt/
$ sudo tar zxf ~-/apache-ant-1.9.0-bin.tar.gz
$ vi ~/.bash_profile # to set ANT_HOME
GCC is required to build the Apache module for Tomcat.
$ sudo yum groupinstall 'Development Tools'
$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-3)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Get the connector, build it, and install it:
$ wget "http://mirror.reverse.net/pub/apache/tomcat/tomcat-connectors/jk/tomcat-connectors-1.2.37-src.tar.gz"
$ cd /opt/MMI-ORR/code
$ tar zxf /opt/MMI-ORR/Downloads/tomcat-connectors-1.2.37-src.tar.gz
$ cd tomcat-connectors-1.2.37-src/
$ # according to BUILD.txt:
$ cd native/
$ ./configure --with-apxs=/usr/sbin/apxs
$ make
$ sudo make install
$ ls -l /usr/lib64/httpd/modules/mod_jk.so
-rwxr-xr-x. 1 root root 1113552 May 20 17:11 /usr/lib64/httpd/modules/mod_jk.so
LoadModule jk_module modules/mod_jk.so
<IfModule mod_jk.c>
JKWorkersFile /etc/httpd/conf/workers.properties
JKLogFile /var/log/httpd/mod_jk.log
JKLogLevel info
JkShmFile /var/log/httpd/mod_jk.shm
JKMount /*.jsp mmi
JKMount /servlet/* mmi
JKMount /examples/* mmi
</IfModule>
(and others to enable the mmi worker and configure a number of mappings)
# MMISW
# Define some properties
workers.apache_log=/var/log/httpd/mod_jk.log
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/java/jdk1.7.0_21
worker.list=mmi
# Set properties for mmi (ajp13)
worker.mmi.type=ajp13
worker.mmi.host=localhost
worker.mmi.port=8009
...
# MMISW
RewriteEngine On
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) http://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
Create a /etc/init.d/tomcat
file as a copy of the corresponding file on the TAMU deployment. Then:
$ sudo /sbin/chkconfig --add tomcat
$ sudo /sbin/chkconfig --level 345 tomcat on
$ sudo /sbin/chkconfig --list tomcat
tomcat 0:off 1:off 2:off 3:on 4:on 5:on 6:off
At this point Apache HTTP and Tomcat should be completely set up and running. Try something like telnet localhost 80
for a quick verification.
Note: This step can be postponed until a working ORR deployment is initially in place.
The following based on an installation of AllegroGraph Server 4.11.
Downloaded agraph-4.11-1.x86_64.rpm
from http://www.franz.com/agraph/downloads/:
$ cd /opt/MMI-ORR/Downloads/
$ wget "http://www.franz.com/ftp/pri/acl/ag/ag4.11/linuxamd64.64/SE/agraph-4.11-1.x86_64.rpm"
$ ls -l agraph*
-rw-rw-r--. 1 uuuuu uuuuu 183921030 May 17 09:44 agraph-4.11-1.x86_64.rpm
According to http://www.franz.com/agraph/support/documentation/current/server-installation.html
$ rpm -i agraph-4.11-1.x86_64.rpm
$ sudo /usr/bin/configure-agraph
Welcome to the AllegroGraph configuration program. This script will
help you establish a baseline AllegroGraph configuration.
You will be prompted for a few settings. In most cases, you can hit return
to accept the default value.
Location of configuration file to create:
[/etc/agraph/agraph.cfg]:
/etc/agraph does not exist.
Would you like me to create it?:
[y]:
Directory to store data and settings:
[/var/lib/agraph]: /opt/MMI-ORR/workspace/agraph
/opt/MMI-ORR/workspace/agraph does not exist.
Would you like me to create it?:
[y]: y
Directory to store log files:
[/var/log/agraph]:
Location of file to write server process id:
[/var/run/agraph/agraph.pid]:
User to run as:
[agraph]:
User 'agraph' doesn't exist on this system.
Create agraph user:
[y]:
Now you must set up an initial user account for AllegroGraph. This
account will have "super user" privileges in AllegroGraph.
SuperUser account name:
[super]:
SuperUser account password:
SuperUser account password (again):
Instance timeout seconds:
[604800]:
/etc/agraph/agraph.cfg has been created.
If desired, you may modify the configuration. When you are satisfied,
you may start the agraph service.
You can start AllegroGraph by running:
/sbin/service agraph start
You can stop AllegroGraph by running:
/sbin/service agraph stop
First start:
$ sudo /sbin/service agraph start
AllegroGraph Server Edition 4.11, built on May 17, 2013 07:26:49 GMT-0700
Copyright (c) 2005-2013 Franz Inc. All Rights Reserved.
AllegroGraph contains patented technology.
No patches loaded.
current-time: Monday, May 20, 2013 06:30:14 PM
default-external-format: #<external-format :utf8 [(crlf-base-ef :utf8)]>
Daemonizing...
Server started normally: Running with free license of 5,000,000 triples; no-expiration.
Starting AllegroGraph: [ OK ]
AGWebView interface at http://mmisw.tamucc.edu:10035
The mmiorr
repository was already created because of previous runs of the Ont service (ie. web interface no needed to create the repo).
$ sudo ls -lrth /opt/MMI-ORR/workspace/agraph/rootcatalog/mmiorr/
total 522M
-rw-r-----. 1 agraph agraph 524 May 20 22:57 parameters.dat
-rw-r-----. 1 agraph agraph 4 May 20 22:57 version
-rw-r-----. 1 agraph agraph 36 May 20 22:57 uuid
-rw-r-----. 1 agraph agraph 4.0G May 20 22:57 deleted
-rw-r-----. 1 agraph agraph 4.0M May 20 22:57 sstab-large-strings
-rw-r-----. 1 agraph agraph 256M May 20 22:57 freelog-307619580
-rw-r-----. 1 agraph agraph 1.5M May 20 22:57 sstab-chunk
-rw-r-----. 1 agraph agraph 4.0M May 20 22:57 sstab-strings
-rw-------. 1 agraph agraph 1.8K May 20 22:57 metadata.2
-rw-r-----. 1 agraph agraph 256M May 27 23:04 tlog-82e85810-d347-acf4-42fe-001dd8b71c56-0
-rw-------. 1 agraph agraph 13 May 27 23:04 ckpt
-rw-r-----. 1 agraph agraph 65 May 27 23:04 tlmgr
-rw-r-----. 1 agraph agraph 23 Jul 4 12:32 instance-info
-rw-r-----. 1 agraph agraph 330 Jul 4 12:32 storage
-rw-------. 1 agraph agraph 1.8K Jul 4 12:32 metadata.0
-rw-r-----. 1 agraph agraph 3 Jul 4 12:32 fti-state
To allow anonymous users to do queries against the mmiorr
repository:
- Log in as the 'super' user at http://mmisw.tamucc.edu:10035/repositories/mmiorr#users
- click
[add user]
, create 'anonymous', no password, and click OK. - Edit the created 'anonymous' user
- grant 'read' on catalog '/' repository 'mmiorr'
- click
[ok]
$ sudo /sbin/chkconfig --add agraph
$ sudo /sbin/chkconfig --level 345 agraph on
$ sudo /sbin/chkconfig --list agraph
agraph 0:off 1:off 2:off 3:on 4:on 5:on 6:off
$ sudo yum install mysql-server mysql php-mysql
$ mysql --version
mysql Ver 14.14 Distrib 5.1.69, for redhat-linux-gnu (x86_64) using readline 5.1
$ sudo /sbin/chkconfig --levels 235 mysqld on
$ sudo /sbin/chkconfig --list mysqld
mysqld 0:off 1:off 2:on 3:on 4:off 5:on 6:off
$ sudo /sbin/service mysqld start
Initializing MySQL database: Installing MySQL system tables...
OK
...
[ OK ]
Starting mysqld: [ OK ]
$ /usr/bin/mysql_secure_installation
...
Set root password? [Y/n]
New password:
Re-enter new password:
Password updated successfully!
...
Remove anonymous users? [Y/n]
... Success!
...
Disallow root login remotely? [Y/n]
... Success!
...
Remove test database and access to it? [Y/n] n
... skipping.
Reload privilege tables now? [Y/n]
... Success!
...
All done! If you've completed all of the above steps, your MySQL
installation should now be secure.
A Subversion client program is needed to get the BioPortal code.
Code checkout
$ cd /opt/MMI-ORR
$ mkdir -p code/bioportal
$ cd code/bioportal
$ svn checkout --username anonymous https://bmir-gforge.stanford.edu/svn/bioportal_core/tags/1005
# enter a blank password
$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 12
Server version: 5.1.69 Source distribution
Copyright (c) 2000, 2013, 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 bioportal;
Query OK, 1 row affected (0.00 sec)
mysql> create database bioportal_protege;
Query OK, 1 row affected (0.00 sec)
mysql> create database bioportal_lexgrid;
Query OK, 1 row affected (0.00 sec)
mysql> create user bioportal_user;
Query OK, 0 rows affected (0.00 sec)
mysql> create user bp_lexgrid_user;
Query OK, 0 rows affected (0.00 sec)
mysql> create user bp_protege_user;
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on *.* to 'bioportal_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on *.* to 'bp_lexgrid_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> grant all on *.* to 'bp_protege_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)
mysql> Bye
$ cd /opt/MMI-ORR/code/bioportal/1005/
Before building BioPortal, edit and adjust WebRoot/WEB-INF/resources/xslt/ontology_light.xsl
to add the line <xsl:copy-of select="urn" />
between the corresponding lines for "id" and "displayLabel":
<xsl:copy-of select="id" />
<xsl:copy-of select="urn" />
<xsl:copy-of select="displayLabel"/>
Then, continuing with the BioPortal instructions:
$ cp build.properties.sample build.properties
$ vi build.properties
The properties updated in build.properties are:
bioportal.resource.path=/opt/MMI-ORR/workspace/bioportal/resources
appserver.home=/opt/tomcat
appserver.lib=${appserver.home}/lib # note: original has .../common/lib
bioportal.jdbc.username=uu
bioportal.jdbc.password=xxxx
protege.jdbc.username=uu
protege.jdbc.password=xxxx
lexgrid.db.user=uu
lexgrid.db.password=xxxx
Then:
$ mkdir -p /opt/MMI-ORR/workspace/bioportal/resources
$ sudo chown -R `whoami` /opt/MMI-ORR/workspace/bioportal # to temporarily facilitate the build
$ ant clean
$ ant createwar
$ sudo ant deploywar
$ ls -l /opt/tomcat/webapps/bioportal.war
-rw-r--r--. 1 root root 49577775 May 20 22:35 /opt/tomcat/webapps/bioportal.war
OK.