Cisco CNS NetFlow Collection Engine Installation and Configuration Guide, 5.0.2
Installing CNS NetFlow Collection Engine

Table Of Contents

Installing CNS NetFlow Collection Engine

Verifying System Requirements

Using the CNS NetFlow Collection Engine Installation Script

Installing on a Solaris or HP-UX Platform

Installing on a Red Hat Enterprise Linux Platform

Uninstalling CNS NetFlow Collection Engine 5.0


Installing CNS NetFlow Collection Engine


This chapter describes how to install Cisco CNS NetFlow Collection Engine.

This chapter includes the following sections:

Verifying System Requirements

Using the CNS NetFlow Collection Engine Installation Script

Installing on a Solaris or HP-UX Platform

Installing on a Red Hat Enterprise Linux Platform

Uninstalling CNS NetFlow Collection Engine 5.0

Verifying System Requirements

CNS NetFlow Collection Engine, Release 5.0 has the following hardware requirements:

Minimum of 1 GB RAM, 10K SCSI, 30 GB disk, single processor on an entry-level server.

Recommended: 4 GB RAM, 15K Ultra 320 SCSI, dual 70 GB disks, dual processors on an entry-level server.

The following operating systems and platforms are supported:

Solaris 8 and Solaris 9 on an entry-level server, such as the Sun Fire 280R with 1 GHz or greater UltraSPARC III or IIIi processors.

HP-UX Version 11i for PA-RISC on an entry-level server, such as the rp2400 series.

Red Hat Enterprise Linux 2.1 or 3 ES on an entry-level server, such as an IBM x336 with 2.8 GHz or greater Intel Xeon processors.

Note that the CPU, RAM, and disk space recommendations above are minimum requirements, and that actual requirements are determined by your configuration and by the volume and uniqueness of NetFlow data that is received. Actual resource usage can vary greatly depending on these factors.


Note To prevent NetFlow data export packet loss, the workstation should be dedicated to the CNS NetFlow Collection Engine and should not be running other applications.


The CNS NetFlow Collection Engine generates output files containing aggregated data. The exact amount of disk space the output files require depends on the flow arrival rate, collection interval, number of aggregation schemes specified, use of compression or not, and data file retention policies.

For more information on planning and managing memory usage, see the"Tuning Memory Usage"section of the Cisco CNS NetFlow Collection Engine User Guide. For more information on planning and managing disk space usage, see the "Managing Disk Space" section of the Cisco CNS NetFlow Collection Engine User Guide.

Using the CNS NetFlow Collection Engine Installation Script

The CNS NetFlow Collection Engine is distributed on CD-ROM. Updates are made available at http://www.cisco.com. When installing from the CD-ROM:

Run the install script setup.sh in the root directory of the CD-ROM.

When downloading an update:

Identify a partition such as /tmp that you can use to hold the CNS NetFlow Collection Engine download and image files.


Note You should verify that the partition you plan to use contains at least 200 MB of free disk space. This partition must be large enough to hold the gzipped download file, distribution files, and the temporary work files created by the installation script while it is installing the CNS NetFlow Collection Engine.


Unzip and untar the download file.

Run the installation script NFC_setup.sh.

The CNS NetFlow Collection Engine installation script makes the installation process as easy as possible by automatically handling new and upgrade installation issues. The installation script searches for files from a previously installed version of CNS NetFlow Collection Engine. If it detects a previously installed version, it preserves existing data and configuration files. Preserving the configuration files retains any additions or changes to the CNS NetFlow Collection Engine resource definitions or parameter settings that you might have made while using the previously installed version of CNS NetFlow Collection Engine.

Later in the installation process, the installation script allows you to specify whether you want to use the existing configuration files, or use the new configuration files. Depending on your choice, the unused files are saved in case you need them later.

The installation script also saves existing log files before clearing the logs directory during an upgrade.


Note If the installation script does not find files from a previously installed version of CNS NetFlow Collection Engine, the installation is a first-time installation and is basically the same as for an upgrade installation, but with fewer prompts from the installation script. The installation script prompts you for responses to any required steps.


Installing on a Solaris or HP-UX Platform

The procedure for installing CNS NetFlow Collection Engine on Solaris and HP-UX are nearly identical. The primary difference is in the output written by the platform installation programs (pkgadd on Solaris and swinstall on HP-UX.

If you are installing CNS NetFlow Collection Engine for the first time, the installation is basically the same, but with fewer prompts from the installation script.


Note During an upgrade installation, existing configuration files and log files are detected and moved to the directories NFC_DIR/config/old and NFC_DIR/logs/old, respectively.


To install the CNS NetFlow Collection Engine, perform the following steps:


Step 1 Log into the host as root.

Step 2 Perform one of the following:

a. When installing from CD-ROM, run setup.sh in the CD-ROM base directory.

b. When downloading the image over the web:

Download the zipped distribution file to a directory with at least 200 MB of available space.

Unzip and untar the distribution with gzcat and tar:

gzcat <download-file> | tar xf -

The following files are created:

NFC_setup.sh - Install script

CSCOnfc-<platform>-<version>-<build>.<type> - Install image. For example CSCOnfc-solaris- 5.0-2.standard

Run the install script specifying the install image as the argument, for example:

./NFC_setup.sh CSCOnfc-solaris-5.0-2.standard


Note On Solaris, the install image CSCOnfc-<platform>-<version>- <build>.<type> is a software package file in the format recognized by the Solaris install program pkgadd. On HP-UX, it is a directory containing files for the HP-UX install program swinstall.



Note Software can only be installed in the directory /opt/CSCOnfc. If some other directory is desired, create a symbolic link to /opt/CSCOnfc before installing the software.


The following example illustrates these steps. The installation script is invoked while logged in as root.

Example
# ./NFC_setup.sh CSCOnfc-solaris-5.0-2.standard
Fri Jan  2 14:00:01 EST 2004

Using software package /var/tmp/./CSCOnfc-solaris-5.0-2.standard.

********************************************************************

CNS Netflow Collection Engine 5.0.2 [standard image, build 2]
Copyright (c) 2003-2005 by Cisco Systems, Inc.
All rights reserved.

This product contains cryptographic features and is subject to
United States and local country laws governing import, export,
transfer and use. Delivery of Cisco cryptographic products does
not imply third-party authority to import, export, distribute
or use encryption. Importers, exporters, distributors and users
are responsible for compliance with U.S. and local country laws.

By using this product you agree to comply with applicable laws
and regulations. If you are unable to comply with U.S. and local
laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be
found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email
to export@cisco.com.

********************************************************************

Press Return to continue...

Step 3 Press return when prompted after the banner page is displayed.

Step 4 Unlike earlier releases of the CNS Netflow Collection Engine, programs are not installed with setuid-to-bin permission. Therefore, you must select an existing user ID as the owner of installed files and NFC processes:

An existing userid must be selected as the owner of NFC files and 
processes.

Enter userid: bin

In this example, the bin account was specified. Note that the account must already exist on the system. If it does not, an error is indicated and the install is terminated.

File ownership is set to the specified user. Also, if the autostart option is selected later during the installation, the CNS Netflow Collection Engine processes are owned by this user when started at system initialization. Otherwise, the CNS Netflow Collection Engine must be started manually by this user; if not, the CNS Netflow Collection Engine will not have write permission for its files and directories.

Step 5 Next, the install script checks whether the CNS Netflow Collection Engine is already installed and verifies that the CNS Netflow Collection Engine is not running on the system:

Found existing installation: 4.0 in /opt/CSCOnfc.

Verifying that NFC is not running...

If the CNS Netflow Collection Engine is running, an error is indicated and the install is terminated. You must first stop all NFC processes.

Next, if the CNS Netflow Collection Engine was already installed, all files under NFC_DIR/logs are automatically moved to the directory NFC_DIR/logs/old, and all files under NFC_DIR/config are moved to NFC_DIR/config/old. The previous installation is then removed using pkgrm on Solaris or swremove on HP-UX:

Saving old config, logs, and data files...

Removing previous NFC package...

Note that all output files under NFC_DIR/Data and all filesready files in the logs directory are preserved.

The new package is then installed. If you are installing CNS NetFlow Collection Engine on a Solaris platform, proceed to Step 6. Otherwise, proceed to step 9.

Step 6 If CNS NetFlow Collection Engine is already installed on the system, the pkgrm program prompts whether to remove the previously installed package. Enter y:

The following package is currently installed:

   CSCOnfc         Cisco CNS NetFlow Collection Engine
                   (Solaris2.8) 5.0 [standard image, build 23]

Do you want to remove this package? y

Step 7 The pkgadd program prompts whether to install the new package, to which you should press return (or specify all):

The following packages are available:
  1  CSCOnfc     Cisco CNS NetFlow Collection Engine
                 (Solaris2.8) 5.0 [standard image, build 2]

Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]:

Step 8 The pkgadd program also detects that certain files and directories remaining from the previous installation are no longer owned by a package and prompts whether to install the new files at that location. You should respond y:

The following files are already installed on the system and are being
used by another package:
* /opt/CSCOnfc/Data <attribute change only>
* /opt/CSCOnfc/config <attribute change only>
* /opt/CSCOnfc/logs <attribute change only>
* /opt/CSCOnfc/tomcat <attribute change only>
* /opt/CSCOnfc/tomcat/conf <attribute change only>

* - conflict with a file which does not belong to any package.

Do you want to install these conflicting files [y,n,?,q] y

Step 9 If a previous installation was detected, you are prompted whether to use old configuration files or to install new configuration files:

Please choose one of the following..

(1) Install new default configuration files
(Your existing configuration files have been saved in the 
config/old subdirectory should you want to refer to them later)

(2) Retain existing configuration files
(New default configuration files will be saved with '.default'
extensions should you want to refer to them later)

Please choose: 1

If option 1 is selected, previous files are kept in the NDC_DIR/config/old subdirectory as indicated. If option 2 is selected, new configuration files are saved with the .default suffix, and the previous installation's configuration files are retained.

a. When upgrading to CNS Netflow Collection Engine, Release 5.0 from version 4 or earlier, the previous configuration is not backwards compatible so this prompt is not displayed. A tool is provided to assist the user with migrating their previous configuration. See Appendix G, "CNS NetFlow Collection Engine Migration Tools."[link] for additional details.

b. When upgrading to CNS Netflow Collection Engine, Release 5.0.2 from version 5.0 or 5.0.1 and option 2 is selected, a migration script is run to automatically migrate minor changes in the XML configuration format for release 5.0.2. Before the migration, the following is displayed:

Preparing to migrate 5.0/5.0.1 configuration...

Please carefully note any instructions given during the migration
since some configuration options have changed in this release.

After the migration, the following is displayed:

Successfully migrated /opt/CSCOnfc/config/nfc-config.xml.
Please carefully note any instructions above regarding additional
configuration updates that might be needed.

In certain unusual cases, this can be preceded by additional information about a configuration incompatibility that cannot be resolved automatically. In that case, refer to details about configuration format updates introduced in CNS Netflow Collection Engine, Release 5.0.2 in the Release Notes for Cisco CNS NetFlow Collection Engine, 5.0.2.

Step 10 Ownership of all files under the install directory /opt/CSCOnfc is set to the user that was specified earlier; group ownership is set to that user's default group.

Setting file ownership...

Next, operating system-specific configuration is verified:

Checking platform config...

This includes verifying that the data segment size limit returned by ulimit -d is sufficient. If not, a warning message is displayed, and you should consult the platform system administration guide to determine how this value is updated. This value should be at least the maximum size specified for the collector process as described at [link to memory tuning section of customizing chapter].

Step 11 You are asked whether CNS Netflow Collection Engine should be started automatically when the system initializes:

Would you like NFC to be started when the system initializes? (y/n) y

If you respond y, the following rc scripts are created for autostarting CNS Netflow Collection Engine when the system initializes:

rcdir/init.d/csco_nfcd

rcdir/rc3.d/S999csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc2.d/K999csco_nfcd (symbolic link to ../init.d/csco_nfcd)

On Solaris, rcdir is /etc; on HP-UX it is /sbin.

The record of this installation session is saved in /opt/CSCOnfc/logs/nfc_install.log.


Note When CNS Netflow Collection Engine is uninstalled from the system, you must remove these files yourself after the uninstall completes.



Installing on a Red Hat Enterprise Linux Platform


Note When reinstalling the same or an earlier version of CNS Netflow Collection Engine than is currently installed on a Red Hat Enterprise Linux platform, you must first remove the currently-installed package by running rpm -e CSCOnfc.


To install CNS NetFlow Collection Engine Release 5.0 on a Red Hat Enterprise Linux platform, perform the following steps:


Note During an upgrade installation, existing configuration files and data files are detected and moved to the directories NFC_DIR/config/old and NFC_DIR/logs/old, respectively.



Step 1 Log into the host as root.

Step 2 Perform one of the following:

a. If installing from CD-ROM, run setup.sh in the CD-ROM base directory.

b. If downloading the image over the web:

Download the distribution file to a directory with as least 200 MB of available space.

Untar the distribution tar:

tar xf <download-file>

The following files are created:

NFC_setup.sh (the install script)

CSCOnfc-linux- <version>-<build>.<type>.i386.rpm (the install image)

Run the install script specifying the install image as the argument, for example:

./NFC_setup.sh CSCOnfc-linux-5.0-4.standard.i386.rpm


Note On Linux, the install image CSCOnfc-linux-<version>- <build>.<type>.i386.rpm is an RPM package file in the format recognized by the Red Hat RPM program



Note Software can only be installed in the directory /opt/CSCOnfc. If some other directory is desired, create a symbolic link to /opt/CSCOnfc before installing the software.


The following example illustrates these steps. The installation script is invoked while logged in as root.

#./NFC_setup.sh CSCOnfc-5.0-4.standard.i386.rpm 

Thu Mar 4 15:58:12 EST 2004
./NFC_setup.sh CSCOnfc-5.0-4.standard.i386.rpm

********************************************************************

CNS Netflow Collection Engine 5.0.2 [standard image, build 4]
Copyright (c) 2003-2005 by Cisco Systems, Inc.
All rights reserved.

This product contains cryptographic features and is subject to
United States and local country laws governing import, export,
transfer and use. Delivery of Cisco cryptographic products does
not imply third-party authority to import, export, distribute
or use encryption. Importers, exporters, distributors and users
are responsible for compliance with U.S. and local country laws.

By using this product you agree to comply with applicable laws
and regulations. If you are unable to comply with U.S. and local
laws, return this product immediately.

A summary of U.S. laws governing Cisco cryptographic products may be
found at: http://www.cisco.com/wwl/export/crypto/tool/stqrg.html

If you require further assistance please contact us by sending email
to export@cisco.com.

********************************************************************

Hit Return to continue...

Step 3 Press return when prompted after the banner page is displayed.

Step 4 The install script checks whether the CNS Netflow Collection Engine is already installed and verifies that the CNS Netflow Collection Engine is not running on the system:

Searching for existing copy of CSCOnfc..
Found previous copy of CSCOnfc, performing upgrade...

If the CNS Netflow Collection Engine is running, an error is indicated and the install is terminated. You must stop all NFC processes before attempting to install CNS NetFlow Collection Engine on a Red Hat Enterprise Linux platform.

If the CNS Netflow Collection Engine was already installed, all files under NFC_DIR/logs are automatically moved to the directory NFC_DIR/logs/old, and all files under NFC_DIR/config are moved to NFC_DIR/config/old.

Note that all output files under NFC_DIR/Data and all filesready files in the logs directory are preserved.

See Appendix G, "CNS NetFlow Collection Engine Migration Tools," of the Cisco CNS NetFlow Collection Engine User Guide for information on the CNS NetFlow Collection Engine Release 5.0 migration tool.


Note When upgrading to CNS Netflow Collection Engine, Release 5.0.2 from version 5.0 or 5.0.1, a migration script is run to automatically migrate minor changes in the XML configuration format for release 5.0.2. In certain unusual cases, additional information may be displayed in Step 7 below about a configuration incompatibility that cannot be resolved automatically. In that case, refer to details about configuration format updates introduced in CNS Netflow Collection Engine, Release 5.0.2 in the Release Notes for Cisco CNS NetFlow Collection Engine, 5.0.2.


Step 5 Unlike earlier releases of the CNS Netflow Collection Engine, programs are not installed with setuid-to-bin permission. As a result, you must select an existing userid as the owner of installed files and NFC processes:

Enter the existing user account that will run NetFlow Collector [nfcuser]: nfcuser

In this example, the nfcuser account was specified. If this account does not already exist on the system then it will be created with a password and group equal to the username.

File ownership is set to the specified user. Also, if the autostart option is selected later during the installation, the CNS Netflow Collection Engine processes are owned by this user when started at system initialization. Otherwise, the CNS Netflow Collection Engine must be started manually by this user; if not, the CNS Netflow Collection Engine will not have write permission for its files and directories.

Step 6 Specify whether the CNS Netflow Collection Engine should be started automatically when the system initializes:

Would you like the Flow Collector applications to be 
automatically started when the system is initialized?  (y/n)? y

If you respond y, the following rc scripts are created for autostarting CNS Netflow Collection Engine when the system initializes and autostopping at shutdown:

rcdir/init.d/csco_nfcd

rcdir/rc0.d/K99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc1.d/K99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc2.d/S99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc3.d/S99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc4.d/S99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc5.d/S99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

rcdir/rc6.d/K99csco_nfcd (symbolic link to ../init.d/csco_nfcd)

On Red Hat Enterprise Linux, rcdir is /etc/rc.d.


Note When CNS Netflow Collection Engine is uninstalled from the system, if you have modified any of these files you must remove them yourself after the uninstall completes.


Step 7 The operating system-specific configuration is verified:

Checking system tunable parameters ... 
Validation successful

This includes verifying that the data segment size limit returned by ulimit -d is sufficient. If not, a warning message is displayed, and you should consult the platform system administration guide to determine how this value is updated. This value should be at least the maximum size specified for the collector process as described in the "Tuning Memory Usage" section on page 4-26 in the Cisco CNS NetFlow Collection Engine User Guide.

The new package is then installed.

...Starting FlowCollector Install ....
FlowCollector installation completed successfully.

The record of this installation session is saved in /opt/CSCOnfc/logs/nfc_install.log.

Uninstalling CNS NetFlow Collection Engine 5.0

To uninstall and remove all files for CNS NetFlow Collection Engine Release 5.0, log in as root and run the following:

On a Solaris platform: pkgrm CSCOnfc

On an HP-UX platform: swremove CSCOnfc

On a Red Hat Enterprise Linux platform: rpm -e CSCOnfc

During installation, if you specified to automatically start CNS Netflow Collection Engine when the system initializes, remove the rcdir files described in Step 11 for installing on a Solaris or HP-UX platform, or in Step 6 for installing on a Red Hat Enterprise Linux platform.

Recursively remove the installation directory /opt/CSCOnfc and the files it contains.