Installation and configuration of the development environmentΒΆ

Liferay Bundle Installation

  • Download Liferay Bundle 6.1.1-ce-ga2 for Glassfish from here
  • Unzip the Liferay Bundle in the folder you prefer.
  • set the LIFERAY_HOME env variable to the folder containg your Liferay Bundle:
export LIFERAY_HOME=/Users/Macbook/Downloads/liferay-portal-6.1.1-ce-ga2
  • set the executable permission to all binary file in glassfish bin folder:
chmod +x glassfish-3.1.2/bin/*
  • start the domain using the following command:
$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin start-domain domain1

You should have an output like the following:

RicMac:bin Macbook$ $LIFERAY_HOME/glassfish-3.1.2/bin/asadmin start-domain domain1
Waiting for domain1 to start ......
Successfully started the domain : domain1
domain  Location:
Log File:
Admin Port: 4848
Command start-domain executed successfully.
  • Open a browser window to http://localhost:8080/ This procedure will take a while during the first connection. At the end you should get the following interface:
  • Press the ‘Finish Configuration’ button; it generates the portal’ configuration file:


  • Press the ‘Go My Portal’ button, agree the conditions, set the new password and password retrival questions.

    After then you’ll be redirected to the Liferay home page.

  • To check the Liferay log file:

tail -f $LIFERAY_HOME/glassfish-3.1.2/domains/domain1/logs/server.log

MySQL - Installation and Configuration

In case you have alreadya MySQL server in your system, you can skip this step just verifying that your version is < 5.6 due to an incompatibility issue between newer MySQL versions and the jdbc-connector.jar library provided with the current version of Liferay bundle.

  • Install MySQL (MySQL Community Server).

You could skip the subscription to the ORACLE Web Login.


Instructions are available inside the README.txt file.

Select the DMG file and execute the two pkgs icons from the execute:

sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
(your password will be requested)

Add the PATH to the .profile:

export PATH=$PATH:/usr/local/mysql/bin

Start the service

RicMac:liferay-portal-6.1.1-ce-ga2 Macbook$ sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
Starting MySQL database server


On L5/6 it is possible to install MySQL with:

yum install mysql-server

Then the follow commands will enable mysql to start at boot and startup the mysql daemon process

# chkconfig mysqld on
# /etc/init.d/mysqld start
  • generate the file:
  • create Liferay database
mysql -u root
CREATE USER 'liferayadmin' IDENTIFIED BY 'liferayadmin';
GRANT ALL PRIVILEGES ON lportal.* TO 'liferayadmin'@'localhost' IDENTIFIED BY 'liferayadmin';
  • Download the mysql-connector from here and copy it in $LIFERAY_HOME/glassfish-3.1.2/domains/domain1/lib/

*! Restart Liferay; this will cause Liferay to identify the DB and create new tables and data.

$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin stop-domain domain1 && \
$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin start-domain domain1

Liferay Plugins SDK

  • Download the SDK from here (Liferay Plugins SDK 6.1 GA 2).

    You may try clicking here

  • Open the file LIFERAY_SDK_HOME/, uncomment ‘glassfish’ settings and setup the proper file path values. Comment out the default enabled tomcat settings.

  • Pay attention that in LIFERAY_SDK_HOME/ there are also settings to specify which java compiler will be used by ant; in case of troubles try to setup properly the ‘javac.compiler’ option; for instance switchin to ‘modern’ value.

  • Be sure your system has installed ‘ant’ and ‘ecj’ orherwise install them.

  • A small test could be the use of:

cd $LIFERAY_SDK_HOME/portlets/
./ hello-world "Hello-World"

Pay attention that the file normally does not have enabled the execution permission

chmod +x ./
  • This should create the ‘hello-world’ portlet folder.
  • Enter in hello-world-portlet folder:
cd  hello-world-portlet
  • Excute deploy command
ant deploy
  • Liferay log file should contain some lines like this:

    Successfully autodeployed :


Grid Engine

Stop Liferay
$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin stop-domain domain1
  • To create the database and the tables;
download from here the UsersTrackingDB.sql file and execute:
mysql -u root < UsersTrackingDB/UsersTrackingDB.sql

In case the users tracking database already exists, uncomment the line:

-- drop database userstracking;

Pay attention the line above will destroy the existing database.

  • Download Grid Engine and JSAGA libraries from sourceforge and copy them in temporary folder:
# Use curl <namefile> > <namefile> in case you do not have wget
  • Unzip the inside the temporary folder:
  • Move the config file from the temporary folder to the Liferay config folder:
mv <temp folder path>/GridEngine_v1.5.9/GridEngineLogConfig.xml $LIFERAY_HOME/glassfish-3.1.2/domains/domain1/config
  • Move all the other files to the Liferay lib folder
mv <temp folder path>/GridEngine_v1.5.9/* $LIFERAY_HOME/glassfish-3.1.2/domains/domain1/lib
  • Startup liferay
$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin start-domain domain1
  • If you are using a virtual machine, be aware that Glassfish control panel access normally is forbidden from remote. Following commands are necessary to enable it:
$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin --host localhost --port 4848 change-admin-password
$LIFERAY_HOME/glassfish-3.1.2/bin/asadmin enable-secure-admin

Please refer to the Glassfish Administration Guide for more details


Each access to any distributed infrastructure requires well defined authentication and authorization mechanisms.

Most of Grid infrastructures are making use of the GSI. This security mechanism relies on X509 digital certificates provided by entities named Certification Authorities which themselves are using X509 certificates.

The CAs are normally registered by the IGTF a body to establish common policies and guidelines between its Policy Management Authorities (PMAs). The CAs act as an independent trusted third party for both subscribers and relying parties within the infrastructure.

In order to setup CA certificates, it is necessary to perform one of the following instructions. RPM based Linux distributions may try the first approach (Linux systems); the othe platforms must use the second approach (Other systems).

  • Linux systems

On linux systems it is possible to install the IGTF CA certificates executing the following steps:

  • Other systems (MacOSx):
Execute the following instructions to create the /etc/grid-security/certificates and /etc/grid-security/vomsdir folders:
sudo mkdir -p /etc/grid-security
curl > grid_settings.tar.gz
sudo tar xvfz grid_settings.tar.gz -C /etc/grid-security/

(!) Archives below will expire timely so that they should be kept updated

(!!) vomsdir must be updated with VO you are going to support

VPN Setup to get the access to the eTokenserver

The eToken server is the responsible to deliver grid proxy certificate to the GridEngine starting form Robot Certificates stored into an eToken USB key.

For security purposes is not possible to access directly the eTokenServer. For porltet developers it is possible to open a VPN connection.

In order to get the necessary certificates you have to send us a request

The VPN connection information will be released in OpenVPN format, together with the necessary certificate and a password.

For Mac users we may suggest Tunnelblick for MacOSX platforms.

There is also this video showing how to setup the VPN from the configuration files sent by us. For other platforms like Linux we suggest to install OpenVPN client and then execute from the same directory holding the certificate:

openvpn --config <received_conf_file>.ovpn

Please notice that on CentOS7 VPN will not work by default since provided VPN certificates are encrypted using MD5 and SHA1 which are no longer supported on CentOS 7. To be able to use the VPN certificate anyway it is possible to enable Md5 support on CentOS7;

just executing as root:

cat >> /usr/lib/systemd/system/NetworkManager.service <<EOF
systemctl daemon-reload
systemctl restart NetworkManager.service

Further details about this issue are available here (Thanks to Manuel Rodriguez Pascual)



For architectural reasons the constructor of GridEngine object must be declared differently than the portlet code written for the production environment

The constructor must be created with:

MultiInfrastructureJobSubmission multiInfrastructureJobSubmission = new MultiInfrastructureJobSubmission

In the portlet examples the constructor call lies inside the submitJob method

Integrated Development Environment (IDE)

We recommend NetBeans as IDE to develop portlets and other Liferay plugins. In order to create Liferay plugins you can use the Plugin Portal Pack extension of NetBeans or configure the plugin to use the Liferay SDK


Liferay Plugin SDK - How to

Plugin Guide