The compile procedure is pretty straight forward. Simply edit the Makefile located in the root
dist path (ie /usr/src/MIDAS2/Makefile in our example). You will most likely need to edit the
MySQL Lib path and change the HTDOC_ROOT value to match where you wish the MIDAS web interface
to be installed. Read the comments if unsure.
After doing the above you can either just do a 'make' or a make on a specific application
(ie. 'make MIDASc' or 'make MIDASd' etc.). All should compile straight out of the box.
Installing the Applications
Simply do a 'make install' in the MIDAS source directory. It will then create the installation directory tree under
/usr/local/MIDAS. It will then copy the executables under /usr/local/MIDAS/bin and copy
the distribution config files into the /usr/local/MIDAS/etc directory.
WebView Installation
We will assume that the apache IP address is 192.168.1.80 on default port 80, and that you installed the WebView
interface in the directory MIDAS off of your htdocs directory. You will need to change this to reflect your own setup.
To access the installation web interface use the URL : http://192.168.1.80/MIDAS/install/install.php. (See Figure 2.1)
Figure 2.1 - WebView Installer Screen
Site Configuration Sanity Checks:
Site Config Exists - Verifies that there is not already a config.php file located in $MIDAS_WEBVIEW_DIR$/inc/config.
If there is, it will verify that file is writable.
WARNING: config.php exists, but is writable
ERROR: config.php is not writeable, or the directory does not exist.
Site Config Template Exists - Verifies that the config.template file exists in $MIDAS_WEBVIEW_DIR$/inc/config.
ERROR: config.template does not exist
/inc/config directory is Writable - Verifies that the $MIDAS_WEBVIEW_DIR$/inc/config directory can be written to.
ERROR: directory does not exist or is not writable
/php-graph directory is Writable - Verifies that the $MIDAS_WEBVIEW_DIR$/php-graph directory is writable.
ERROR: directory does not exist or is not writable
NOTE: If any of the sanity checks come back as an ERROR, you will have to fix the problem before continuing.
Site Configuration:
Absolute directory - The absolute directory to the WebView interface files. (In our example, this would be /MIDAS
URL Directory - The document root of your WebView interface (In our example, this would be /MIDAS)
PHP Graphics URL - Relative location to the php-graph directory. (Already set)
mySQL Server - Hostname/IP address of your mySQL server to use for WebView.
mySQL user - User to use for the initial setup.
mySQL passwd - Initial User's password.
MIDAS dB SQL file - Location of the MIDAS sql file (This file is normally found in the sql/ directory off of the MIDAS source directory).
SNORT Default Rules SQL file - Location of the Default SNORT sql file (This file is normally found in the sql/ directory off of the MIDAS source directory).
Create inc/config/config.php - Creates the site config file for WebView (Includes path information, sql user & password, etc).
Create MIDAS dB user - Creates the user WebView will use in accessing the MySQL Server
Install MIDAS SQL - Process the MIDAS dB SQL file on the mySQL Server listed above (Warning: If you currently have data in your MIDAS database, please back it up before continuing).
Install SNORT Default Rules SQL file - Sames as above, except this option uses the SNORT Default Rules listed above.
NOTE:Please be advised that all of the data in this form will be sent to the webserver in cleartext (This includes any/all passwords).
Once you have filled in the form, click on 'INSTALL' and watch for FAILED Items (See Figures 2.2).
Figure 2.2 - Install Completed Successfully
Once this is complete you should be able to access the MIDAS web interface by using the URL on the Install Completed screen or by going to:
http://192.168.1.80/MIDAS.
Accessing and Configuring the WebView interface can be found here.
If you currently have a MySQL user you are using for the old interface, please make sure you do not have the installer try and create
the user.
Depending on your version you are upgrading to, you will need to run the installer on each MySQL dB file to upgrade it to the new v2.1
Example: If your current version is v2.0f, you will need to run the installer using /path/to/MIDAS/source/sql/v2.0f-to-v2.0g.sql
and /path/to/MIDAS/source/sql/v2.0i-to-v2.1a.sql (During the SQL upgrade, make sure you are only running the Install MySQL SQL option).
Once the v2.0i-to-v2.1a.sql runs, there will be a few things that happen to your current install:
All MIDAS users will have their passwords changed to 'password', and will be set as 'Super Users', so make sure you changes these after the
upgrade has finished.
There should be no reason to have the install run the Install Default SNORT Rules file.