Main

APMonitor Server for Linux

The APMonitor server is installed in three steps including (1) Apache web server installation, (2) PHP installation, and (3) APMonitor server files. Below are installation instructions for Linux. Windows web server instructions are also available.

Step 1: Apache Web Server

  • Update and Install Apache on Ubuntu, Debian Linux
    • sudo apt-get update
    • sudo apt-get install apache2
  • Update and Install Apache on Redhat, CentOS Linux
    • sudo yum update
    • sudo yum install apache2

Step 2: PHP Installation and Configuration

  • Install PHP with Apache Module
    • sudo apt-get install php libapache2-mod-php
  • Edit /etc/php/7.0/apache2/php.ini to increase max execution time (requires sudo editing permission)
    • max_execution_time = 100000000
  • Restart Apache
    • sudo apachectl restart

Step 3: APMonitor Installation

The APMonitor server is designed for large-scale optimization and accesses solvers of constrained, unconstrained, continuous, and discrete problems. Problems in linear programming, quadratic programming, integer programming, nonlinear optimization, systems of dynamic nonlinear equations, and multi-objective optimization can be solved. The platform can find optimal solutions, perform trade-off analyses, balance multiple design alternatives, and incorporate optimization methods into external modeling and analysis software. It is freely available for academic and commercial use. It is the same service available on the public servers but does not require an Internet connection.
  • Change directory to web root folder
    • cd /var/www/html
  • Download APMonitor server files (tar.gz)
  • Extract files
    • sudo tar -xvf apmonitor_install.tar.gz
  • Clean up
    • sudo rm apmonitor_install.tar.gz
  • Change directory permission for Ubuntu, Debian
    • sudo chmod -R www-data:www-data /var/www/html/*
  • Change directory permission for Redhat, CentOS
    • sudo chmod -R apache:apache /var/www/html/*
  • Put the binary in the path and libraries in the library path
    • sudo cp -n /var/www/html/bin/apmonitor /usr/bin/apmonitor
    • sudo chmod 4775 /usr/bin/apmonitor
    • sudo cp -n /var/www/html/lib/* /usr/lib/

The next step is to verify installation. Navigate to a web-browser and visit the following addresses. The address 'http://127.0.0.1' or 'http://localhost' should work.

A number of test applications are also included in Python, MATLAB, and Julia. Point to the localhost server versus the public server for the server name.

  • Run scripts in test_* to test MATLAB, Python, or Julia with the APMonitor Optimization Suite

To run the apmonitor executable from a command line, add the following:

  • Add to /home/{user}/.bashrc (edit file)
    • export PATH="/var/www/html/bin:$PATH"
    • export LD_LIBRARY_PATH="/var/www/html/lib:$LD_LIBRARY_PATH"
  • source .bashrc (or restart bash shell)