PACT Installation Guide

snottysurfsideServers

Dec 9, 2013 (3 years and 7 months ago)

2,682 views


PACT Installation Guide


Version
PACT 2.
1
-
Beta
2

Table of Contents
Table of Contents

................................
................................
................................
................

1

CentOS Inst
allation Guide Lines

................................
................................
........................

1

Linux Machine Configuration
................................
................................
.............................

2

PACT Bundle

................................
................................
................................
......................

3

External Servers

................................
................................
................................
..................

4

My SQL

................................
................................
................................
..........................

4

Bind

................................
................................
................................
................................
.

6

ISC DHCP

................................
................................
................................
.......................

7

ISC DHCP for IPv6

................................
................................
................................
........

8

TFTPD

................................
................................
................................
............................

8

TOD

................................
................................
................................
................................

9

Net SNMP

................................
................................
................................
.......................

9

Working with Net
-
SNMP distributed with PACT

................................
....................

10

External Libraries
................................
................................
................................
..............

10

Java Mail

................................
................................
................................
.......................

10

MIBS

................................
................................
................................
................................
.

11

Java

................................
................................
................................
................................
...

11

Before you start PACT Installation
................................
................................
...................

12

PACT Installation

................................
................................
................................
.............

12

PACT Uninstallation

................................
................................
................................
.........

22

PACT Basic Upgrade

................................
................................
................................
........

25

PACT Backup Scripts

................................
................................
................................
.......

27

IPv6 Addressing

................................
................................
................................
................

27

Rename a PACT Linux HOST

................................
................................
.........................

27

PACT as a Linux service

................................
................................
................................
..

28

Running automatic PACT DB backup

................................
................................
..............

28

PACT DB Recovery

................................
................................
................................
.........

29


CentOS
Installation Guide Lines


PACT has been successfully tested in
CentOS
-
5.3
. Following guide lines helps user to
install/c
onfigure environment and software required for PACT.

When installing
CentOS
-
5.3

ensure following packages are selected


1.

After you enter the password for the root, in the next screen

a.

Enable Server and Server GUI

b.

At the bottom of the screen
, en
sure that you select “Customize Now”
Option, so that you can select all the packages you require for PACT.

2.

In
the Pack
age

Selection Screen

(You can leave the default selection as is and
ensure that following packages are enabled or disabled as shown
bellow)

a.

Under Desktop Environments

i.

Enable
GNOME Desktop Environment.

b.

U
nder Application

i.

Enable
Editor

ii.

Enable Graphical Internet

iii.

Enable
Office/Productivity
.

iv.

Enable Graphical Internet. This will install Firefox web browser.

c.

Under Development

i.

Enable Development

Libraries

ii.

Enable Development Tools

iii.

Disable Java Development

d.

Under Servers

i.

Enable DNS Name Server

ii.

Enable Legacy Network Server and click on optional packages

1.

Enable
TFTP Server

iii.

Enable MySQL Database

iv.

Enable Network Servers and click

on optional packages

1.

Enable
dhcp

v.

Enable Server Configuration Tools and click on optional packages

1.

Enable
system
-
config
-
bind

vi.

Enable Windows File Server

e.

Under Base System

i.

Enable Administration Tools

ii.

Enable Base

iii.

Disable Java

iv.

Enable System Tools and click on optional packages

1.

Enable rdesktop (to connect Windows remotely)

2.

Enable
wireshark
-
gnome

3.

Disable
net
-
snmp
-
utils

4.

Disable net
-
snmp
-
libs

3.

Do not instal
l ‘Java Development’ package


this contains some of jars and
libraries that might conflict with the libraries distributed with PACT.

4.

After install is complete, the system will reboot. During post
-
installat
ion screens,
make sure you

a.

Disable Firewall

b.

Disable SELinux


Linux Machine Configuration


The Linux machine might require following configuration setup for PACT to run
successfully.
These are very important steps.


1.

Ensure that network configuration is pro
per, use either /usr/sbin/neat or /usr/sbin/s
system
-
config
-
network or /usr/sbin/system
-
config
-
network
-
gui or
/usr/sbin/system
-
config
-
network
-
tui to configure network information (IP
Address, Host name, domain name etc )

2.

Run ‘ping localhost’ command, this
should resolve localhost to configured IP
address/FQDN. Say you have configured machine IP to be 10.1.0.18 and FQDN
as pactprov.pclab.com, the first line of output of ping command would be
PING
pactprov.pclab.com (10.1.0.18) 56(84) bytes of data
.

3.

If the ab
ove does not resolve then edit /etc/hosts to add first entry as ‘10.1.0.18
pactprov.pclab.com localhost pactprov’.

4.

If you have connected this machine to internet and you are not able to resolve
internet
-
servers like google.com, then, you may have to

add following 2 lines to
/etc/resolv.conf files

a.

nameserver 10.1.0.7 # the IP address of the DNS server

b.

search pclab.com # Domain name to search for

5.

If you have NOT disabled SELinux/Firewall during installation, follow these
instructions to disable them. D
isable using GUI tool, /usr/bin/system
-
config
-
securitylevel. OR manually edit /etc/sysconfig/system
-
config
-
securitylevel and
/etc/selinux/config files.

6.

If you have not disabled firewall, then ensure that following ports are allowed
(these are all the port
s used by PACT)

a.

SOAP
-

8080, 8081, 8082, 8083, 8084, and 8085

b.

Kerberos
-

1293, 2246

c.

Internal
-

8088, 8089
, 8090



PACT Bundle


PACT is distributed in tar.gz format. Say for PACT version PACT2.0, the distribution
file would be PACT2.0.tar.gz. This file can
be extracted using command

tar xfvz PACT2.0.tar.gz.

Extracting the contents file will create a directory PACT2.0, which would have contents
(at higher level)

ls
-
l PACT2.0


total 5500

drwxr
-
xr
-
x 3 root root 4096 Jun 24 13:15 bin

drwxr
-
xr
-
x 2 root roo
t 4096 Jun 30 11:48 cli

drwxr
-
xr
-
x 7 root root 4096 May 21 18:28 common

drwxr
-
xr
-
x 7 root root 4096 May 21 18:28 DHCP

drwxr
-
xr
-
x 8 root root 4096 May 21 18:28 DNS

drwxr
-
xr
-
x 7 root root 4096 May 21 18:28 Kerberos

-
rw
-
r
--
r
--

1 root roo
t 8753 Jun 30 11:48 license.txt

-
rw
-
r
--
r
--

1 root root 821760 Jun 30 11:47 PACT Installation Guide.doc

-
rw
-
r
--
r
--

1 root root 4657664 Jun 30 11:47 PACT User Guide.doc

drwxr
-
xr
-
x 7 root root 4096 Jun 27 17:41 PROV

-
rw
-
r
--
r
--

1 root roo
t 528 Jun 30 11:48 README.txt

drwxr
-
xr
-
x 8 root root 4096 May 21 18:28 SNMP

drwxr
-
xr
-
x 7 root root 4096 May 21 18:28 TFTP

drwxr
-
xr
-
x 6 root root 4096 May 21 18:28 TOD


This directory; PACT2.0, will be referred as
PACT_BUNDLE_DIR

throughout
the
document
.



NOTE: Before installing

PACT
, you may have to download some external libraries
and place them under ‘PACT bundle’. Please check
External Libraries

for more
details.


External Servers


PACT Uses server

open
-
source servers like MySQL, Bind, ISC DHCP, TFTPD, Net
SNMP. It’s required some of them to configure before pact is installed. Please note that
you may require root/superuser privileges to perform external server setup.

My SQL


My SQL Database server
is used to store PACT configuration information. PACT
requires this to be configured and running. Following guide lines can help user setup the
My SQL database server. Detailed and precise installation/configuration information can
be obtained from (
http://dev.mysql.com/doc/
).


In the following steps the $ indicates the bash command prompt, whereas mysql> is the
mysql database prompt and appears once a user has logged into the mysql program. Be
careful about which

prompt you are being directed to enter commands at, whether you
are in the bash shell or within the mysql database.



1.

If installed from a RPM/package all the executables would be available in
(/usr/bin)

2.

If the DB has never been configured, then run mysql_
install_db

3.

Now start mysqld (server) using following command

a.

$ /sbin/service mysqld start

4.

User can set/change the mysqld password for root user using command (this step
is optional)

a.

$ mysqladmin

u root password new
-
password

5.

User can login to Database usin
g mysql (text
-
based client for mysqld) using
following command (provide the password from previous step)

a.

$ mysql
-
u root
--
password # (run this command if you have created
password for root)

b.

$ mysql
-
u root # (run this command if you have not created pass
word for
root)

6.

Now it’s required to create a database/user for pact. Using following command in
mysql to achieve this

a.

Login to mysql client as root

i.

$ mysql

u root
--
password # (if you have created password for
root)

ii.

$ mysql

u root # (if you did not creat
e password for root)

b.

In mysql run

i.

mysql> create database pact; #(this creates database for pact)

c.

Following creates user pact with password as pact (this step assumes
pactprov

is the machine name and
pclab.com

is domain name)

i.

mysql> grant all privileges on

*.* to 'pact'@'%' identified by 'pact'
with grant option;

ii.

mysql> grant all privileges on *.* to 'pact'@'localhost' identified
by 'pact' with grant option;

iii.

mysql> grant all privileges on *.* to 'pact'@'pactprov' identified by
'pact' with grant option;

iv.

mysq
l> grant all privileges on *.* to 'pact'@'pactprov.pclab.com'
identified by 'pact' with grant option;

d.

Login to pact database as user ‘pact’, password for pact is ‘pact’, using the
command

i.

$ mysql

u pact pact
--
password

e.

Verify user entries running followi
ng commands

i.

from mysql prompt run ‘show databases;’

ii.

from mysql prompt run ‘use mysql;’

iii.

from mysql prompt run ‘select user from user;’ (check if pact
exists in the result).

7.

To configure PACT tables execute following commands (PACT_BUNDLE_DIR
-

pact installa
tion files directory)

a.

$ mysql

u root
--
password pact
--
force <
PACT_BUNDLE_DIR/common/sql/drop
-
tables.sql # (if you get some
errors its okay, as your database may not contain PACT tables)

b.

$ mysql

u root
--
password pact
--
force <
PACT_BUNDLE_DIR/common/sq
l/create
-
tables.sql

c.

$ mysql

u root
--
password pact
--
force <
PACT_BUNDLE_DIR/common/sql/config
-
tables.sql


Ensure that MySQL DB is started on system startup; PACT requires mysqld to be
running all the time. To start mysql db on startup, following can be
done

1.

/sbin/chkconfig
--
list mysqld (to check if mysqld is on or off)

2.

/sbin/chkconfig mysqld on (to turn on mysqld during system startup)

3.

/sbin/service mysqld status (check the status of mysqld)

4.

/sbin/service mysqld start (to start mysqld)



Bind


Bind 9.x
is used as the DNS server for PACT. It’s required to configure Bind manually,
or user can use /usr/sbin/system
-
config
-
bind or /usr/sbin/system
-
config
-
bind
-
gui utilities
to configure. Following example configuration can help you setup DNS server.

The comman
d name for DNS server is named (located in /usr/sbin).


For a fresh install, /etc/named.conf
may
not exist and must be either created manually or
a sample file from the PACT_BUNDLE_DIR/DNS/ex
amples directory can be suitably
modified. If updating or recovering a prior installation, a backup copy of named.conf can
simply be copied into the /etc directory on the new install, and renamed to named.conf. if
necessary.


Example files are available u
nder PACT_BUNDLE_DIR/DNS/examples.



The primary configuration file is located in /etc/named.conf


1.

Its required to add zone entry

zone "pclab.com" IN {


type master;


file "pclab.com.zone";


allow
-
update { any; };

};




(Note: if the P
ACT GUI does not allow addition of the line: allow
-
update { any; };


then you must edit the file manually using ‘vi’)



PACT requires allow
-
update at least from DHCP server IP. In this example we
allow update from any server.

2.

Navigate to /var/named and che
ck whether named.root exists. If it does not, then
issue the command “touch /var/named/named.root”

3.

Now edit/create pclab.com.zone file typically under directory "/var/named"
(check directory statement under options block in /etc/named.conf.

4.

pclab.com.zone

file would like following

$ORIGIN .

$TTL 86400 ; 1 day

pclab.com IN SOA pactprov.pclab.com. root.pactprov.pclab.com. (


10010 ; serial


21600 ; refresh (6 hours)


3600 ; retry (1 hour)



31536000 ; expire (52 weeks 1 day)


86400 ; minimum (1 day)


)


NS 10.1.0.18

$ORIGIN pclab.com.

pactkdc A 10.1.0.77

pactprov A 10.1.0.18

pactdns A 10.1.0.18

pacttft
p A 10.1.0.17

_kerberos._tcp SRV 0 0 88 pactkdc

_kerberos._udp SRV 0 0 88 pactkdc

5.

Make sure pclab.com.zone belongs to user named and group named, if not change
owner and group by running following commands

a.

$ chown named /var/named/pclab.
com.zone

b.

$ chgrp named /var/named/pclab.com.zone

6.

To validate the configuration file run the following

a.

$ /usr/sbin/named
-
checkconf
-
j /etc/named.conf

z

b.

$ /usr/sbin/named
-
checkzone pclab.com /var/named/pclab.com.zone #
(This will verify pclab.com zone)

7.

To t
est configuration first run named, and run following commands (in a different
terminal)

a.

/usr/sbin/named
-
f
-
g
-
u named (start named)

b.

/usr/bin/dig @10.1.0.18 +domain= pclab.com pactkdc

c.

/usr/bin/dig @10.1.0.18 _kerberos._udp.pclab.com SRV

d.

Stop named (press C
TRL
-
C in the terminal its running)

8.

After successful configuration stop named; press CTRL
-
C. (Note that PACT is
going to start the named)

9.

If the realm name is not the same as domain name used for devices, say
LABREALM.COM is the realm name, in such a case y
ou have to configure a
different zone for with domain name as labrealm.com.

a.

Add zone entry in /etc/named.conf

zone "labrealm.com" IN {


type master;


file "labrealm.com.zone";


allow
-
update { none; };

}
;

b.

Contents of /var/named/labrealm
.com.zone would be

$ORIGIN .

$TTL 86400; 1day

labrealm.com IN SOA pactprov.pclab.com root.pactprov.pclab.com (


10010; serial


21600; refresh (6hours)


3600; retry (1 hour)


31536000; expire (52 weeks 1 day)


86400; minim
um (1 day)

)


NS 10.32.0.18

$ORIGIN labrealm.com.

_kerberos._udp SRV 0 0 88 pactkdc.pclab.com.



ISC DHCP


PACT uses ISC DHCP 3.0.x. It’s not required to configure ISC DHCP manually. Ensure
that software is installed and server is not
running. Ensure that there is no file like
/etc/rc.d/rc4.d/S*dhcpd (where * represents a number), if this exist remove/move it
outside the rc directory.

OR to disable

by

run following commands

/sbin/chkconfig dhcpd off


ISC DHCP for IPv6

If you wish to pe
rform IPv6 provisioning, you will need 2 different versions of ISC
DHCP. The

ISC
-
DHCP

3.0.x is installed as
part of Linux
package and 4.
x

should be
installed manually.


To install ISC DHCP 4.1.0, do the following

1.

$ mkdir /opt/servers/iscdhcpv6
-
src

2.

Go to
http://ftp.isc.org/isc/dhcp
, and download
the file
dhcp
-
4.1.1b2.tar.gz

and
save it under /opt/servers/iscdhcpv6
-
src.

3.

$ cd /opt/servers/iscdh
cpv6
-
src/ # (change directory )

4.

$ tar xfzv dhcp
-
4.1.0a1.tar.gz #(extract the contents of package)

5.

$ cd dhcp
-
4.1.0a1

6.

$ mkdir /opt/servers/iscdhcpv6

7.

$ ./configure
--
prefix=/opt/servers/iscdhcpv6

8.

$ make

9.

$ make install


TFTPD



PACT uses in.tftpd (USAGI TFTP
server). Please get source, build and configure as per
following instructions

1.

Download the TFTPD rpm package from the following page.
http://rpm.pbone.net/index.php3/stat/4/idpl/142407/com/usagi
-
tftpd
-
20020408
-
1.i386.rpm.html

2.

Download the TFTP rpm package
from following page.
http://rpm.pbone.net/index.php3/stat/4/idpl/142378/com/usagi
-
tftp
-
20020408
-
1.i386.rpm.html

3.

Install both RPMs by running following commands

a.

$ rpm

i usagi
-
tftpd
-

20020408
-
1.i386.rpm

b.

$ rpm

i usagi
-
tftp
-

20020408
-
1.i386.r
pm

4.

The program will be installed under /usr/local/v6/ directory.

a.

You can find in.tftpd (the server) at /usr/local/v6/sbin/in.tftpd

5.

To configure
TFTPIPv6
to start as part of inetd do following

a.

Create a file
/etc/xinetd.d/tftp6

b.

Make sure following is
content

service tftp

{


socket_type = dgram


protocol = udp


wait = yes


user = root


server = /usr/local/v6/sbin/in.tftpd


server_args = /tftpboot


disable

= no


per_source = 11


cps = 100 2


flags = IPv6




bind


= fc00:502::10:1:0:18

}

6.

The IPv6 address in the last line (bind=v6
-
addr) must be the IPv6 address of the
Pact provisioning server.

7.

It is i
mportant that you specify
bind

option. This server is intended to run in
IPv6
mode only

8.

Now restart xinetd by running following command

a.

$ /sbin/service xinetd restart





TOD


PACT uses built
-
in TOD Server. So make sure inet.d does not start its own. To di
sable
tod

1.

Change directory
to /etc/xinetd.d/

2.

Edit either time
-
udp or time
-
dgram and add/modify statement ‘disable=yes’

3.

Now restart inetd by running command

a.

$ /sbin/service xinetd restart


Net SNMP


PACT uses Net SNMP to perform SNMP
-
manger operations.
PACT requires some code
changes in Net SNMP. PACT distributes a modified version of net
-
snmp
-
5.4.2.1
, which
includes all the changes required for PACT. Please note that this version of net
-
snmp has
some behavioral changes, this may not work the same

way as standard net
-
snmp
distribution.

The changed files are available with PACT distribution. The changed files, original and
difference files are avilable under PACT_BUNDLE_DIR/SNMP/netsnmp/*


The .org file is the original file available from net
-
snmp
-
5.4.2.1

The .diff file show the difference between the original and changed file


apps/Makefile.in

apps/Makefile.in.org

apps/Makefile.in.diff


apps/snmptrapd.c

apps/snmptrapd.c.org

apps/snmptrapd.c.diff


apps/snmptrapd_handlers.c

apps/snmptrapd_handl
ers.c.org

apps/snmptrapd_handlers.c.diff


apps/pactclone.c

apps/pact_usersocket.c

apps/pact_usersocket.h


snmplib/snmpv3.c

snm
plib/snmpv3.c.org

snmplib/snmpv3.c.diff


Working with Net
-
SNMP distributed with PACT


Retrieve the Net
-
SNMP distribution from Doczone
. Currently distributed package is
net
-
snmp
-
5.
4
.
2
.
1
-
changes
.tar.gz.


1.

Use a browser to navigate to CableLabs.com/Doczone

2.

From PacketCable/Testing/TestEnvironment download net
-
snmp
-
5.4.2.1
-
changes.tar.gz and

save it to to /opt/servers/net
snmp
-
src

3.

Extract the tar file using command ‘tar xfvz net
-
snmp
-
5.4.2.1
-
changes.
tar.gz’

4.

cd net
-
snmp
-
5.4.2.1
-
changes

5.

Now run command # ./configure
--
prefix=/opt/servers/netsnmp
--
enable
-
ipv6

a.

When prompted for “
Default version of SNMP to use (3)
”, press enter

b.

When prompted for “
System Contact Information
”, press enter

c.

When prompted for

System Location
”, press enter

d.

When prompted for “
Location to write logfile
”, type

/opt/servers/netsnmp
/
var/log/snmpd.log and then press enter

e.

When prompted for “
Location to write persistent information
”, type
/opt/servers/netsnmp/var/net
-
snmp and then pre
ss enter

6.

Now run command # make

7.

Now run command # make install (this would require root/superuser permissions)


External Libraries


Java Mail


PACT requires mail.jar from the JavaMail package. Please ensure that you put a copy of
mail.jar under PACT_BUNDLE_DIR/common/lib and PACT_BUNDLE_DIR/cli.


Also you have put a copy of this jar file when

you download PACT cli from ‘PACT UI’.
Please check ‘PACT CLI’ section of ‘PACT User Guide’ for downloading and installing
instructions. Once you have downloaded and extracted, say into c:
\
pactcli
\
cli, copy
mail.jar to this directory.


PACT has been tested

successfully JavaMail 1.3.3_01. You can get more detail on the
JavaMail product from this URL http://java.sun.com/products/javamail.


MIBS


Please ensure to have the all the MIBS are available under
/opt/servers/netsnmp/
share/snmp/mibs. To get
the current version of MIBs do the
following

1.

$ cd
/opt/servers/netsnmp
/share/snmp # (Change directory to
/opt/servers/netsnmp
/share/snmp)

2.

$ mv mibs mibs_org # (Rename mibs directory to mibs_org)
(rename the mibs
directory because it is

going to be replaced by the directory from the PACT
BUNDLE distribution)

3.

Run the command “cp
-
R PACT_BUNDLE_DIR/SNMP/config/mibs .”

(make sure that you substitute PACT_BUNDLE_DIR with correct bundle

directory, and execute the command exactly as written;
the final ‘.’ is an

argument. You are copying the mibs directory from the PACT_BUNDLE_DIR to
the
/opt/servers/netsnmp
/share/snmp dir)

4.

Now you are all set with current MIBs.


Java


PACT requires JDK (not just JRE) to be installed and it works wit
h JDK 1.5.x.
Download and install latest version of 1.5.x JDK from
http://java.sun.com/javase/downloads/index_jdk5.jsp. Make sure you download and
install JDK not just JRE.


Sun offers a bin file and an RPM installation. Instructions for both are at:

ht
tp://java.sun.com/j2se/1.5.0/install.html


To install with bin file

1.

Download (e.g.) jdk
-
1_5_0_16
-
linux
-
i586.bin and copy to /usr/java

2.

Run ‘chown +x jdk
-
1_5_0_16
-
linux
-
i586.bin’ to give execute permissions

3.

Run ‘./jdk
-
1_5_0_16
-
linux
-
i586.bin’

4.

If you accept t
he license terms and the new java version will be installed at
/usr/java/jdk1.5.0_16 (e.g.)


Additionally PACT requires ‘unlimited strength’ cryptography to be enabled. Please see
http://java.sun.com/products/jce for more details.


To download a copy, chec
k ‘
Other Downloads
’ section of
http://java.sun.com/javase/downloads/index_jdk5.jsp.


‘Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 5.0’,
downloads as jce_policy
-
1_5_0.zip.

1.

In a temp directory run ‘unzip jce_policy
-
1_5_0.z
ip’.

2.

4 files will extract: COPYRIGHT.html, README.txt, local_policy.jar and
US_export_policy.jar

3.

Go to JAVA_HOME (where java is installed


typically /usr/java/ jdk1.5.0_*)

4.

Replace jre/lib/security/local_policy.jar with the above extracted file

5.

Replace jre
/lib/security/US_export_policy.jar with the above extracted file


Before you start PACT Installation


Before starting installation make sure that you
have Super user privileges
. And the bash
is the shell that’s currently being used. You can switch to bash
shell by running

# /bin/bash


Please note that PACT requires
at least 2 IP address
, one for TFTP server and other for
rest of servers. A logical interface/IP address may be created on a Linux box using
command

/sbin/ifconfig eth0:1 10.1.0.17/24 up


Howeve
r
this is not persistent
; which means that this logical
-
interface will be not
available if machine is rebooted.


To create persistent logical IP use /usr/sbin/system
-
config
-
network or /usr/sbin/neat GUI
tool.


For creation of persistent IPv6 addresses see
the section “IPv6 Addressing” near the end
of this document.

PACT Installation


Go to bundle directory (PACT_BUNDLE_DIR), Run
PACT_BUNDLE_DIR/bin/install.sh.





Agree/Disagree License terms, Type ‘y’ to agree, and press enter to continue PACT
installatio
n.





The scripts requests for target installation directory. By default scripts assumes
/opt/CableLabs/pact. You can enter any valid directory name.




Scripts requests for the value for JAVA_HOME, which is nothing but the installation
directory where
Java is installed. (these files must exist: JAVA_HOME/bin/java and
JAVA_HOME/bin/javac)




Enter the local system IP address. By default scripts tries to find out the first available IP
address. This IP will be used to connect to PACT using http, say IP i
s 10.1.0.18, PACT
http URL would be http://10.1.0.18:8080.




Enter the IP address of the TFTP server (should not be the one chosen for local system
IP)




It’s required to enter the local system Network ID and Net Mask, this required to
configure DHCP.




Review the environment variables and continue installation.




Now the script will copy the files and patch files to customize the PACT for the local
machine. At the end script requests to run registration sequence. Registration sequence
program ensur
es proper SOAP connectivity between PROV and other BOAs. If you
choose to not to run now, it can be run later using
PACT_INSTALL_DIR/bin/registrationsq.sh. It’s mandatory that PROV has the
knowledge of all BOAs, otherwise PACT would not work properly.



A
fter registration sequence execution, the PACT system is up and ready to use.





PACT Uninstallation


Go to bundle directory or installed directory (/opt/CableLabs/pact)




Run PACT_BUNDLE_DIR/bin/uninstall.sh




Uninstall script is going to remove ent
ire install directory. So please back any of the files
that might be of use, like the TLV files created, these are available under
PACT_INSTALL_DIR/PROV/bin/tlvfiles. Before removing files all the servers will be
stopped.





At the end, before provisioni
ng devices using PACT, ensure that PACT and KDC
machine clocks have same time, if they are not same, device may get clock
-
skew error
during AS exhange. You may use command ‘/bin/date

s “Wed Feb 15 14:36:16 MST
2006”’ to set the date of system, and you may

also use /sbin/hwclock
-
w to synch system
date and hardware clock (to ensure that date does not change on reboot).



PACT Basic Upgrade


When PACT upgrade does not required database schema changes user can perform
PACT Basic Upgrade. PACT Basic upgrade in
volves
un
-
installing

the existing copy and
installing
a new copy. Before un
-
installing user is required to backup the
modified

and
the TLV files. Modified files may include any

configuration files that you may have
modified; mtaTlvMibs.props, trapHandle.props etc.


TLV Files are saved under PACT_INSTALL_DIR/PROV/bin/tlvfiles/*. After installation
new version of PACT, make sure they are copied back to same directory.


There is n
o need backup database, unless its instructed in the new release.
DO NOT

run
PACT_INSTALL_DIR/common/sql/*.sql [drop
-
tables.sql, create
-
tables.sql and config
-
tables] on the database, this will destroy the current system data (policies, devices etc).


If in
structions

are provided with the new release, then run one of

PACT_INSTALL_DIR/common/sql/upgrade*.sql.


After upgrade is complete, please ensure put the TLV files back into
PACT_INSTALL_DIR/PROV/bin/tlvfiles/ and deploy DHCP (from PACT UI) before
provisi
oning any devices.


1.

Stop PACT

2.

Run both full and database backup scripts per instructions in next section below
<PACT Backup Scripts>

3.

Run PACT_INSTALL_DIR/bin/uninstall.sh to uninstall old version

4.

Goto PACT_BUNDLE_DIR/bin and run install.sh to install new
version

5.

Check that mysql is running by ‘service mysqld status’

6.

If upgrading from 1.x to 2.0 then you’ll need to install/configure IPv6 elements.
For this you must go to the Readme.txt file in PACT_BUNDLE_DIR. Follow the
instructions in section <Upgrade f
rom PACT1.x to PACT2.0
-
Beta>. This
requires manual configuration of

a.

DHCP

b.

Net
-
SNMP

c.

TOD

d.

TFTPD

e.

MIBS

f.

JAVA

7.

If installing IPv6 then DHCPv6 is required. Go to installation instructions in this
document, section: <External Servers/ISC DHCP for IPv6>

8.

Do the same

for NetSNMP, following instructions in section <Working with Net
-
SNMP distributed with PACT>

9.

Do the same for TOD

10.

Do the same for TFTPD

11.

Do the same for MIBS

12.

Do the same for JAVA

13.

cd to PACT_INSTALL_DIR/bin and run ./restart.sh all

14.

Sync KDC and PACT clocks p
er directions at end of PACT Uninstallation
instructions in the previous section

15.

Open http://<pact_server_ip>:8080, PACT should be in service

16.

You will still need to configure IPv6 addressing, subnets and policies, which is
beyond the current scope of this
document.






PACT Backup Scripts


User has 2 backup scripts, which can be used to backup pact


1.

PACT_INSTALL_DIR/bin/pactdb
-
backup.sh

a.

This scripts backup all the database information created/used by PACT. If
your server/machine happens to crash you can u
se the tar
-
ball created by
this script to restore back.

b.

To run this script

c.

cd PACT_INSTALL_DIR/bin

d.

./pactdb
-
backup.sh

e.

This should create you a tar.gz file which can save it

2.

PACT_INSTALL_DIR/bin/backuppact.sh

a.

This script will backup the whole PACT installa
tion.

b.

For complete backup run both pactdb
-
backup.sh and backuppact.sh

c.

To run this script you need to stop all servers, once you stop, do the
following

d.

cd PACT_INSTALL_DIR/bin

e.

./backuppact.sh

f.

This should create a tar.gz file, which can save it.




IPv6 Add
ressing


1.

Add an IPv6 Address by

a.

ifconfig eth0 add fc00:502::10:32:0:195 (or other address)

2.

Make v6 address persistent (
On
CentOS
only)

a.

cd to /etc/sysconfig/network
-
scripts

b.

Edit ifcfg
-
eth0

c.

Change IPV6INIT=no to IPV6INIT=yes

d.

Add line: IPV6ADDR
= fc00:502::10:32:0:195/64

e.

Add line: IPV6PREFIX=64


Rename a PACT Linux HOST


PACT host name and IP address
can be
changed
but
there are lot of complication
involved, as this information is embedded into many configuration files, scriopts and
database.


It

is easier to configure the correct host name
and IP
at installation
time
of
CentOS
.



PACT as a Linux service


Now PACT can be setup as a linux service. By default at the end of installation user is
asked, if he/she wishes to install PACT a s
ervice. This section will help you reinstall or
uninstall as a service


To Install as a service

1.

Go to PACT_INSTALL_DIR/bin

2.

run the command

a.

# ./svcinstall.sh install


To Uninstall as a service

1.

Go to PACT_INSTALL_DIR/bin

2.

run the command

a.

# ./svcinstall.sh u
ninstall


Managing PACT as a service

1.

To check the status of PACT, run the command

a.

# /sbin/service pact status

2.

To start PACT, run the command

a.

# /sbin/service pact start

3.

To stop PACT, run the command

a.

# /sbin/service pact stop



Running automatic PACT DB ba
ckup


PACT has two different backup scripts. See “
PACT Backup Scripts
” section on how to
run them. This section helps you run the pactdb
-
backup.sh script as a cron job.

To setup the cron job ..

1.

Login as root

2.

Choose
a destination where backups should be saved, could be

a.

Mount a USB drive

b.

Mount remote machine share

c.

Choose a local directory

3.

Lets say the destination directory is
/mnt/pact
-
backup
. Ensure that this
directory actually exists.

4.

now edit cron job by running
the command

a.

/usr/bin/crontab

e

5.

Assuming PACT_BUNDLE_DIR equals to /opt/CableLabs/pact, if different
replace the correct directory path in the following steps

6.

For daily backup add a line

a.

@daily /opt/CableLabs/pact/bin/pactdb
-
incron.sh /mnt/pact
-
backup

7.

For
weekly backup add a line

a.

@weekly /opt/CableLabs/pact/bin/pactdb
-
incron.sh /mnt/pact
-
backup

8.

For monthly backup add a line

a.

@montly /opt/CableLabs/pact/bin/pactdb
-
incron.sh /mnt/pact
-
backup

9.

Now save the file and exit.

10.

Your cron job is setup

11.

To add your own sc
hedule see cron manual

12.

You can see cron job logs under /opt/CableLabs/pact/cron
-
backup.log

13.

You can see backup process logs under /opt/CableLabs/pact/pactdb
-
backup.log


PACT DB
Recovery


Lets say you have to recover pactmain.redlab.com
-
backup
-
12_05_08_00_00
.tar.gz. Copy
this file a

location on hard disk. Lets say
you copied to
/root/recovery.

Now
change
directory to /root/recover, and follow the steps given bellow


1.

Stop following servers by running command

a.

# /opt/CableLabs/pact/bin/stop.sh all

b.

# service mys
qld stop

2.

Extract pactmain.redlab.com
-
backup
-
12_05_08_00_00.tar.
gz by running
following command

a.

#
tar xfz pactmain.redlab.com
-
backup
-
12_05_08_00_00.tar.gz

3.

Above command will create a
directory
/root/recovery/backup/pactmain.redlab.com
-
backup
-
12_05_08_00_00

4.

Change directory to above

a.

# cd
/root/recovery/backup/pactmain.redlab.com
-
backup
-
12_05_08_00_00

5.

To recover DNS

a.

Copy dns/named.conf /etc/named.conf

b.

Copy rest of the files in


dns/* to /var/named

6.

To recover dhcp lease

a.

Copy dhcp/dhcp.lease to /opt/CableLabs/pa
ct/DHCP/bin

7.

To recover tftp

a.

Copy tftp/tftpboot/* to /tftpboot

b.

Copy tftp/tlvfiles/* to /opt/CableLabs/pact/PROV/bin/tlvfiles

8.

To recover MySQL

a.

Copy mysql/pact/* /var/lib/mysql/pact/

9.

Now start servers

a.

# service mysqld start

b.

# /opt/CableLabs/pact/bin/start.sh
all