Project

General

Profile

Install from Binaries

Download binaries

Packages can be found in the opennac repo at http://repo.opennac.org/yum/x86_64/

Packages installation is managed using the package manager "yum" (see below) so you don't need to download them yourself.

REPOs

Setup OPENNAC Repo
/etc/yum.repos.d/opennac.repo

[OPENNAC]
name=Opennac repo
baseurl=http://repo.opennac.org/yum/x86_64/
enabled=1
gpgcheck=0

Setup EPEL Repo

rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm

Enable CentOS repos

# Enable CentOS repos [base] [updates] [extras] [centosplus] [contrib] ...
sed -i "s/enabled=0/enabled=1/" /etc/yum.repos.d/CentOS-Base.repo

Prerequisites

  1. A CentOS6/RHEL6 system. Internet access working. Root login.
  2. SELINUX disabled in /etc/sysconfig/selinux.
    SELINUX=disabled
    
  3. Ensure acces to port tcp/80 is allowed. This line should be present in /etc/sysconfig/iptables
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT 
    
  4. Scripts getparams.sh and auto_setup_opennac.sh copied to /usr/share/opennac directory.
  5. Some system packages installed:
    # yum -y install httpd wget sudo ntpd cronie
    

Install Opennac Packages

# install opennac rpms and dependences.
yum -y --enablerepo=epel install opennac-userportal opennac-dhcpreader opennac-utils opennac-api opennac-admonportal

Run getparams.sh

Run /usr/share/opennac/getparams.sh to set your system parameters. They will be saved on three files:

  1. /usr/share/opennac/.basic.data
  2. /usr/share/opennac/.globals.data
  3. /usr/share/opennac/.authrepositories.data
The script will ask you first to use default values. If answer is "yes" writes the data files and exits.
Otherwise will ask for:
  1. DB_NAME (opennac)
  2. DB_HOST_IP (localhost)
  3. DB_PORT (3306)
  4. MYSQL_ROOT_PASS (opennac)
  5. MYSQL_ADMIN_USER (admin)
  6. MYSQL_ADMIN_PASS (opennac)
  7. MONITOR_USER (nagios)
  8. MONITOR_PASS (Simpl3PaSs) - (To be changed to "testing123")
  9. RADIUS_PASS (testing123)
Then will ask either to enable to LDAP or not. If LDAP operation is selected:
  1. LDAP server IP (localhost)
  2. LDAP server port (389)
  3. LDAP login username (cn=Manager,dc=example,dc=com)
  4. LDAP login password (secret)
  5. LDAP base DN (dc=example,dc=com)
  6. USE_LDAP_SAMPLE_DATA (y) Either to use packaged opennac sample schema and config or preserve OpenLDAP distribution files

Run auto_setup_opennac.sh

Run the /usr/share/opennac/auto_setup_opennac.sh script with data files as parameters

# /usr/share/opennac/auto_setup_opennac.sh /usr/share/opennac/.basic.data /usr/share/opennac/.globals.data /usr/share/opennac/.authrepositories.data

This script will setup MySQL and some opennac global data based on your previous answers

Check configuration files

Some configuration files could have to be modified. To assist this modifications, there are some sample files installed to merge with the original ones, in case it's necessary. Only the files with some differences will be generated.

These files are shown in the following list:
  • DNS:
    /etc/named.conf.rpmnew
    /etc/named.rfc1912.zones.rpmnew
    /etc/named/db.localhost.conf.rpmnew
    
  • DHCP:
    /etc/dhcp/dhcpd.conf.rpmnew
    
  • Rsyslog:
    /etc/rsyslog.d/dhcpd.conf.rpmnew
    /etc/rsyslog.d/opennac.conf.rpmnew
    
  • SNMPTrap:
    /etc/snmp/snmptrapd.conf.rpmnew
    
  • FreeRADIUS:
    /etc/raddb/clients.conf.sample
    /etc/raddb/eap.conf.sample
    /etc/raddb/policy.conf.sample
    /etc/raddb/radiusd.conf.sample
    /etc/raddb/sql.conf.sample
    /etc/raddb/modules.sample/ldap
    /etc/raddb/modules.sample/mschap
    /etc/raddb/modules.sample/python
    /etc/raddb/sites-available/default.sample
    /etc/raddb/sites-available/inner-tunnel.sample
    /etc/raddb/sites-available/soh.sample
    

Set services on boot. Start services

Set services to start on boot and restart them (please ignore errors on stopping stopped services). Note that slapd is for LDAP operation so you may want to skip this service. Is OK if dhcpd doesn't start until wizard run is done

chkconfig rsyslog on
chkconfig ntpd on 
chkconfig mysqld on
chkconfig memcached on
chkconfig gearmand on
chkconfig opennac on
chkconfig httpd on
chkconfig named on
chkconfig dhcpd on
chkconfig radiusd on
chkconfig slapd on
service rsyslog restart
service ntpd restart
service mysqld restart
service memcached restart
service gearmand restart
service opennac restart
service httpd restart
service named restart
service dhcpd restart
service radiusd restart
service slapd restart

Load some LDAP sample entries:

ldapadd -f /tmp/base.ldif -x -D "cn=Manager,dc=example,dc=com" -w secret
rm /tmp/base.ldif

Configure network interfaces

Run /usr/share/opennac/utils/vm-iface-config/opennac-iface, in order to configure the network interfaces with desired VLAN and IP information, or do it by yourself.

/usr/share/opennac/utils/vm-iface-config/opennac-iface

Answer wizard questons and reboot

Log on http://your-server/admin and answer to the wizard forms.
Reboot your server.