Both sides previous revisionPrevious revisionNext revision | Previous revision |
howto:molgenis_install [2015/08/21 12:49] – jp | howto:molgenis_install [2018/10/09 10:12] (current) – external edit 127.0.0.1 |
---|
</code> | </code> |
| |
During this installation of MySQL you will be prompted for the root password, make sure to use something memorable. | During this installation of MySQL you will be prompted for the root password, make sure to use something memorable. |
| |
<code bash> | |
sudo apt-get install mysql-server libmysql-java | |
</code> | |
| |
Note that ''libmysql-java'' installs the JDBC connection driver to MySQL. This JDBC Driver is a java class which needs to be made available to tomcat. Two ways of doing this are either including ''/usr/share/java/mysql.jar'' in the tomcat7 user's CLASSPATH env variable or copying this file to the Tomcat ''lib'' directory as follows: | Note that ''libmysql-java'' installs the JDBC connection driver to MySQL. This JDBC Driver is a java class which needs to be made available to tomcat. Two ways of doing this are either including ''/usr/share/java/mysql.jar'' in the tomcat7 user's CLASSPATH env variable or copying this file to the Tomcat ''lib'' directory as follows: |
JAVA_OPTS="-Djava.awt.headless=true -Xmx1g -XX:+UseConcMarkSweepGC -Dmolgenis.home=/var/lib/molgenis -Dlog4j.configuration=log4j-molgenis.properties" | JAVA_OPTS="-Djava.awt.headless=true -Xmx1g -XX:+UseConcMarkSweepGC -Dmolgenis.home=/var/lib/molgenis -Dlog4j.configuration=log4j-molgenis.properties" |
</code> | </code> |
- After these changes to Tomcat you will need to restart the application server with: ''sudo service tomcat7 restart'' | - After these changes to Tomcat you will need to restart the application server with:<code bash> |
- MySQL will also require some additional setup (basically creating a username and a password).<code bash> | sudo service tomcat7 restart |
| </code> |
| - MySQL will also require some additional setup (basically creating a database, a username and a password).<code bash> |
mysql -u root -p -e "create database molgenis; grant all on molgenis.* to 'molgenis'@'localhost' identified by 'YOUR_PASSWORD_HERE'; flush privileges;" | mysql -u root -p -e "create database molgenis; grant all on molgenis.* to 'molgenis'@'localhost' identified by 'YOUR_PASSWORD_HERE'; flush privileges;" |
</code> | </code> |
- Do this by searching for //molgenis-app// in the [[http://search.maven.org/|maven repository]] | - Do this by searching for //molgenis-app// in the [[http://search.maven.org/|maven repository]] |
- Download the war file by using wget. e.g.<code bash> | - Download the war file by using wget. e.g.<code bash> |
wget http://search.maven.org/remotecontent?filepath=org/molgenis/molgenis-app/1.8.2/molgenis-app-1.8.2.war -O molgenis-app-1.8.2.war | wget http://search.maven.org/remotecontent?filepath=org/molgenis/molgenis-app/1.19.0/molgenis-app-1.19.0.war -O molgenis-app-1.19.0.war</code> |
</code> | |
- Rename the downloaded war file to ''ROOT.war'' (case important). This is an annoying and necessary limitation | - Rename the downloaded war file to ''ROOT.war'' (case important). This is an annoying and necessary limitation |
- Make sure owner tomcat7 owns the file, ''sudo chown tomcat7:tomcat7 ROOT.war'' | - Make sure owner tomcat7 owns the file, ''sudo chown tomcat7:tomcat7 ROOT.war'' |
sudo cp -vp ROOT.war /var/lib/tomcat7/webapps | sudo cp -vp ROOT.war /var/lib/tomcat7/webapps |
</code> | </code> |
- If you want to follow what is going on, **before** copying set a ''tail -f /var/log/tomcat7/catalina.out'' | - The above will automatically start deploying the molgenis app on Tomcat. If you want to follow what is going on, **before** copying set a ''sudo tail -f /var/log/tomcat7/catalina.out'' |
- | - When the molgenis web application deploys you should see something like: |
| <konsole> |
| <nowiki> |
| Aug 21, 2015 2:32:41 PM org.apache.catalina.startup.HostConfig deployWAR |
| INFO: Deploying web application archive /var/lib/tomcat7/webapps/ROOT.war |
| 14:33:04.641 [localhost-startStop-1] INFO o.m.d.e.f.EmbeddedElasticSearchServiceFactory - Embedded elasticsearch server started, data path=[/var/lib/molgenis/data] |
| 14:33:07.379 [localhost-startStop-1] INFO o.m.d.version.MolgenisUpgradeService - MetaData version:13, current version:13 upgrade not needed |
| 14:33:07.395 [localhost-startStop-1] INFO o.m.a.WebAppConfig$$EnhancerBySpringCGLIB$$183b5b00 - Reindexing repositories.... |
| 14:33:09.499 [localhost-startStop-1] INFO o.m.a.WebAppConfig$$EnhancerBySpringCGLIB$$183b5b00 - Reindexing done. |
| 14:33:09.551 [localhost-startStop-1] WARN o.m.data.mysql.MysqlRepository - Table for entity tags already exists. Skipping creation |
| 14:33:09.576 [localhost-startStop-1] WARN o.m.data.mysql.MysqlRepository - Table for entity packages already exists. Skipping creation |
| 14:33:09.678 [localhost-startStop-1] WARN o.m.data.mysql.MysqlRepository - Table for entity attributes already exists. Skipping creation |
| 14:33:09.707 [localhost-startStop-1] WARN o.m.data.mysql.MysqlRepository - Table for entity entities already exists. Skipping creation |
| 14:33:34.421 [localhost-startStop-1] ERROR o.m.d.support.AbstractEntityMetaData - No idAttribute specified for entityFileMeta, this attribute is required |
| 14:33:34.427 [localhost-startStop-1] ERROR o.m.d.support.AbstractEntityMetaData - No idAttribute specified for entityFileMeta, this attribute is required |
| 14:33:52.166 [localhost-startStop-1] INFO o.m.d.jpa.JpaRepositoryRegistrator - Registered JPA importer |
| 14:33:52.167 [localhost-startStop-1] INFO o.m.d.m.EmxImportServiceRegistrator - Registered EMX import service |
| 14:33:52.940 [localhost-startStop-1] INFO o.m.f.db.WebAppDatabasePopulator - initializing application database |
| 14:34:40.345 [localhost-startStop-1] INFO o.m.f.db.WebAppDatabasePopulator - initialized application database |
| 14:34:40.920 [localhost-startStop-1] INFO o.m.u.m.MenuManagerServiceImpl - Creating default menu from XML |
| 14:34:43.557 [localhost-startStop-1] INFO o.m.script.ScriptRunnerFactory - Registering Script type R. |
| 14:34:45.561 [localhost-startStop-1] INFO o.m.o.i.OntologyImporterServiceRegistrator - Registered ontology import service |
| 14:34:51.415 [localhost-startStop-1] INFO o.m.o.i.OntologyScriptInitializerImpl - Script entity "roc" has been added to the database! |
| 14:34:51.417 [localhost-startStop-1] INFO o.m.script.ScriptRunnerFactory - Registering Script type python. |
| Aug 21, 2015 2:34:54 PM org.apache.coyote.AbstractProtocol start |
| INFO: Starting ProtocolHandler ["http-bio-8080"] |
| Aug 21, 2015 2:34:54 PM org.apache.catalina.startup.Catalina start |
| INFO: Server startup in 133414 ms</nowiki> |
| </konsole> |
| |
| You can access the molgenis web app by pointing your web browser to [[http://127.0.0.1:8080|http://127.0.0.1:8080]] |