Difference between revisions of "GCube Portal Installation"

From Gcube Wiki
Jump to: navigation, search
(Install the gCube Portal Bundle)
(Install the gCube Portal Bundle)
Line 23: Line 23:
  
 
After that, say you created a "Portal-Bundle" folder on your user's home(~) and extracted the org.gcube.portal.portal-bundle-2.0.0-0.tar.gz in there, the final part of your ~/.bashrc file may look like the following:
 
After that, say you created a "Portal-Bundle" folder on your user's home(~) and extracted the org.gcube.portal.portal-bundle-2.0.0-0.tar.gz in there, the final part of your ~/.bashrc file may look like the following:
<pre>
+
<source lang="shell">
 
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22
 
export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22
 
export JRE_HOME=$JAVA_HOME/jre
 
export JRE_HOME=$JAVA_HOME/jre
Line 36: Line 36:
  
 
export CATALINA_PID=~/pid.txt
 
export CATALINA_PID=~/pid.txt
</pre>
+
</source>
 
+
since we have no current portlets release at the moment you need also to do the following, copy
+
 
+
[[http://dl.dropbox.com/u/15737233/Portal-Bundle%20files/custom-portal-handler.jar custom-portal-handler.jar ]]
+
[[http://dl.dropbox.com/u/15737233/Portal-Bundle%20files/org.gcube.vo-management.usermanagement-core.jar usermanagement-core.jar]]
+
 
+
in $YOUR_BUNDLE_FOLDER/gCore/lib
+
 
+
and copy
+
 
+
[[http://dl.dropbox.com/u/15737233/Portal-Bundle%20files/GCubeLogin.war GCubeLogin]]
+
[[http://dl.dropbox.com/u/15737233/Portal-Bundle%20files/GCubeLoggedin-portlet.war GCubeLoggedin]]
+
 
+
in $YOUR_BUNDLE_FOLDER/deploy '''before starting tomcat'''.
+
  
 
==First startup of gCube Portal==
 
==First startup of gCube Portal==

Revision as of 15:37, 27 February 2012

gCube adopts Liferay Portal as enabling portal technology for its Ecosystem Gateway. The latest version available is gCube Portal-Bundle 2.0 (Feb 2012) built over Liferay Portal 6.0.6 (Bunyan)

gCube Portal 2.0

Starting from this 2.0 release, installing the gCube Portal is a very simple process and takes less than five minutes to complete. We've been working hard to make this process as easiest and quicker as possible.

Supported Operating Systems are Linux and MacOSX. With Java6 installed.

Install the gCube Portal Bundle

gCube Portal 2.0 is bundled with tomcat6 and the latest stable relase of gCube Core Distribution (gCore) and gCube Application Support Layer (ASL).

All you need to do is the following:

  • Download the latest version of the Portal-Bundle from the latest Stable Build (org.gcube.portal.portal-bundle-2.0.0-0.tar.gz)
  • Extract the gCube Portal bundle tar.gz into a folder on your machine
  • Add to the ~/.bashrc file the following:
    • clean CLASSPATH: "export CLASSPATH="
    • add CATALINA_HOME env. variable (the home directory of tomcat)
    • add JAVA_HOME env. variable (the home directory of java)
    • add JRE_HOME env. variable (JAVA_HOME/jre)
    • add GLOBUS_LOCATION env. variable (the home directory of gCore)
    • add CATALINA_OPTS env. variable "export CATALINA_OPTS="-DGLOBUS_LOCATION=$GLOBUS_LOCATION -Xmx1000m -Xms1000m -Dlog4j.configuration=file://$CATALINA_HOME/portal-log4j.properties"
    • add CATALINA_PID env. variable "export CATALINA_PID=~/pid.txt"

After that, say you created a "Portal-Bundle" folder on your user's home(~) and extracted the org.gcube.portal.portal-bundle-2.0.0-0.tar.gz in there, the final part of your ~/.bashrc file may look like the following:

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, aimms, algol68, apache, applescript, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, caddcl, cadlisp, cfdg, cfm, chaiscript, chapel, cil, clojure, cmake, cobol, coffeescript, cpp, csharp, css, cuesheet, d, dart, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, ezt, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, ispfpanel, j, java, java5, javascript, jcl, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nginx, nimrod, nsis, oberon2, objc, objeck, ocaml, octave, oobas, oorexx, oracle11, oracle8, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, pic16, pike, pixelbender, pli, plsql, postgresql, postscript, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, qml, racket, rails, rbs, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, rust, sas, scala, scheme, scilab, scl, sdlbasic, smalltalk, smarty, spark, sparql, sql, standardml, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vbscript, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xpp, yaml, z80, zxbasic


export JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.22
export JRE_HOME=$JAVA_HOME/jre
export CATALINA_HOME=~/Portal-Bundle/tomcat-6.0.29
export CATALINA_BASE=$CATALINA_HOME
export CATALINA_TMPDIR=$CATALINA_HOME/temp

export CLASSPATH=
export GLOBUS_LOCATION=~/Portal-Bundle/gCore
export GLOBUS_OPTIONS="-DX509_USER_PROXY=$X509_USER_PROXY"
export CATALINA_OPTS="-DGLOBUS_LOCATION=$GLOBUS_LOCATION -Xmx1000m -Xms1000m -Dlog4j.configuration=file://$CATALINA_HOME/portal-log4j.properties"

export CATALINA_PID=~/pid.txt

First startup of gCube Portal

gCube Portal enabling technology (Liferay) comes with a default database called HSQL or "hypersonic." This is not meant for production use!' You should switch to a real database to use the gCube Portal. For further information see Configuring gCube portal database section below

However, if you want to startup gCube Portal using the default database just open a shell and enter the following command:

source ~/.bashrc

and start tomcat

$CATALINA_HOME/bin/startup.sh

gCube Portal take less than a minute to initialize, in the meanwhile you might want to check the portal logs, to do so, enter the command:

tail -f $CATALINA_HOME/logs/catalina.out

open your browser and go to http://localhost:8080 if you performed all of the above operations correctly, you should be presented something like the following screenshot

all you need to do now is follow the instructions on the screen, a wizard application will guide you through the Portal Staging procedure. Thank you for using gCube.

Starting/Stopping a gCube Portal

In order to start / stop tomcat, you should execute the following commands:

  • source the configured ~/.bashrc
  • $CATALINA_HOME/bin/startup.sh
  • $CATALINA_HOME/bin/shutdown -force

please note: If you change gCore's configuration or Tomcat's settings or Liferay portal.ext.properties file, you should restart tomcat for the changes to be applied.

Changing Company web id

By default, gCube Portal starts with "liferay.com" as default company web id, this means, among other things, that at login time portal will suggest email addresses ending with @liferay.com. If you want to configure the portal to use your own Company web id just add the following property in portal.ext.properties file located under $CATALINA_HOME/webapps/ROOT/WEB-INF/classes.

Replace <MY_COMPANY_WEB_ID> with your own company web id, e.g. google.com

#company web id name
company.default.web.id=<MY_COMPANY_WEB_ID>

please note 1: This change must be performed before starting up your portal for the first time.

please note 2: This change will not work if you use the default HSQL DB (Hypersonic)

Configuring gCube Portal database

If you want to configure the portal to use a different database than the default HSQL DB one (and you are encouraged to do so) you should add some properties in portal.ext.properties file located under $CATALINA_HOME/webapps/ROOT/WEB-INF/classes. Please refer to the Liferay Database Portal Properties to know which type of database is supported.

Configuration examples: (replace <YOUR_DB_NAME>, <YOUR_DB_USER>, <YOUR_DB_PASSWORD> with actual values

  • PostgreSQL
#
# PostgreSQL
#
jdbc.default.driverClassName=org.postgresql.Driver
jdbc.default.url=jdbc\:postgresql\://localhost\:5432/<YOUR_DB_NAME>
jdbc.default.username=<YOUR_DB_USER>
jdbc.default.password=<YOUR_DB_PASSWORD> 
  • MySQL
 #
 # MySQL
 #
 jdbc.default.driverClassName=com.mysql.jdbc.Driver
 jdbc.default.url=jdbc:mysql://localhost/<YOUR_DB_NAME>?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false
 jdbc.default.username=<YOUR_DB_USER>
 jdbc.default.password=<YOUR_DB_PASSWORD>

The above configuration are known to be working with gCube Portal.

Troubleshooting

If you get something like the following exception at portal startup, just cleanup your browser cookies.

ERROR [CompanyThreadLocal:54] com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 1
com.liferay.portal.NoSuchCompanyException: No Company exists with the primary key 1
	at com.liferay.portal.service.persistence.CompanyPersistenceImpl.findByPrimaryKey(CompanyPersistenceImpl.java:436)
	at com.liferay.portal.service.base.CompanyLocalServiceBaseImpl.getCompany(CompanyLocalServiceBaseImpl.java:325)
	at sun.reflect.GeneratedMethodAccessor515.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
       .....

Portal Staging procedure

Portal Staging is a new feature bundled with gCube Portal 2.0 When you install the portal for the first time a Wizard Application will guide you through the installation configuration and will setup everything's needed for you.

Once you logged in for the first time with the suggested credential you are presented the following page, click the button Begin Install (circled in red) to start the installation

PortaStaging2.png

At this point the installation procedure has started. The whole procedure consist of 4 steps, as shown in the figure below:

  • Infrastructure and Theme Selection
  • Virtual Research Environments check-up
  • Administrator account creation
  • Final step

Provide the information requested, if your not sure about the settings you should read more about gCube on this wiki. The next steps are quite handy and we think no other documentation is needed, hoever feel free to ask for support if needed.

PortaStaging3.png