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 PHP7 with Apache Module
sudo apt-get install php7 libapache2-mod-php7.0
- Edit PHP7 ini file
sudo gedit /etc/php/7.0/apache2/php.ini
- Increase max execution time (requires sudo editing permission of php.ini)
max_execution_time = 100000000
- Save php.ini file and restart Apache server
sudo apachectl restart
Step 3: APMonitor Installation
- Change directory to web root folder
cd /var/www/html
- 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/*
- Change web root directory to be owned by Apache group:user as www-data:www-data
sudo chown -R www-data:www-data /var/www/html/*
- Obtain APMonitor server files
git clone https://github.com/APMonitor/apm_server.git
- Put the binary in the path and libraries in the library path
cd apm_server sudo cp -n apm_linux/bin/apmonitor /usr/bin/apmonitor sudo chmod 4775 /usr/bin/apmonitor
If shared libraries are part of the install (needed only for APMonitor binaries that include IPOPT), copy the apm folder to /usr/lib/ and make the library folder discoverable with ldconfig.
sudo mv apm_linux/lib/apm /usr/lib/ sudo echo "/usr/lib/apm" > /etc/ld.so.conf.d/apmonitor.conf sudo ldconfig
The next step is to verify installation. Navigate to a web-browser and visit the following addresses. The address 'https://127.0.0.1' or 'https://localhost' should work.
The home page for the web server is now accessible at the following address:
https://127.0.0.1
Open a web browser and type the following address to verify that PHP is working:
https://127.0.0.1/ip.php
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