Skip to content
Jeremy Booker edited this page Oct 14, 2017 · 8 revisions

How to Install Internship Inventory

From scratch, here's the steps to install Internship Inventory. This guide assumes you know the basics of Linux system administration and the basics of how to install and configure the PostgresQL database server.

System Requirements

Web Server with PHP

You'll need a web server running Apache (version 2.0+) and PHP (7.0.10+). We recommend using Red Hat Enterprise Linux 7, but Fedora/CentOS will work too. We develop, test, and run our production systems in a Linux environment, so we strongly recommend you do as well. We will take contributions/patches for Windows, but we don't officially support Windows (nor do we test hosting on Windows). (Just use Linux, it will be easier.)

You'll need to be sure the following packages are installed:

  • httpd
  • php
  • postgresql-server
  • postgresql-contrib
  • php-pgsql
  • php-xml
  • php-mbstring

phpWebsite

First, install phpWebsite. Internship Inventory is a module (one of many others) for the phpWebsite Content Management System.

$ git clone https://github.com/AppStateESS/phpwebsite.git phpwebsite

Create an empty database in Postgres, and a corresponding user account. Then, in your web browser, visit phpWebsite's index.html to start the installation process. Follow its steps to add the database settings (must be a Postgresql database, not MySQL) and create an administrative phpWebsite user.

Themes

Download any custom themes for phpWebsite that you may need and place them in the phpwebsite/themes/ directory. Set this theme as the active theme from the Layout module's themes tab inside phpWebsite's Control Panel.

Internship Inventory

Clone Internship Inventory into phpWebsite's module directory.

$ cd phpwebsite/mod/
$ git clone https://github.com/AppStateESS/InternshipInventory.git intern

Extra Dependencies

There are several external dependencies that need to be installed. Change to the Internship Inventory module's directory to install them.

$ cd intern

Download Composer and use it to install dependencies:

$ php composer.phar install

Build the Javascript

If you're using a clone directly from GitHub (i.e. a development environment), you'll need to use Webpack to compile/minify/bundle the javascript files. For production, we recommend using a .tar.gz bundle that's built by a Continuous Integration pipeline (such as Travis-ci), which comes with pre-built javascript bundles.

Make sure you have NodeJS installed, and use NPM to install javascript dependencies:

$ npm install

Run the Javascript build script:

$ npm run build

Extra Postgresql Setup

The fuzzy searching features require the fuzzystrmatch module for postgresql.

$ sudo yum install postgresql-contrib
$ sudo systemctl restart postgresql

Then, on the Postges console:

intern=# create extension fuzzystrmatch;

Install the Internship Inventory Module into phpWebsite

Finally, in your web browser, go to the phpWebsite control panel. Then access the Boost module and on the 'Other Modules' tab, click the install link next to Internship Inventory to install the module into phpWebsite.

Then copy the Internship Inventory's sample configuration file into phpWebsite's inc directory. If it doesn't exist, create the inc directory in phpWebsite's base directory:

$ mkdir inc

Copy the configuration file:

$ cp mod/intern/inc/intern_defines.php ./inc/