Skip to content

apiGrove gui installation guide

efultz edited this page Dec 3, 2012 · 11 revisions

API Grove Front End Installation Guide

Contents

Automatic Installation

If you are installing the front-end application on a dedicated server that meets the prerequisites, the packaged front-end installer (found here) is suggested. A manual install has to be done for all other systems.

Prerequisites

  • RHEL 5.8 x86_64. This installer package will not work on other operating systems.

Instructions

  1. Create a directory to install from
mkdir -p /su/apigrove-installer-front-end-module
cd apigrove-installer-front-end-module
  1. Download the installer from github
  2. Unpack the Api Grove Front End installer with:
tar xzf apigrove-front-end-[VERSION]-installer.tar.gz
  1. Change directory to the the scripts directory:
cd scripts
  1. Back up your yum repository settings in "/etc/yum.repos.d". These repos will also be backed up to "repobkp" in the scripts directory.
tar cf /etc/yum.repos.d_backup.tar -C /etc yum.repos.d
  1. Run the installer with /bin/bash:
/bin/bash install.sh
  1. The install script will create and install a local and very limited yum repository. Restore your yum repos by copying files back into yum.repos.d
cp repobkp/* /etc/yum.repos.d
  • Zend will now be installed in /usr/local/share/php.
  • The front-end webapp will be installed in /var/www/front-end.
  • The application will be hosted on port 24100.
  • All pages except for the login form will be protected. You must be logged in to view any page. The default user/pass is admin / adminadmin

Manual Installation

Prerequisites

  • RHEL 5.8

Instructions

The front-end project directory is a functional Zend application. To run this Zend application, you will need to install Zend Framework and serve "front-end/public" with an http server that supports PHP

If you have neither Zend Framework installed nor a http server installed, check out Zend Server which conveniently packages both.

To install the http server on Red Hat or CentOS run the following:

yum -y install httpd php53 php53-mbstring libmcrypt php53-mcrypt php53-pdo

Installing Zend Framework

Download the Zend Framework and install it in a direction of your choosing.

Configure PHP

After install find your directory named "Zend" (typically under the library dir of download) and is filled with *.php files.

This directory must be copied to a static location on your machine. The absolute path to this static location must be added to php's "include_path" property. Set this property in your php.ini file, typically located in /etc.

Assuming your downloaded the Zend Framework to /opt the relevant line looks like

include_path = ".:/php/includes:/opt/ZendFramework-1.12.0/library"

You must also set the appropriate permissions for the Zend Framework files. Below {ZF_HOME} refers to the location where you installed Zend Framework's 'Zend' directory (from my example above substitue/opt/ZendFramework-1.12.0/library for {ZF_HOME} )

find {ZF_HOME} -type f -print0 | xargs -0 chmod -R 644
find {ZF_HOME} -type d -print0 | xargs -0 chmod -R 755

Serving "front-end/public" with an http server

You must have an http server that supports interpreting php files and serving static files. nginx and apache's httpd are both known to do this. This section covers apache's httpd.

To interpret php files, httpd must have at least one module of these modules enabled: mod_cgi, mod_fastcgi, or mod_php (libphp5). Each of these modules is configured differently.

A VirtualHost setting is an easy way to tell httpd what files to serve. Add a new virtual host to your apache config:

<VirtualHost *:80>
    ServerName somehostname
    DocumentRoot /<some>/<path>/<to>/front-end/public

    SetEnv APPLICATION_ENV "development"

    <Directory /<some>/<path>/<to>/front-end/public>
        DirectoryIndex index.php
        AllowOverride All
        Order allow,deny
        Allow from all
    </Directory>
</VirtualHost>

You will also need to make sure that php short tags are enabled. In your php.ini file find the "short_open_tag" setting and make sure that it is set to "On".

short_open_tag = On

Next, you will need to set the appropriate permissions on the files. Make sure to edit these commands to point to where you have installed the front-end web app before using.

find /<some>/<path>/front-end -type f -print0 | xargs -0 chmod -R 644
find /<some>/<path>/front-end -type d -print0 | xargs -0 chmod -R 755
find /<some>/<path>/front-end/application/data -type f -print0 | xargs -0 chmod -R 666
find /<some>/<path>/front-end/application/configs/manager.ini -type f -print0 | xargs -0 chmod -R 666

Application Details

Authentication

All pages except for the login form will be protected. You must be logged in to view any page. The default user/pass is admin / adminadmin