-
Notifications
You must be signed in to change notification settings - Fork 11
INSTALL
The CMDB API is written as a mod_perl app to be run in apache.
PREREQUISTES The following software is required to be installed prior to attempting to run the CMDB:
optconfig: https://github.com/proofpoint/optconfig
and any perl modules:
- Apache2::Request (libapreq2)
- Apache2::RequestRec
- Log::Log4perl
- JSON
- XML::Parser
- XML::Simple
- Date::Manip
- Apache::DBI
- DBI (and appropriate supporting DBD module. CMDB has primarily been developed and tested against mysql)
INSTALL
-
Unpack the distribution into the directory you would like. The apache config will define the API paths, so it is not recommended to put this into your web file tree.
-
Load the initial DB schema (currently tested only against mysql)
-
create a database
-
create a user and grant it select,insert,update privileges on all tables in this database
-
update the cmdb_api.conf file to reflect the user credentials that you just created
-
load the schema into your database with file
initial_schema.sql
-
update the cmdb_api.conf 'database' value with the name you used (default: cmdb)
-
update the cmdb_api.conf with the correct db host (default: localhost)
-
update the cmdb_api.conf with the correct location of the log4perl.conf file
-
Copy the apache config file
cmdb_api_httpd.conf
into place: Debian,Ubuntu,OSX:/etc/apache2/other/
, Redhat,CentOS:/etc/httpd/conf.d/
-
adjust the apache config file
cmdb_api_httpd.conf
to match your system. This may include the following:- auth config: the CMDB relies on httpd to manage the user auth for authentication
- install file paths: the default assumed file path for the cmdb api is
/var/www/cmdb_api/
- module paths: the mod_perl module and libapreq2 (Apache2::Request) apache modules should point to the correct location
-
Copy the htpasswd file into
/etc
. The location and usage of this file can be changed by adjusting thecmdb_api_httpd.conf
appropriately. -
Copy the cmdb config file (cmdb_api.conf) into
/opt/pptools/etc/
-
Edit the
init.pl
file to make sure the install path is correct -
Edit the log4perl.conf to point to the location where you would like the cmdb log file.
-
touch the logfile defined in the log4perl.conf
-
Restart apache
-
test by loading:
http://yourserver/cmdb_api/v1/?lexicon=1