Child pages
  • Manual Installation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Installation directory

NOC installed in /opt/noc/ directory by default.

Required packages

Python

Ensure Python 2.5 or later installed. Check your installed python version by:

# python --version

Python 2.7 is recommended

NOC is not compatible with Python 3

Common installation troubles are caused by several different versions of python installed in the system. If your system have several versions of Python installed ensure you calling right version when installing required packages, NOC and performing NOC maintenance. Please note, noc and root users and daemon environment may have different $PATH. Ensure you are calling proper Python version each case.

PostgreSQL

PostgreSQL 8.2 or later required. Please install PostgreSQL according to your operation system requirements. PostgreSQL 9.0 is recommended.

Common installation troubles are caused by two versions of PostgreSQL installed in the system.
If your system have several versions of PostgreSQL installed ensure you calling and linking with right version when installing required packages, NOC and performing NOC maintenance. Please note, noc and root users and daemon environment may have different $PATH and $INCLUDE. Ensure you are calling proper PostgreSQL version each case.

MongoDB

MongoDB 1.8 or later required. Please install MongoDB according to your operation system requirements. MongoDB 2.0 is recommended

MongoDB uses mmap() method to access database. Ensure you have 64-bit OS in order to use databases larger than 2Gb

setuptools

Setuptools is an extension to python distutils which allows seamless installation for the rest of packages.

Install setuptools according your operation system requirements or from source:

# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c9.tar.gz#md5=3864c01d9c719c8924c455714492295e
# gzip -dc < setuptools-0.6c9.tar.gz | tar xf -
# cd setuptools-0.6c9
# python setup.py install

psycopg2

--------
Psycopg2 is a PostgreSQL interface for Python. Version 2.0.5 or later required.

Install psycopg according your operation system requirements or from source:

# easy_install psycopg2

pymongo

pymongo is a MongoDB interface for Python

Install psycopg according your operation system requirements or from source:

# easy_install pymongo

pycrypto

pycrypto is the Python Cryptography Toolkit. Version 2.3 or later required.

Install pycrypto according your operation system requirements or from source:

# easy_install pycrypto

HTTP Server

Though the NOC is bundled with built-in HTTP Server, additional front-end HTTP-server with reverse proxy is strongly recommended. Commonly used choices are:

Install HTTP server according your system's requirements. Refer to webserver setup part for configuration details

libsmi

libsmi is a library and collection of tools to access SMI/SNMP MIB Information. Please install libsmi according to your operation system's requirements.

Mercurial

Mercurial is the Distributed Version Control System (DVCS). Required to fetch updates from repository. Mercurial also is a default format of Configuration Management repository. Mercurial 1.3 or later required. Please install mercurial according to your operation system's requirements.

fping

fping is a tool to perform parralel ICMP host checking. fping is used by Fault Management module to check Managed Objects availability. Install fping according to your operation system's requirements.

Optional Packages

python-cjson

python-cjson is pure-C implementation of JSON serializer/deserializer

Install according your operation system's requirements or from source:

# easy_install python-cjson

gmpy

gmpy is an general multiprecision python library, used together with pycrypto. Version 1.4 or later requred.

Install according your operation system's requirements or from source:

# easy_install gmpy

netifaces

netifaces  is a Python module to get interfaces' IP addresses. netifaces allows to write interface names instead of IP addresses in configs

Install:

# easy_install netifaces

Getting NOC

NOC sources can be obtained via source archive download or from mercurial repository.
Preferred way is to perform checkout from mercurial repo.

Checkout from mercurial repo

Checkout from mercurial repo is a best way to stay on bleeding edge of fresh updates. You need mercurial to perform checkout and further update.

To fetch latest updates available:

# hg clone http://hg.nocproject.org/noc noc

To fetch particular release (0.4 in example):

# hg clone -r 0.4 http://hg.nocproject.org/noc noc

Source Archive

Download latest source archive from http://redmine.nocproject.org/projects/noc/files and extract it:

 # gzip -dc noc-<version>.tgz | tar xf -

System Users and Groups

All noc files except /opt/noc/local directory must be owned by root.

All noc daemons are running from noc user. Create noc user and group before continuing installation::

For Linux
# groupadd noc
# useradd -g noc -s /bin/sh -d /home/noc noc
For FreeBSD
# pw groupadd -n noc
# pw useradd -g noc -s /bin/sh -d /home/noc -n noc

 

Installing NOC

Go to unpacked NOC source distribution as ``root`` user and install NOC:

# cd noc-<version>
# python setup.py install

NOC will be installed into /opt/noc/ directory. Finish your installation by:

# cd /opt/noc
# ./scripts/post-install

post-install script will create required additional directories, set up permissions, create configuration files and set up paths.

Available options to post-install:
-h - display naive help
-p - path to NOC directory. default - /opt/noc
-r - path to "repo", where NOC store obtained configs, etc. default - /var/repo
-b - path to "repo" backups. default - /var/backup
-l - path to log files. default - /var/log/noc
-P - path to "pid" files. default is equal to -l
-u - NOC user. default - "noc"
-g - NOC group. default - "noc"

Create PostgreSQL database

Create database user noc from PostgreSQL superuser account (postgres in example), then create database noc

# su - postgres
postgres@/$ psql
postgres=# CREATE USER noc ENCRYPTED PASSWORD '<password>';
postgres=# CREATE DATABASE noc ENCODING 'UTF8' OWNER noc; 
postgres=# \q   

Set MongoDB password

# mongo
MogoDB shell version: 2.0.1
connecting to: test
> use noc
switched to db noc
> db.addUser("noc", "noc")
...      

Change configuration files


Set up etc/noc.conf:[database] section.

Initialize NOC

Initialize database, Fault Management rules and online documentation by::

# su - noc
noc@/$ cd /opt/noc
noc@/opt/noc$ ./scripts/post-update

During initialization you will be prompted to create first NOC database superuser.

Enter superuser's name, password and email.

  • No labels