Skip to content
ecerami edited this page May 5, 2015 · 30 revisions

Prepare the Property File

The portal requires two properties files: one for global configuration (portal.properties) and one for logging (log4j.properties). Example files are available within GitHub, but you must take the following steps to prepare them.

cd src/main/resources
cp portal.properties.EXAMPLE portal.properties
cp log4j.properties.EXAMPLE log4j.properties

Prepare the log4j.properties File

Update the following lines with paths that make sense for your local system.

log4j.appender.a.rollingPolicy.FileNamePattern = /srv/www/sander-tomcat/tomcat6/logs/public-portal.log.%d.gz
log4j.appender.a.File = /srv/www/sander-tomcat/tomcat6/logs/public-portal.log

Create the cBioPortal MySQL Database and User

You must create a cbioportal database within MySQL, and a user account with rights to access this database. This is done via the mysql shell.

> mysql -u root -p
Enter password: ********

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 64
Server version: 5.6.23 MySQL Community Server (GPL)

Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

mysql> create database cbioportal;
Query OK, 1 row affected (0.00 sec)

mysql> CREATE USER 'cbio_user'@'localhost' IDENTIFIED BY 'somepassword';
Query OK, 0 rows affected (0.00 sec)

mysql> GRANT ALL ON cbioportal.* TO 'cbio_user'@'localhost';
Query OK, 0 rows affected (0.00 sec)

mysql>  flush privileges;
Query OK, 0 rows affected (0.00 sec)

Create a Maven Settings File

In order to access your database, you must create a Maven settings.xml file, and populate it with your database username and password.

The file must be located under: ~/.m2, and named: settings.xml.

A sample file is shown below:

<settings>
  <servers>
    <server>
      <id>settingsKey</id>
      <username>cbio_user</username>
      <password>somepassword</password>
    </server>
  </servers>
</settings>

Set the PORTAL_HOME Variable

Prior to building, you must specify an environment variable for PORTAL_HOME. This must point to the root directory containing the portal source code.

For example, add the following to your .bash_profile:

export PORTAL_HOME=/Users/ecerami/dev/cbioportal