Paul,
There are few errors I found in the bioportal install instructions.
1)
protege.jdbc.urljdbc:mysql://localhost/bioportal
should be
protege.jdbc.urljdbc:mysql://localhost/bioportal_protege
because the metadata table is created in bioportal_protege and bioportal cannot find the table and the server ends up in 500 internal error.
2)
Instruction to install rails are mentioned twice. First it says
gem install rails and later on gem install rails -v 2.0.2
Does BioPortal need a specific version of rails? This step can get confusing.
Thanks, --Tejas
On Fri, Dec 4, 2009 at 6:32 PM, Paul R Alexander <palexander@xxxxxxxxxxxx> wrote:
Here are the updated instructions:
How to install Bioportal
Prerequisities
- Install Sun Java 1.5 or higher (On ubuntu you may need to make
it the default jre: sudo update-alternatives --config java)
- Install tomcat
- On ubuntu, it will run on port 8180 - this will create
problems
with the BP UI (which assumes 8080 and 80), solution in the UI section
below
- The BioPortal core port can now be configured in the
environment.rb file of the Rails app. --Paul 14:27, 23 October 2009
(PDT)
sudo apt-get install tomcat5.5
- Install MySQL (5.1)
sudo apt-get install mysql-server
Install BP backend
- In MySQL, create databases:
mysql -u root -p
create database bioportal;
create database bioportal_protege;
create database bioportal_lexgrid;
- Add user: bioportal_prd/bioportal_prd (change password, if you
want, but make sure you keep it in sync with the build.properties)
create user bioportal_prd identified by 'bioportal_prd'
- grant all rights to bioportal_prd on the 3 databases
grant all on *.* to 'bioportal_prd'@'localhost'
- on the bioportal database, grant also the SUPER and the TRIGGER
rights
grant SUPER, TRIGGER on *.* to
'bioportal_prd'@'localhost'
- create user ncboadmin; (needed!)
create user ncboadmin identified by 'ncboadmin'
- Checkout bioportal_core sources from SVN:
- Create some directory on your computer to hold the bioportal
resources, e.g.: /work/tools/bioportal/resources
- Edit the build.properties from the bioportal_core folder,
especially:
bioportal.resource.path/work/tools/bioportal/resources
appserver.home/usr/share/tomcat5.5
bioportal.jdbc.urljdbc:mysql://localhost:3306/bioportal
bioportal.jdbc.drivercom.mysql.jdbc.Driver
bioportal.jdbc.usernamebioportal_prd
bioportal.jdbc.passwordbioportal_prd
protege.jdbc.urljdbc:mysql://localhost/bioportal
protege.jdbc.drivercom.mysql.jdbc.Driver
protege.jdbc.usernamebioportal_prd
protege.jdbc.passwordbioportal_prd
lexgrid.db.urljdbc:mysql://localhost/bioportal_lexgrid
lexgrid.db.userbioportal_prd
lexgrid.db.passwordbioportal_prd
lexgrid.email.totudorache@xxxxxxxxxxxx
- Execute:
mysql -u root -p < db/sql/bioportal_db.sql
mysql -u root -p < db/sql/bioportal_lookup_data.sql
mysql -u root -p <
db/sql/bioportal_metadata_base_inclBPcategories.sql
- Make following steps only if you are using tag 1018
mysql -u root -p <
db/sql/bioportal_db_changes_1017.sql
mysql
use bioportal;
alter table ncbo_usage_log modify request_parameters
varchar(2048);
This should create a war file that is deployed in your tomcat
folder. You might get a permission exception, in which case, you either
run as root, or give your user write access to tomcat/webapps.
- Test the backend, by going to a browser and try:
Troubleshooting
- If you get in catalina.out a access security exception
(something like could not parse default web.xml), then edit
CATALINA_HOME/conf/policy.d/01system.policy
//Added by Tania to make BP run, not a good idea to grant to all, all permisson... well, it's a hack
grant {
permission java.security.AllPermission;
};
(I had problems with the file permission in tomcat, so I have given
all write permission to webapps. Not recommended, but solved many
problems. Alex can tell you how to do it right)
- Always look in the tomcat logs: catalina.out and bioportal.log
Install BioPortal UI Development Environment
- Install ruby, rubygems, rails: http://rubyonrails.org/download
sudo apt-get install ruby
sudo apt-get install rubygems
sudo apt-get install rails
gem install rails
- Install MySQL
sudo gem install mysql --
--with-mysql-dir/usr/share/mysql
- if you get error "'require': no such file to load -- mkmf
(LoadError)", you need to install:
sudo apt-get install libmysqlclient15-dev
sudo apt-get install ruby-dev
- Install memcached
sudo apt-get install memcached
- Install ruby gems
gem install rails -v 2.0.2
gem install fastthread
gem install memcache-client
gem install SystemTimer
- Install LibXML and related gem
sudo apt-get install libxml2 libxml2-dev
gem install libxml-ruby
- Decide whether you want to run bleeding-edge code or a
particular tag (running the latest tag from the BioPoral UI and the
BioPortal Core is a good method for getting a stable system)
- To get the most recent production-ready tag, look in the tag
folder in the code repository, find the highest tag number, then issue
the following command:
- To get the most recent, bleeding-edge source code, you must
issue the following command:
- Go to the checked out code and edit config/database.yml and edit
the database connection for "development". E.g.:
development:
adapter: mysql
encoding: utf8
database: BioPortalGui_development
username: bioportal_prd
password: bioportal_prd
host: localhost
- In MySql give all permission on BioPortalGui_development to
the bioportal user that you have set up in the backend (e.g.,
bioportal_prd)
- Run the database rake task from the root of the BioPortal UI
directory:
- Modify config/environments/production.rb file to point to the
correct location of your memcache server
- Rename /config/environment.rb.sample to /config/environment.rb
and modify the following:
- Point to the correct SMTP server
- Point to the proper BioPortal Core and Open Biomedical
Services Resource Index rest URLs (no trailing slashes)
- Provide the port number of your BioPortal Core Tomcat
installation
- Enable and configure reCAPTCHA if desired
- If tomcat runs on a different port (e.g., 8180), like in
ubuntu, change the $REST_PORT setting in config/environment.rb
- Start the webserver
- Webrick or Mongrel are Ruby-based webservers, which can be
started from the BioPortal UI directory:
ruby script/server
- Webrick and Mongrel default to port 3000
- Alternatively, you can use Phusion Passenger (aka mod_rails,
mod_rack). This is recommended for production environments. More
information: http://www.modrails.com
- UI should be up now. Make sure backend in Tomcat is running. To
test UI go to:
- If search is not working, make the tomcat/logs/bioportal.log
writable to everybody
Troubleshooting
If something goes wrong, then look in:
- Webrick console
- Tomcat logs: catalina.out and bioportal.log
Install the bioportal admin application (optional)
- This is optional, and only if you want to do things directly
on the backend (e.g. start parsing, indexing, deleting ontologies,
etc.)
- Checkout the bioportal admin from SVN
svn co https://bmir-gforge.stanford.edu/svn/bioportal_admin/trunk
bioportal_admin
cd bioportal_admin
- make a copy of the build.properties.sample and rename it to
build.properties
- edit the build.properties (entries similar to the ones in
build.properties for bioportal_core, see above)
- you'll have to edit bioportal.admin.encryption.key . See
comments for valid values
ant clean deplywar
http://localhost:8180/bioportal_admin
(your port might be different)
What to do next
- Go get a coffee; if you succeeded, then you deserve it :)
- Create a user from the Bioportal UI
- Try to upload a small ontology
- If you want to use the bioportal_admin, you will have to give
your user admin privileges. You can do this, by first looking into the
bioportal databse, ncbo.l.role table, what is the id for
ROLE_ADMINISTRATOR (e.g., 2824). Then, look in the ncbo_user table for
your user (firstname and lastname col), and write down the user id from
the id column (e.g. 38312). Then go to ncbo_user_role table and edit
the row that contains your user id in the user_id column, and put in
the role_id column the administrator role id. E.g.
(user_id:38312,role_id:2824). Restart the backend and try to log into
the bioportal_admin
_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/oor-dev/
Config/Unsubscribe: http://ontolog.cim3.net/mailman/listinfo/oor-dev/
Shared Files: http://ontolog.cim3.net/file/work/OOR/dev/
Wiki: http://ontolog.cim3.net/cgi-bin/wiki.pl?OpenOntologyRepository
_________________________________________________________________
Message Archives: http://ontolog.cim3.net/forum/oor-dev/
Config/Unsubscribe: http://ontolog.cim3.net/mailman/listinfo/oor-dev/
Shared Files: http://ontolog.cim3.net/file/work/OOR/dev/
Wiki: http://ontolog.cim3.net/cgi-bin/wiki.pl?OpenOntologyRepository (01)
|