There are two installation options available. If you are experienced *nix user, you can deploy all of the services manually on your server using deployment instructions below. Or you can download our [almost] ready-to-use FlapMyPort Server Image for and run it on virtual machine.
- Additional packages
- Installing FlapMyPort WEB
- Installing and configuring snmpflapd
- Installing FlapMyPort API
Manual Installation Instructions
This example is for CentOS Linux.
You can find a lot of great tutorials on Internet about how to install Apache + MySQL + PHP on the Linux host. We are not going to repeat themselves here so please investigate and do it on your own. For further steps we suppose that you have installed LAMP (of LEMP) stack on your server with «/var/www/html» as a document root.
Try to not use private IP addresses for hosting API because it will make the API inaccessible from everywhere behind your network. You can protect your web directory with HTTP Basic auth. Our clients can deal with HTTP Basic authentication.
yum -y install php-gd yum -y install net-snmp net-snmp-utils yum -y install epel-release yum -y install -y python-pip pip install sqlalchemy pip install pymysql
Shall you have MySQL installed and running you are going to create Database structure and database user.
Enter MySQL CLI
Create database in Mysql CLI:
create database traps;
Create a database user (change login and password if neccesary)
CREATE USER 'flap'@'localhost' IDENTIFIED BY 'flapmyport'; GRANT ALL PRIVILEGES ON traps.* TO 'flap'@'localhost'; FLUSH PRIVILEGES;
This is an optional step but we recommend you to install FlapMyPort WEB on the server.
1. Go to you web document root
$ cd /var/www/html/
2. Download FlapMyPort WEB archive
$ wget http://flapmyport.com/files/FlapMyPortWEB.zip
3. Unpack the archive
$ unzip FlapMyPortWEB.zip
GOOS=linux GOARCH=amd64 go build -o handler
3. Create a database
$ mysql -u root mysql> create database handler; $ mysql -u root handler < schema.sql
4. Edit the configuration file. Example:
listenAddress = "0.0.0.0" listenPort = 162 dbHost = "localhost" dbName = "handler" dbUser = "root" dbPassword = "" community = "public" logFilename = "/var/log/handler.log" sendMail = false mailList = ["email@example.com", "firstname.lastname@example.org"]
5. [Somehow] ensure that snmptrapd will start automatically at next boot
1. Create the folder for API
$ mkdir /var/www/html/api
2. Go to the folder
$ cd /var/www/html/api
3. Download FlapMyPort API archive
$ wget http://flapmyport.com/files/FlapMyPortAPI.zip
4. Unpack the archive
$ unzip FlapMyPortAPI.zip
5. Change default database username and password as well as Timezone in your configuration file
$ vi config.php
List of supporting timezones you can find here.
The FlapMyPort Server image is currently preparing for release.