APMonitor Server for Linux
Main.APMonitorServerLinux History
Show minor edits - Show changes to markup
- Install PHP7
- Edit PHP5 ini file
sudo gedit /etc/php5/apache2/php.ini
- Install PHP5 or PHP7 with Apache Module
- Install PHP5
sudo apt-get install php5 libapache2-mod-php5
- Install PHP7 with Apache Module
sudo apt-get install libapache2-mod-php
sudo apt-get install php7 libapache2-mod-php7.0
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)
sudo cp -n apm_linux/lib/* /usr/lib/
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
- Obtain APMonitor server files
git https://github.com/APMonitor/apm_server
- Obtain APMonitor server files
git clone https://github.com/APMonitor/apm_server.git
cd apm_server
- Download APMonitor server files (tar.gz)
sudo wget https://apmonitor.com/download/apmonitor_install.tar.gz
- Extract files
sudo tar -xvf apmonitor_install.tar.gz
- Clean up
sudo rm apmonitor_install.tar.gz
- Obtain APMonitor server files
git https://github.com/APMonitor/apm_server
sudo cp -n /var/www/html/bin/apmonitor /usr/bin/apmonitor
sudo cp -n apm_linux/bin/apmonitor /usr/bin/apmonitor
sudo cp -n /var/www/html/lib/* /usr/lib/
sudo cp -n apm_linux/lib/* /usr/lib/
- 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/*
- Increase max execution time (requires sudo editing permission)
- max_execution_time = 100000000
- Restart Apache
- Increase max execution time (requires sudo editing permission of php.ini)
max_execution_time = 100000000
- Save php.ini file and restart Apache server
- cd /var/www/html
cd /var/www/html
- sudo wget https://apmonitor.com/download/apmonitor_install.tar.gz
sudo wget https://apmonitor.com/download/apmonitor_install.tar.gz
- sudo tar -xvf apmonitor_install.tar.gz
sudo tar -xvf apmonitor_install.tar.gz
- sudo rm apmonitor_install.tar.gz
sudo rm apmonitor_install.tar.gz
- sudo chmod -R www-data:www-data /var/www/html/*
sudo chmod -R www-data:www-data /var/www/html/*
- sudo chmod -R apache:apache /var/www/html/*
sudo chmod -R apache:apache /var/www/html/*
- 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/
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/
- https://127.0.0.1/ip.php (Retrieve IP address, verifies that PHP is working)
- https://127.0.0.1 (Local host homepage)
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
- export PATH="/var/www/html/bin:$PATH"
- export LD_LIBRARY_PATH="/var/www/html/lib:$LD_LIBRARY_PATH"
- source .bashrc (or restart bash shell)
export PATH="/var/www/html/bin:$PATH" export LD_LIBRARY_PATH="/var/www/html/lib:$LD_LIBRARY_PATH" source .bashrc (or restart bash shell)
- sudo apt-get update
- sudo apt-get install apache2
sudo apt-get update sudo apt-get install apache2
- sudo yum update
- sudo yum install apache2
sudo yum update sudo yum install apache2
- Install PHP5 or PHP7 with Apache Module
- Install PHP5 or PHP7 with Apache Module
- Install PHP5
sudo apt-get install php5 libapache2-mod-php5
sudo apt-get install php5 libapache2-mod-php5
- Install PHP7
- Edit /etc/php5/apache2/php.ini (PHP5) or /etc/php/7.0/apache2/php.ini (PHP7) to increase max execution time (requires sudo editing permission)
- Edit PHP5 ini file
sudo gedit /etc/php5/apache2/php.ini
- Edit PHP7 ini file
sudo gedit /etc/php/7.0/apache2/php.ini
- Increase max execution time (requires sudo editing permission)
- sudo apachectl restart
sudo apachectl restart
- Install PHP with Apache Module
- sudo apt-get install php5 libapache2-mod-php5
- Edit /etc/php5/apache2/php.ini to increase max execution time (requires sudo editing permission)
- Install PHP5 or PHP7 with Apache Module
- Install PHP7
- Install PHP7
sudo apt-get install libapache2-mod-php
- Edit /etc/php5/apache2/php.ini (PHP5) or /etc/php/7.0/apache2/php.ini (PHP7) to increase max execution time (requires sudo editing permission)
- Edit /etc/php/7.0/apache2/php.ini to increase max execution time (requires sudo editing permission)
- Edit /etc/php5/apache2/php.ini to increase max execution time (requires sudo editing permission)
- sudo apt-get install php libapache2-mod-php
- sudo apt-get install php5 libapache2-mod-php5
- Put the binary and libraries in the PATH and LD_LIBRARY_PATH
- cp -n /var/www/html/bin/apmonitor /usr/bin/apmonitor
- cp -n /var/www/html/lib/* /usr/lib/
- 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/
- cp -n /var/www/html/lib/* /usr/lib/*
- cp -n /var/www/html/lib/* /usr/lib/
- Copy /var/www/html/bin/apmonitor to /usr/bin/apmonitor
- Copy /var/www/html/lib/* to /usr/lib/*
- Put the binary and libraries in the PATH and LD_LIBRARY_PATH
- cp -n /var/www/html/bin/apmonitor /usr/bin/apmonitor
- cp -n /var/www/html/lib/* /usr/lib/*
- Copy /var/www/html/bin/apmonitor to /usr/bin
- Copy /var/www/html/lib/* to /usr/lib
- Copy /var/www/html/bin/apmonitor to /usr/bin/apmonitor
- Copy /var/www/html/lib/* to /usr/lib/*
- Copy /var/www/html/bin/apmonitor to /usr/local/bin
- Copy /var/www/html/lib/* to /usr/local/lib
- Copy /var/www/html/bin/apmonitor to /usr/bin
- Copy /var/www/html/lib/* to /usr/lib
- Add directory to path in /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)
- 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/*
- Copy /var/www/html/bin/apmonitor to /usr/local/bin
- Copy /var/www/html/lib/* to /usr/local/lib
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)
- export LD_LIBRARY_PATH="/var/www/html/lib:$LD_LIBRARY_PATH"
- tar -xvf apmonitor_install.tar.gz
- sudo tar -xvf apmonitor_install.tar.gz
- rm apmonitor_install.tar.gz
- Add directory to path in /home/{user}/.bashrc
- sudo rm apmonitor_install.tar.gz
- Add directory to path in /home/{user}/.bashrc (edit file)
- Add directory to path in /home/{user}/.bashrc
- export PATH="/var/www/html/bin:$PATH"
- source .bashrc (or restart bash shell)
- Download APMonitor server files (tar.gz) and extract archive
- curl https://apmonitor.com/download/apmonitor_install.tar.gz | tar xvz
- Download APMonitor server files (tar.gz)
- sudo wget https://apmonitor.com/download/apmonitor_install.tar.gz
- Extract files
- tar -xvf apmonitor_install.tar.gz
- Clean up
- rm apmonitor_install.tar.gz
- curl https://apmonitor.com/download/apm_install.tar.gz | tar xvz
- curl https://apmonitor.com/download/apmonitor_install.tar.gz | tar xvz
- curl https://apmonitor.com/download/apmonitor_install.tar.gz | tar xvz
- curl https://apmonitor.com/download/apm_install.tar.gz | tar xvz
- APMonitor Download for Linux (apmonitor_install.tar.gz)
- Extract file contents from apmonitor_install.tar.gz
- gunzip apmonitor_install.tar.gz
- tar -xf apmonitor_install.tar
- Copy all files to web server folder to /var/www/html/online/
- Test installation with:
- Download APMonitor server files (tar.gz) and extract archive
- curl https://apmonitor.com/download/apmonitor_install.tar.gz | tar xvz
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.
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.
- Change directory to web root folder
- cd /var/www/html
sudo apt-get update sudo apt-get install apache2
- sudo apt-get update
- sudo apt-get install apache2
sudo yum update sudo yum install apache2
- sudo yum update
- sudo yum install apache2
sudo apt-get install php libapache2-mod-php
- sudo apt-get install php libapache2-mod-php
max_execution_time = 100000000
- max_execution_time = 100000000
sudo apachectl restart
- sudo apachectl restart
- Unzip file contents from apmonitor_install.zip
- Extract file contents from apmonitor_install.tar.gz
- gunzip apmonitor_install.tar.gz
- tar -xf apmonitor_install.tar
(:title APMonitor Server for Linux:) (:keywords nonlinear, Python, MATLAB, model, predictive control, APMonitor, differential, algebraic, modeling language:) (:description APMonitor Linux Server: A comprehensive modeling and nonlinear optimization solution with Python, MATLAB, or Julia scripting languages.:)
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
- APMonitor Download for Linux (apmonitor_install.tar.gz)


- Unzip file contents from apmonitor_install.zip
- Copy all files to web server folder to /var/www/html/online/
- Test installation with:
- https://127.0.0.1/ip.php (Retrieve IP address, verifies that PHP is working)
- https://127.0.0.1 (Local host homepage)
- Run scripts in test_* to test MATLAB, Python, or Julia with the APMonitor Optimization Suite