Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

PGA Installation Prerequisites 

NOTE: Plese refer documentation in Airavata Documentation: Prerequisites

Installing PGA in Ubuntu OS

Prerequisites

  1. Requires a Unix or Unix like operating system
  2. Requires a web server (e.g apache web server) with PHP 5.4 or higher. Make sure have enabled mod_rewrite module in httpd.conf file and enable PHP SOAP extension
  3. Install Composer
  4. MYSQL database installation (Required if the user is hosting Airavata on his own. To communicate with SciGaP this step is not relevant)
  5. MCrypt PHP extension
  6. Enable OpenSSL PHP extension
  7. Follow instructions given in links to install the prerequisites based on the OS ;
    1. On Ubunutu: http://www.dev-metal.com/install-laravel-4-ubuntu-12-04-lts/
    2. On Centos: https://www.digitalocean.com/community/tutorials/how-to-install-laravel-4-on-a-centos-6-vps
    3. On MAC OS: http://sangatpedas.com/20140219/installing-laravel-osx-mavericks/
  8. Important: Do not need to install Laravel. You can skip the steps given on the links

The following guide gives a sample installation starting from a fresh Ubunutu 12.04 installation.

  1. Update the ubuntu package manager
    1. sudo apt-get update

    2. sudo apt-get upgrade


  2. Install Apache 

    1. sudo apt-get install apache2


  3. Install PHP 5.4

    1. sudo apt-get install python-software-properties

    2. sudo add-apt-repository ppa:ondrej/php5-oldstable

    3. sudo apt-get update

    4. sudo apt-cache policy php5

    5. sudo apt-get install php5


  4. You can check the installed versions of apache and php using following commands

    1. apache2 -v 

    2. php -v


  5. Install the necessary php extensions

    1. sudo apt-get install unzip

    2. sudo apt-get install curl

    3. sudo apt-get install openssl

    4. sudo apt-get install php5-mcrypt

    5. sudo apt-get install php-soap


  6. Install Composer System Wide

    1. curl -sS https://getcomposer.org/installer | php

    2. sudo mv composer.phar /usr/local/bin/composer


  7. Activate mod_rewrite

    1. sudo a2enmod rewrite

    2. sudo service apache2 restart


  8. Open the default vhost config file:

    1. sudo nano /etc/apache2/sites-available/default

    2. Now search for “AllowOverride None”  corresponding “DocumentRoot /var/www <Directory /var/www>” (which should be there TWO times) and change both to “AllowOverride All“. Search for these two lines.

    3. Exit and save with CTRL+X, Y, ENTER.

PGA Installation

...

  1. Download PGA from github to the document root of you web server /var/www. 
  2. Use git clone https://github.com/apache/airavata-php-gateway.git  or download the zip from the github web page.
  3. Go inside the PGA directory (e.g /var/www/airavata-php-gateway)
  4. Make sure the storage folder is writablesudo chmod -R 755 777 app/storage
  5. Go to [PGA_HOME]/app/config/pga_config.php and change the configuration to match your settingsMore instruction on pga_config.php follow step 6 in Airavata Documentation: pga_config.php configurations 
  6. Now issue composer install update commandsudo composer installupdate
  7. Restart the web serversudo service apache2 restart

 Troubleshooting for Ubantu OS:

 

...

Installing PGA on Cent OS

Please follow documentation in Airavata Documentation: PGA Installation on Cent OS 7

Installing PGA in MAC OS

Prerequisites

 

use locate mcrypt.so ,to get its locaton
locate mcrypt.ini and open the mcrypt.ini file
sudo pico /etc/php5/mods-available/mcrypt.ini
change the at line a extension=<location of e mcrypt.so fil> eg:/usr/lib/php5/20121212+lfs/mcrypt.so
save changes.
provide permission to storage by
sudo chmod -R 777 app/storage
Now restart the apache server again and test PGA web-interface.

 

 

 

User Hosted PGA with SciGaP on Arch Linux

 

  1. Install the necessary dependencies:
    1. $ sudo pacman -S polkit apache php php-apache php-mcrypt php-composer mariadb

  2. Enable the appropriate extensions:
    1. $ sudo vim /etc/php/php.ini
      Uncomment the following extensions: mcrypt.so, openssl.so, pdo_mysql.so, and soap.so

    2. $ sudo vim /etc/httpd/conf/httpd.conf
      Uncomment the following extension: rewrite_module modules/mod_rewrite.so
      Replace the mpm_event_module modules/mod_mpm_event.so with mpm_prefork_module modules/mod_mpm_prefork.so
      Add the following line: LoadModule php5_module modules/libphp5.so
      Add the following line: Include conf/extra/php5_module.conf

  3. Create necessary MySQL config:
    1. $ sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql
  4. Start and enable the Apache and MySQL daemons:
    1. $ sudo systemctl start polkit
      $ sudo systemctl start httpd
      $ sudo systemctl enable httpd
      $ sudo systemctl start mysqld
      $ sudo systemctl enable mysqld

    2. Note: you may need to reboot to start polkit

  5. Complete the MySQL installation:
    1. $ sudo mysql_secure_installation

  6. Add a MySQL user:
    1. $ mysql -u root -p
      > CREATE USER 'forge'@'localhost';
      > GRANT ALL PRIVILEGES ON * . * TO 'forge'@'localhost'; 
      > CREATE DATABASE 'forge';
      > FLUSH PRIVILEGES;
      > exit 

  7. Clone the PGA git repository:
    1. $ cd /srv/http
      $ sudo git clone https://github.com/apache/airavata-php-gateway.git
      $ sudo chown -R $USER airavata-php-gateway

  8. Configure the PGA:
    1. $ cd airavata-php-gateway
      $ cp app/config/pga_config.php.example app/config/pga_config.php
      $ vim app/config/pga_config.php
  9. Configure the PGA storage permissions:
    1. $ chmod -R 777 app/storage 

  10. Install using Composer:
    1. $ sudo composer install

User Hosted PGA with SciGaP in MAC OS

Installations

 

  1. To install MCrypt for PHP on MAC please follow the steps in http://coolestguidesontheplanet.com/install-mcrypt-php-mac-osx-10-9-mavericks-development-server/
  2. Once above is completed follow the steps given in httpin folowing links;
    1. Configuring Apache: https://
    sangatpedas
    1. coolestguidesontheplanet.com/
    20140219/installing-laravel-osx-mavericks/ for
    1. Configuring Apachehow-to-install-php-mysql-apache-on-os-x-10-6/
    2. Installing Composer 

 

Download and Configure PGA

    1. https://getcomposer.org/doc/00-intro.md#installation-linux-unix-osx

PGA Installation

  1. Navigate to directory; cd

    cd

    /Library/WebServer/Documents

  2. git

    clone https://github.com/apache/airavata-php-gateway.git

  3. cd

    After cloning is completed navigate to gateway directory: cd /Library/WebServer/Documents/airavata-php-gateway

  4. Make sure the storage folder is writablewritable sudo chmod -R 755 777 app/storage
  5. (optional) Go to [PGA_HOME]/app/config/pga_config.php and change the configuration to match your settings. More instruction on pga_config.php follow step 6 in Airavata Documentation: pga_config.php configurations
  6. Enable Apache extensions (mod_rewrite module and PHP SOAP extension)
    1.  sudo

      vim

      /etc/apache2/httpd.conf

      1. uncomment

        #LoadModule

        rewrite_module

        libexec/apache2/mod_rewrite.so

      2. uncomment

        #LoadModule

        php5_module

        libexec/apache2/libphp5.so

  7. Now issue composer install update commandsudo composer installupdate
  8. Restart the web serverserver sudo apachectl restartrestart

Link the Local PGA with Hosted Airavata

  1. Once the PGA is installed you will have to link with hosted Airavata. 
  2. Contact Airavat hosting team (probably apache Airavata team) and obtain information required in section 'Airavata Client Configurations' of pga_config.php file in directory [PGA_HOME]/app/config

Troubleshooting PGA Installation Issues  

Having an issue with installation? Maybe someone earlier faced and the answer could be in  FAQs. Please try: Airavata Documentation: FAQ

 

Comments, clarifications most welcomed. Subscribe and contact us through http://airavata.apache.org/community/mailing-lists.html