Table of Contents | ||
---|---|---|
|
Installation Prerequisites
...
Table of Contents | ||
---|---|---|
|
Installation Prerequisites
- The individual performing this installation has some Linux experience.
- NMIS8 is installed on the same server where opFlow will be installed
- NMIS8 is installed in /usr/local/nmis8
- opFlow will be installed into /usr/local/opmantek
- Root access is available (not always needed but much easier)
- RRDtool 1.4.7 installed in /usr/local/rrdtool
...
When trying to add the _flowd user, you will get the following error message:
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX[_SYSTEM] configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
Code Block |
---|
adduser --force _flowd |
Debian/Ubuntu follow the LSB (Linux Standard Base) specification, init script functions be available at /lib/lsb/init-functions.
Edit /etc/init.d/flowd
Code Block |
---|
#change this line: . /etc/init.d/functions #to this: . /lib/lsb/init-functions |
The start flowd
Code Block |
---|
sysv-rc-conf flowd on service flowd start |
...
Code Block | ||
---|---|---|
| ||
cp /usr/local/opmantek/install/mongod.init.d /etc/init.d/mongod chkconfig mongod on service mongod start |
Debian/Ubuntu
Edit /etc/init.d/mongod
Code Block |
---|
#change this line: . /etc/init.d/functions #to this: . /lib/lsb/init-functions |
The start mongod
Code Block |
---|
sysv-rc-conf mongod on service mongod start |
...
You can return to the opFlow page a refresh it, you will be now asked to review the EULA (End User License Agreement) and click on the "Accept EULA" button at the bottom.
Once that is done, opFlow GUI will start.
opFlow Setup
To initialise the database, create the default application definitions and many more things, you will need to run opflow_setup.pl, this will also generate a crontab entries for adding to your Cron setup.
Make sure you stop/kill any mongod processes before your run these commands.
Code Block | ||
---|---|---|
| ||
/usr/local/opmantek/bin/opfixperms.pl
/usr/local/opmantek/bin/opflow_setup.pl setup=all |
You can ignore this message: "chmod: cannot access ‘/usr/local/opmantek/conf/credential_sets.nmis’: No such file or directory". The credentials_sets.nmis configuration file will not be present if the opConfig module has not been previously installed.
When the crontab entries are displayed, you can copy and paste these into crontab,
Code Block | ||
---|---|---|
| ||
/usr/local/opmantek/bin/opflow_setup.pl setup=cron
######################################################
# opFlow Cronfig
######################################################
# Run the DNS resolution every 15 minutes
*/15 * * * * /usr/local/opmantek/bin/opflowd.pl type=endpoints
# Purge the old Flows every 24 hours
0 0 * * * /usr/local/opmantek/bin/opflowd.pl type=purge
30 0 * * * /usr/local/opmantek/bin/opflow_purge_raw_files.sh /var/opflow 7
######################################################
# Check to rotate the logs 4:05AM every day
5 4 * * * /usr/sbin/logrotate /usr/local/opmantek/conf/oplogrotate.conf
####################################################
# opFlow Reports
# hourly - every hour 3 minutes after the hour
3 * * * * /usr/local/opmantek/bin/opFlowReports-hourly.sh
# daily - every day at 1am
0 1 * * * /usr/local/opmantek/bin/opFlowReports-daily.sh
crontab -e
Insert the above text, then save and quit. |
Configuring mongod on a remote server
If you not are running your mongo db server on the same server as opFlow mongo database authentication will need to be done manually.
Ensure mongod is not running with the --auth switch, if you are using the mongod.init.d script included in opFlow run:
Code Block /etc/init.d/mongod stop; /etc/init.d/mongod start_no_auth;
Create the user, currently the opFlow user requires access to both the admin database and it's own. Start up the mongo shell and type these commands:
Code Block use admin; db.addUser('opUserRW', 'op42flow42'); // these are the defaults, change them as well as your opFlow.nmis file use nmis; // again this is a default, it doesn't need to be changed db.addUser('opUserRW', 'op42flow42'); // these are the defaults, change them as well as your opFlow.nmis file, it should match the above user command
Restart the mongo server with authentication, --auth (again, only if you are using the mongod.init.d script included in opFlow)
Code Block /etc/init.d/mongod stop; /etc/init.d/mongod start;
Starting the opFlow Daemon
With the license now installed, we can complete the setup of opFlow.
...
theme | Emacs |
---|
...
at the bottom.
Once that is done, opFlow GUI will start.
opFlow Setup
To initialise the database, create the default application definitions and many more things, you will need to run opflow_setup.pl, this will also generate a crontab entries for adding to your Cron setup.
Make sure you stop/kill any mongod processes before your run these commands.
Code Block | ||
---|---|---|
| ||
/usr/local/opmantek/bin/opfixperms.pl
/usr/local/opmantek/bin/opflow_setup.pl setup=all |
You can ignore this message: "chmod: cannot access ‘/usr/local/opmantek/conf/credential_sets.nmis’: No such file or directory". The credentials_sets.nmis configuration file will not be present if the opConfig module has not been previously installed.
When the crontab entries are displayed, you can copy and paste these into crontab,
Code Block | ||
---|---|---|
| ||
/usr/local/opmantek/bin/opflow_setup.pl setup=cron ###################################################### # opFlow Cronfig ###################################################### # Run the DNS resolution every 15 minutes */15 * * * * /usr/local/opmantek/bin/opflowd.pl type=endpoints # Purge the old Flows every 24 hours 0 0 * * * /usr/local/opmantek/installbin/opflowd.init.d /etc/init.d/opflowd chkconfig opflowd on service opflowd start |
Debian/Ubuntu
Edit /etc/init.d/opflowd
Code Block |
---|
#change this line:
. /etc/init.d/functions
#to this:
. /lib/lsb/init-functions |
The start opflowd
Code Block |
---|
sysv-rc-conf opflowd on
service opflowd start |
Access opFlow Web Page
The default URL to access opFlow is http://nmis.domain.com/cgi-omk/opFlow.pl
Any authentication challenges will be the same as to login to your NMIS8 system.
Updating opFlow from earlier versions
If you are updating opFlow from an earlier version you will need to update the executable and configuration files with some new optional goodness. It is also highly recommended that MongoDB is upgraded to the latest supported version - please see the MongoDB Installation page for details.
To update the executable files the run commands (modified to suit your installation and version downloaded).
Code Block |
---|
cd ~
# get release and untar it
wget opFlow-release.tgz
tar -zxvf opFlow-release.tgz
# make a backup of existing installation
cp -r /usr/local/opmantek /usr/local/opmantek-DAY-MON-YEAR
# stop the existing daemon so update can happen
service opflowd stop
# update the files
cp -r ./opmantek/* /usr/local/opmantek/* |
Update the config:
Code Block |
---|
/usr/local/opmantek/bin/opupdateconfig.pl /usr/local/opmantek/install/opFlow.nmis /usr/local/opmantek/conf/opFlow.nmis
/usr/local/opmantek/bin/opupdateconfig.pl /usr/local/opmantek/install/opCommon.nmis /usr/local/opmantek/conf/opCommon.nmis |
opFlow database now uses capped sizes, please adjust the following config settings to make sure they fit on your partition and are the size you want: (the defaults are listed)
Code Block |
---|
'opflow_db_conversation_collection_size' => 16106127360, #15G
'opflow_db_flow_collection_size' => 5368709120 # 5G |
Now run the setup tool:
Code Block |
---|
/usr/local/opmantek/bin/opflow_setup.pl setup=db_config |
Inspect the output and be sure you have configured the sizes the way you want. If you are unsure of the current size running opflow_setup.pl setup=db_config will inform you.
When you are happy with your configuration, re-run the setup tool with force=1: (this may take some time to complete if your existing database is large)
Code Block |
---|
/usr/local/opmantek/bin/opflow_setup.pl setup=db_config force=1 |
...
pl type=purge
30 0 * * * /usr/local/opmantek/bin/opflow_purge_raw_files.sh /var/opflow 7
######################################################
# Check to rotate the logs 4:05AM every day
5 4 * * * /usr/sbin/logrotate /usr/local/opmantek/conf/oplogrotate.conf
####################################################
# opFlow Reports
# hourly - every hour 3 minutes after the hour
3 * * * * /usr/local/opmantek/bin/opFlowReports-hourly.sh
# daily - every day at 1am
0 1 * * * /usr/local/opmantek/bin/opFlowReports-daily.sh
crontab -e
Insert the above text, then save and quit. |
Configuring mongod on a remote server
If you not are running your mongo db server on the same server as opFlow mongo database authentication will need to be done manually.
Ensure mongod is not running with the --auth switch, if you are using the mongod.init.d script included in opFlow run:
Code Block /etc/init.d/mongod stop; /etc/init.d/mongod start_no_auth;
Create the user, currently the opFlow user requires access to both the admin database and it's own. Start up the mongo shell and type these commands:
Code Block use admin; db.addUser('opUserRW', 'op42flow42'); // these are the defaults, change them as well as your opFlow.nmis file use nmis; // again this is a default, it doesn't need to be changed db.addUser('opUserRW', 'op42flow42'); // these are the defaults, change them as well as your opFlow.nmis file, it should match the above user command
Restart the mongo server with authentication, --auth (again, only if you are using the mongod.init.d script included in opFlow)
Code Block /etc/init.d/mongod stop; /etc/init.d/mongod start;
Starting the opFlow Daemon
With the license now installed, we can complete the setup of opFlow.
Code Block | ||
---|---|---|
| ||
cp /usr/local/opmantek/bin/opflow_setup.pl setup=all install/opflowd.init.d /etc/init.d/opflowd chkconfig opflowd on service opflowd start |
Debian/Ubuntu
Verify/Edit /etc/init.d/flowd, Edit /etc/init.d/mongod and /etc/init.d/opflowd
Code Block |
---|
#change this line: . /etc/init.d/functions #to this: . /lib/lsb/init-functionsfunctions #to this: . /lib/lsb/init-functions |
The start opflowd
Code Block |
---|
sysv-rc-conf opflowd on
service opflowd start |
Access opFlow Web Page
The default URL to access opFlow is http://nmis.domain.com/cgi-omk/opFlow.pl
Any authentication challenges will be the same as to login to your NMIS8 system.