Installation
Package Overview
The N-Squared Service Daemon software is package into a single package called
n2svcd. This package is designed to be installed on Linux based systems such
as RedHat Linux and Debian. Installation is performed using standard package
management tools - yum and rpm on RedHat based systems, apt and
dpkg on debian based systems.
The n2svcd package provides core functionality such as common codecs, the
message-passing framework, application base classes, and several “Helper”
applications.
The primary service logic applications are provided separately in additional
packages such as n2sip, n2dsg, n2acd, n2qd etc.
OS Support
The Service Daemon is supported on the following systems:
RedHat based systems:
- CentOS 6+
- Oracle Linux 7.2+
- RedHat Enterprise 6+
Debian based systems:
- Ubuntu 16.04+
RedHat Installation: n2svcd
Required Package Installation via yum
The n2svcd package has a number of pre-requisites. If installing onto a server with access to the standard package
repositories via the Internet, use the following commands to retrieve and install them.
Install core packages:
yum install epel-release lua lksctp-tools rsyslog nano rsync rsyslog-snmp net-snmp-libs policycoreutils-python
Note the usage of epel-release; this core package acts as yum repository extension package that allows access to
additional Perl packages that would otherwise require manual installation.
Install core Perl packages:
yum install \
perl-DBI \
perl-JSON \
perl-Time-HiRes \
perl-Test-Differences \
perl-Module-Load \
perl-List-MoreUtils \
perl-Object-MultiType \
perl-ExtUtils-MakeMaker \
perl-Error \
perl-XML-Smart \
perl-Carp-Always \
perl-TimeDate \
perl-HTTP-Message \
perl-TermReadKey \
perl-Sys-Syslog \
perl-Digest-SHA \
perl-Crypt-Eksblowfish \
perl-IO-Socket-SSL \
perl-Exporter-Tiny \
perl-CGI \
perl-CGI-Session \
perl-HTTP-Cookies \
perl-MIME-Types \
perl-LDAP \
perl-Text-CSV \
perl-XML-LibXML \
perl-LWP-Protocol-https \
perl-String-Random \
perl-URI-Encode \
perl-DateTime \
perl-File-Find-Rule
N-Squared provides an RPM repository that is used to provide a number of dependencies that otherwise are not available through normal means on RedHat based distributions. In order to use this repository, create a record for it in the file:
/etc/yum.repos.d/N-Squared.repo
Add the following content to the file with access credentials that are provided by N-Squared:
[nsquared]
gpgcheck=0
enabled=1
name=N-Squared Software Releases
baseurl=https://<username>:<password>@www.nsquared.co.nz/rpm-extra
Clean all the existing repositories to add the N-Squared repository to the list of available repositories:
yum clean all
Update the available repositories to refresh the available package list:
yum update
Install the N-Squared provided packages:
yum install \
n2lua \
perl-Sub-Quote-2.005000-1.of.el7.noarch \
perl-IO-Socket-IP-0.38-1.of.el7.noarch \
perl-IO-Socket-INET6-2.72-1.of.el7.noarch \
perl-Type-Tiny-XS-0.012-1.of.el7.x86_64 \
perl-Module-Runtime-0.014-1.of.el7.noarch \
perl-Role-Tiny-2.000006-1.of.el7.noarch \
perl-strictures-2.000001-1.of.el7.noarch \
perl-Moo-2.003004-1.of.el7.noarch \
perl-PBKDF2-Tiny-0.005-1.of.el7.noarch \
perl-String-Compare-ConstantTime-0.311-1.of.el7.x86_64 \
perl-Unicode-Stringprep-1.104-1.of.el7.noarch \
perl-Authen-SASL-SASLprep-1.011-1.of.el7.noarch \
perl-Type-Tiny-1.000005-1.of.el7.noarch \
perl-Authen-SCRAM-0.005-1.of.el7.noarch \
perl-boolean-0.45-1.of.el7.noarch \
perl-BSON-1.4.0-1.of.el7.noarch \
perl-URI-Query-0.16-1.of.el7.noarch
Required Package Installation via rpm
If yum is unable to access the standard package repositories, retrieve the
packages listed below (N-Squared can provide these) and install via rpm.
This list is a combination of the above packages and the pre-requisites required for installing these specifical packages into a clean install of RedHat (or CentOS) 6.4.
If installing into a RedHat 6.4 (rather than CentOS) system, install these packages first:
perl-5.10.1-136.el6.x86_64.rpmperl-Digest-SHA-5.47-136.el6.x86_64.rpmzlib-1.2.3-29.el6.i686.rpmzlib-1.2.3-29.el6.x86_64.rpm
To install, use the following command, updating as appropriate:
rpm -Uvh package-list
Where package-list is the complete list of packages separated by spaces.
Note that it is important to install all listed packages at once to ensure that all dependencies are met.
For both RedHat and CentOS 6.4 systems, install the following packages:
cloog-ppl-0.15.7-1.2.el6.x86_64.rpmcpp-4.4.7-4.el6.x86_64.rpmdb4-4.7.25-18.el6_4.x86_64.rpmdb4-cxx-4.7.25-18.el6_4.x86_64.rpmdb4-devel-4.7.25-18.el6_4.x86_64.rpmdb4-utils-4.7.25-18.el6_4.x86_64.rpmgcc-4.4.7-4.el6.x86_64.rpmgdbm-devel-1.8.0-36.el6.x86_64.rpmglibc-2.12-1.132.el6_5.2.x86_64.rpmglibc-common-2.12-1.132.el6_5.2.x86_64.rpmglibc-devel-2.12-1.132.el6_5.2.x86_64.rpmglibc-headers-2.12-1.132.el6_5.2.x86_64.rpmkernel-headers-2.6.32-431.23.3.el6.x86_64.rpmlibgcc-4.4.7-4.el6.x86_64.rpmlibgomp-4.4.7-4.el6.x86_64.rpmlksctp-tools-1.0.10-7.el6.x86_64.rpmlksctp-tools-devel-1.0.10-7.el6.x86_64.rpmlua-devel-5.1.4-4.1.el6.x86_64.rpmmailcap-2.1.31-2.el6.noarch.rpmmpfr-2.4.1-6.el6.x86_64.rpmperl-5.10.1-136.el6.x86_64.rpmperl-Algorithm-Diff-1.1902-9.el6.noarch.rpmperl-CGI-3.51-136.el6.x86_64.rpmperl-Compress-Raw-Zlib-2.021-136.el6.x86_64.rpmperl-Compress-Zlib-2.021-136.el6.x86_64.rpmperl-DBI-1.609-4.el6.x86_64.rpmperl-Error-0.17015-4.el6.noarch.rpmperl-ExtUtils-MakeMaker-6.55-136.el6.x86_64.rpmperl-ExtUtils-ParseXS-2.2003.0-136.el6.x86_64.rpmperl-HTML-Parser-3.64-2.el6.x86_64.rpmperl-HTML-Tagset-3.20-4.el6.noarch.rpmperl-IO-Compress-Base-2.021-136.el6.x86_64.rpmperl-IO-Compress-Zlib-2.021-136.el6.x86_64.rpmperl-JSON-2.15-5.el6.noarch.rpmperl-List-MoreUtils-0.22-10.el6.x86_64.rpmperl-Module-Load-0.16-136.el6.x86_64.rpmperl-Module-Pluggable-3.90-136.el6.x86_64.rpmperl-Pod-Escapes-1.04-136.el6.x86_64.rpmperl-Pod-Simple-3.13-136.el6.x86_64.rpmperl-Test-Differences-0.4801-3.el6.noarch.rpmperl-Test-Harness-3.17-136.el6.x86_64.rpmperl-Test-Simple-0.92-136.el6.x86_64.rpmperl-Text-Diff-1.37-2.1.el6.noarch.rpmperl-Time-HiRes-1.9721-136.el6.x86_64.rpmperl-TimeDate-1.16-11.1.el6.noarch.rpmperl-URI-1.40-2.el6.noarch.rpmperl-devel-5.10.1-136.el6.x86_64.rpmperl-libs-5.10.1-136.el6.x86_64.rpmperl-libwww-perl-5.833-2.el6.noarch.rpmperl-version-0.77-136.el6.x86_64.rpmppl-0.10.2-11.el6.x86_64.rpmrsyslog-5.8.10-8.el6.x86_64.rpm
As with previously, install with the command:
rpm -Uvh package-list
Additional Packages Required
A number of standard packages are unavailable via yum. These must be
installed from rpm and are available from N-Squared:
n2lua-5.2.1-1.1.x86_64.rpmlibdata-compare-perl-1.22-1.1.noarch.rpmrpm -Uvh libdata-hexdumper-perl-3.00-2.noarch.rpmlibemail-address-perl-1.892-2.noarch.rpmlibnet-address-ip-local-perl-0.1.2-3.noarch.rpmlibobject-multitype-perl-0.05-4.noarch.rpm libxml-smart-perl-1.6.9-4.noarch.rpm
As with previously, install with the command:
rpm -Uvh package-list
Oracle Installation
The N2SVCD Service Dameon has dependencies on the Oracle Instant Client. To install the client, download the Linux instant client packages from this URL:
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
The packages required are:
oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpmoracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64.rpmoracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64.rpm
Once downloaded, install via RPM:
rpm -Uvh oracle-instantclient12.1-basic-12.1.0.1.0-1.x86_64.rpm \
oracle-instantclient12.1-sqlplus-12.1.0.1.0-1.x86_64.rpm \
oracle-instantclient12.1-devel-12.1.0.1.0-1.x86_64.rpm
Oracle Perl DB Driver
The Oracle DB driver must be built for the platform. To install, as root, retrieve the Perl DBD::Oracle driver v1.74 from the URL:
http://search.cpan.org/CPAN/authors/id/P/PY/PYTHIAN/DBD-Oracle-1.74.tar.gz
… and build and install on the target platform:
cp DBD-Oracle-1.74.tar.gz /tmp/
cd /tmp/
tar zvfx DBD-Oracle-1.74.tar.gz
cd DBD-Oracle-1.74
perl Makefile.PL
make install
Package Installation
Once all pre-requisites are installed as described above, the n2svd
package is to be installed. The package will be named with the version
included in the file name - for example n2svcd-6.0.10-1.noarch.rpm, where
6.0.10 is the version number.
rpm -Uvh n2svcd-1.0.14-1.noarch.rpm
Dynaloader
After installing the n2lua package Dynaloader will need to be updated in order to utilize the installed package.
Create a new Dynaloader link:
nano /etc/ld.so.conf.d/liblua.conf
Adding:
/opt/n2lua/lib/
Update the Dynaloader index:
ldconfig
Post-Installation Checks
To confirm that the n2svcd package has installed successfully, check that the n2svcd process is executing:
ps -ef | grep n2sv[d]
Depending on configuration, this is expected to display one or more n2svcd processes running:
root 13016 1 0 Aug13 ? 00:00:00 /bin/sh -e -c bash /usr/share/n2svcd/bin/n2svcd_upstart_startup.sh /bin/sh
root 13017 13016 0 Aug13 ? 00:29:25 /usr/bin/perl /usr/share/n2svcd/bin/n2svcd --config=/etc/n2svcd/n2svcd.xml
root 13027 13017 0 Aug13 ? 00:00:55 /usr/bin/perl /usr/share/n2svcd/bin/n2svcd --config=/etc/n2svcd/n2svcd.xml
Confirm that the correct version of the n2svcd package is installed:
rpm -q n2svcd
This will respond with the package name, including the version number.