======================================================================
   NEC ESMPRO Agent Ver.4.5
   Installation Guide (Linux)                 SA45_E-IG-L-011-02-010
----------------------------------------------------------------------
[ Software name ]  NEC ESMPRO Agent (for Linux)
[ Version ] 4.5.20-1 or later
[ Copyright (C) ]  NEC Corporation
[ Applicable models ] NEC Express5800 Server Series
                      NEC NX7700x Server Series
[ Users ]  Customers who use NEC ESMPRO Agent (for Linux)
[ Software type ]  Application software

======================================================================

----------------------------------------------------------------------
User license agreement for NEC software
----------------------------------------------------------------------
  This user license agreement is an agreement between you and the NEC 
  Corporation (hereinafter referred to as NEC). Under the following 
  terms of agreement, NEC grants you the right to utilize this 
  software program (hereinafter referred to as "licensed program"), 
  but the customer will be bound to these to the terms.
  NEC will not be held liable for the use, installation, or the 
  results of the use of the licensed program. In addition, the source 
  code that GNU Lesser General Public License (LGPL) or Berkeley 
  Software Distribution License (BSD) was applied to obeys an 
  agreement of LGPL.

1.Terms
 (1)This user license agreement takes effect from the day the 
    software product is received by the user.
 (2)You may terminate your rights to use the licensed program under 
    this user license agreement at any time, by notifying NEC, in 
    writing, at least one month or longer prior to the requested date 
    of termination.
 (3)NEC reserves the right to terminate this license agreement if you 
    violate any of the provisions in this agreement.
 (4)Your rights to use the licensed program will continue until it is 
    terminated in accordance with the provisions stated in this 
    license agreement.
 (5)If the agreement is terminated for any reason by either party, 
    you are required to destroy the software, copies of the software 
    and its manuals and media, or return them to NEC immediately.

2.Usage right
  You may use the licensed program only on [ Applicable models ] 
  mentioned above using your Linux OS.

3.Copying, altering, and combining of the licensed program
 (1)You are granted the permission to create on copy of the licensed 
    program to use as a backup in case the program data becomes lost, 
    damaged or destroyed.
    Once the licensed program is loaded into memory on a PC, a copy 
    of the program may be stored only as backup incase the fixed 
    memory of the PC becomes damaged or lost.
 (2)The copyrights and license agreement must be attached to all 
    copies of the licensed program.
 (3)Unless otherwise specified in this user license agreement, you 
    may not use, copy, alter the licensed program or combine it with 
    another module. It may not reproduced in any publications or 
    networks. The handling of the licensed program and/or documents 
    must strictly follow the terms and conditions of this license 
    agreement, and at no time shall it be handled in any other terms.
 (4)All related documents (e.g., manuals) provided with the licensed 
    program may not be copied, altered or reproduced in any 
    publications or networks, under any circumstances.
 (5)This user license agreement does not transfer the intellectual 
    property of the licensed program to the user.

4.Transfer of the licensed program
 (1)All rights of this license agreement may be transferred to 
    another party ONLY when the following conditions are satisfied:
  (a) All materials including the licensed program, all copies of the 
      licensed program, this license agreement, and all other related 
      documents are transferred to the other party, and no material 
      concerning the licensed program is retained by you.
  (b) The recipient party agrees to conform to the terms of this user 
      license agreement.
 (2)Unless otherwise specified in this user license agreement, the 
    licensed program or rights for its use may not be transferred to 
    a third party.
    All matters concerning the transferring of the rights and program 
    must strictly follow the terms and conditions included in this 
    license agreement.

5.Decompilation
  You may not reverse engineer, decompile, or disassemble the 
  licensed program.

6.Term of a guarantee
 (1)NEC makes no warranties, expressed or implied concerning this 
    licensed program, and will at no time, be held liable to pay for 
    any expenses which may be incurred, should a problem result from 
    the use of the licensed program.
 (2)Regardless of the terms stated above in term (1), upon correction 
    of the licensed program errors (bugs), NEC may, at its own 
    discretion, release an update patch for error-correction 
    (hereinafter referred to as modification program), or 
    information, including NEC approved method of error correction.
    The modification program provided to you will be regarded as the 
    licensed program, and will follow the terms and conditions of 
    this license agreement.

7.No liability
  In no event shall NEC be held responsible for any indirect, direct 
  or consequential damages (including damages which NEC can or can 
  not foresee) which may be claimed to you by a third party.

8.Others
  The user must agree that any disputes concerning this user license 
  agreement will be settled at the Tokyo district court as the 
  exclusively appointed court.

----------------------------------------------------------------------
Trademarks
----------------------------------------------------------------------
  Linux is a trademark or registered trademark of Linus Torvalds in 
  Japan and other countries.
  Red Hat and Red Hat Enterprise Linux are trademarks or registered 
  trademarks of Red Hat, Inc. in the United States and other 
  countries.

  All other product, brand, or trade names used in this publication 
  are the trademarks or registered trademarks of their respective 
  trademark owners.
  (TM) or (R) mark is not specified in this document.

----------------------------------------------------------------------
Open-source software
----------------------------------------------------------------------
  Software consented to based on following license is included in 
  this product.
  GNU LESSER General Public License(LGPL)
    libesmtp.dll is included in Esmpro-Express package. You can 
    download the source code of libesmtp.dll.
  Net-SNMP
    ntagent is included in Esmpro-common package.
    ntpass.so is included in Esmpro-common package.
    libutil.so is included in Esmpro-common package.
  MD5
    amrpop.dll is included in Esmpro-Express package.
  OpenSSL
    libcrypto.so is included in Esmpro-Express package.

  Software consented to based on following license is not included in 
  this product, but use a funtcion.
  OpenSSL
    amrset.dll included in Esmpro-common package uses libcrypto.so of 
    openssl-devel package.

  Refer to "Open-source software that NEC ESMPRO Agent for Linux 
  uses" showing in the next website.
    http://www.express.nec.co.jp/linux/dload/esmpro/esm/private/license_en.html

----------------------------------------------------------------------
Summary
----------------------------------------------------------------------
  Chapter 1 Software introduction
  Chapter 2 Preparation before installation
            1)Checks of necessary packages
            2)Setting of snmpd.conf
            3)Setting of snmpd
            4)Setting of rpcbind or portmap
            5)Setting of driver
  Chapter 3 Installation or Upgrade
  Chapter 4 Preparation after installation
            1)Setting of access control
            2)Setting of SELinux
            3)Setting of Manager(SNMP)
            4)Setting of Express Report Service
  Chapter 5 Uninstallation

----------------------------------------------------------------------
Chapter 1 Software introduction
----------------------------------------------------------------------
  ESMPRO Agent is used with ESMPRO Manager which offers a management 
  function. ESMPRO Agent offers the function of management of server 
  operating statuses, prevention of server failures and surveillance 
  of server failures.

  Carefully read the following user license agreement for NEC 
  software before using this software. If you do not agree to the 
  terms of the agreement, do not download this software. By 
  downloading this software, you agree to be bound by the terms of 
  the agreement.

----------------------------------------------------------------------
Chapter 2 Preparation before installation
----------------------------------------------------------------------
  When it upgrade NEC ESMPRO Agent, this chapter is not necessary.
  Log in to the system as the root user when you set this chapter.

  1)Checks of necessary packages
    The following packages are needed to use NEC ESMPRO Agent. All 
    the packages are installed upon OS installation. If there are 
    any packages which are not installed, install them.

    The package installed by minimal does not list it.

    When the packages exists according to the architecture, it 
    install the packages of the architecture same as environment 
    installing NEC ESMPRO Agent. The RPM package name is named by 
    the following rules.
      <package name>-<version>-<number of release>.<architecture>.rpm

    Because there is dependence in a package, install it in higher 
    group order (Grp1 -> Grp2 -> Grp3).

    (*1) For interdependence, you appoint RPM package file at the 
         same time, and install it.
           # rpm -ivh *.rpm
    (*2) Install it if you use OpenIPMI.

    < Red Hat Enterprise Linux 7 >
    
    Grp1  lm_sensors-libs               perl-parent             (*1)
          net-snmp-libs                 perl-PathTools          (*1)
          OpenIPMI-modalias       (*2)  perl-Pod-Escapes        (*1)
          perl                    (*1)  perl-podlators          (*1)
          perl-Carp               (*1)  perl-Pod-Perldoc        (*1)
          perl-constant           (*1)  perl-Pod-Simple         (*1)
          perl-Encode             (*1)  perl-Pod-Usage          (*1)
          perl-Exporter           (*1)  perl-Scalar-List-Utils  (*1)
          perl-File-Path          (*1)  perl-Socket             (*1)
          perl-File-Temp          (*1)  perl-Storable           (*1)
          perl-Filter             (*1)  perl-Text-ParseWords    (*1)
          perl-Getopt-Long        (*1)  perl-threads            (*1)
          perl-HTTP-Tiny          (*1)  perl-threads-shared     (*1)
          perl-libs               (*1)  perl-Time-HiRes         (*1)
          perl-macros             (*1)  perl-Time-Local         (*1)
    ------------------------------------------------------------------
    Grp2  libtirpc                      OpenIPMI-libs           (*2)
          net-snmp-agent-libs           perl-Data-Dumper
    ------------------------------------------------------------------
    Grp3  net-snmp                      OpenIPMI                (*2)
          net-snmp-utils                rpcbind
    ==================================================================

    < Red Hat Enterprise Linux 6 / Oracle Linux 6 >
    
    Grp1  libgssglue                    perl-Module-Pluggable   (*1)
          lm_sensors-libs               perl-Pod-Escapes        (*1)
          perl                    (*1)  perl-Pod-Simple         (*1)
          perl-libs               (*1)  perl-version            (*1)
    ------------------------------------------------------------------
    Grp2  libtirpc                      OpenIPMI-libs           (*2)
          net-snmp-libs
    ------------------------------------------------------------------
    Grp3  compat-libstdc++-296   (x86)  net-snmp-utils
          compat-libstdc++-33 (x86_64)  OpenIPMI                (*2)
          dmidecode                (*)  rpcbind
          net-snmp
    ==================================================================
    (*)compat-libstdc++-296 and compat-libstdc++-33 are different in 
       a package to install by the architecture.
    (*)Minimal of Oracle Linux 6, dmidecode is not installed.

    < Red Hat Enterprise Linux 5 >
    
    Grp1  perl
    ------------------------------------------------------------------
    Grp2  lm_sensors                    OpenIPMI-libs           (*2)
          net-snmp-libs                 tcp_wrappers
    ------------------------------------------------------------------
    Grp3  compat-libstdc++-296   (x86)  net-snmp-utils
          compat-libstdc++-33 (x86_64)  OpenIPMI                (*2)
          net-snmp                      portmap
    ==================================================================
    (*)compat-libstdc++-296 and compat-libstdc++-33 are different in 
       a package to install by the architecture.

    < SUSE Linux Enterprise Server 11 SP3 without Xen EM64T >
    
    Grp1  libsensors3                   snmp-mibs
          slang
    ------------------------------------------------------------------
    Grp2  libnewt0_52                   perl-SNMP               (*1)
          libsnmp15                     perl-TermReadKey
          net-snmp                (*1)
    ------------------------------------------------------------------
    Grp3  OpenIPMI                (*2)  newt
    ==================================================================

    < SUSE Linux Enterprise Server 11 SP2 without Xen EM64T >
    
    Grp1  xorg-x11-libICE         (*2)  xorg-x11-libXau         (*2)
          xorg-x11-libSM          (*2)  xorg-x11-libxcb         (*2)
          xorg-x11-libX11         (*2)
    ------------------------------------------------------------------
    Grp2  xorg-x11-libXext        (*2)  xorg-x11-libXt          (*2)
          xorg-x11-libXp          (*2)
    ------------------------------------------------------------------
    Grp3  fontconfig              (*2)  xorg-x11-libXpm         (*2)
          xorg-x11-libfontenc     (*2)  xorg-x11-libXprintUtil  (*2)
          xorg-x11-libXfixes      (*2)  xorg-x11-libXrender     (*2)
          xorg-x11-libxkbfile     (*2)  xorg-x11-libXv          (*2)
          xorg-x11-libXmu         (*2)
    ------------------------------------------------------------------
    Grp4  tcl                     (*2)  xorg-x11-libs           (*2)
    ------------------------------------------------------------------
    Grp5  sysfsutils                    tk                      (*2)
    ------------------------------------------------------------------
    Grp6  blt                     (*2)  slang
          libsensors3                   snmp-mibs
          libsnmp15
    ------------------------------------------------------------------
    Grp7  libnewt0_52                   perl-TermReadKey
          net-snmp                (*1)  python-tk               (*2)
          perl-SNMP               (*1)
    ------------------------------------------------------------------
    Grp8  OpenIPMI                (*2)  newt
    ==================================================================

  2)Setting of snmpd.conf
    Modify the environment setting file of snmpd (/etc/snmp/snmpd.conf) 
    to set a community privilege to "READ WRITE".
      dlmod ntpass /opt/nec/esmpro_sa/lib/ntpass.so
      ntpass .1.3.6.1.4.1.119.2.2.4.4          (ESMPRO MIB)
      ntpass .1.3.6.1.2.1.10.7                 (Ethernet Like MIB)

    Edit the environment setting file using vi commands, etc. For 
    details of the settings, see the online manual for snmpd.conf.

    "READ WRITE" gives authority to the following setting for all 
    MIB of community (public) of the existing set price.

    (Example 1)
      ####
      # Third, create a view for us to let the group have rights to:
      #       name           incl/excl     subtree         mask(optional)
      #view    systemview    included   .1.3.6.1.2.1.1
      #view    systemview    included   .1.3.6.1.2.1.25.1.1
      view    all            included      .1              80

      ####
      # Finally, grant the group read-only access to the systemview view.
      #       group       context sec.model sec.level prefix read   write  notif
      #access notConfigGroup ""   any       noauth    exact systemview none none
      access  notConfigGroup ""   any       noauth    exact  all    all    none

    (Example 2)
      # These really aren't meant for production use.  They include all MIBS
      # and can use considerable resources.  See snmpd.conf(5) for information
      # on setting up groups and limiting MIBS.
      #rocommunity public 127.0.0.1
      rwcommunity public default

    About the details of setting, refer to Help of the snmpd.conf.
    Carry out the following commands to confirm a help of snmpd.conf.
      # man snmpd.conf

  3)Setting of snmpd
    [ Except Red Hat Enterprise Linux 7. ]
      Check that runlevel 3, 5 of snmpd is on.
        # /sbin/chkconfig --list snmpd
        snmpd        0:off  1:off  2:off  3:on   4:off  5:on   6:off
                                          ^^^^          ^^^^
      - In the case of on, it is not necessary to change setting of 
        snmpd.

      - In the case of off, change setting of snmpd, and start the 
        snmpd.
          # /sbin/chkconfig --level 35 snmpd on
          # /etc/init.d/snmpd start

    [ Red Hat Enterprise Linux 7. ]
      Check that status of snmpd.
        # systemctl is-enabled snmpd.service
        enabled

      - In the case of enabled, it is not necessary to change 
        setting of snmpd.

      - In the case of disabled, change setting of snmpd, and 
        start the snmpd.
          # systemctl enable snmpd.service
          ln -s '/usr/lib/systemd/system/snmpd.service' '/etc/systemd/system/multi-user.target.wants/snmpd.service'
          # systemctl start snmpd.service

  4)Setting of rpcbind or portmap
    When setting of rpcbind is not displayed, you read it in portmap 
    and confirm it.
    The OS that uses rpcbind : Red Hat Enterprise Linux 7
                               Red Hat Enterprise Linux 6
                               Oracle Linux 6
                               SUSE Linux Enterprise Server 11

    [ Except Red Hat Enterprise Linux 7. ]
      Check that runlevel 3, 5 of rpcbind is on.
        # /sbin/chkconfig --list rpcbind
        rpcbind      0:off  1:off  2:off  3:on   4:off  5:on   6:off
                                          ^^^^          ^^^^
      - In the case of on, it is not necessary to change setting of 
        rpcbind.

      - In the case of off, change setting of rpcbind, and start the 
        rpcbind.
          # /sbin/chkconfig --level 35 rpcbind on
          # /etc/init.d/rpcbind start

    [ Red Hat Enterprise Linux 7. ]
      The procedure of rpcbind is unnecessary.

  5)Setting of driver
    Installation of Server Management driver (svmdrv) or Setting of 
    OpenIPMI.

    < Case of Server Management driver >
      See install.txt included in svmdrv-(version).tgz

    < Case of OpenIPMI >
      [ Except Red Hat Enterprise Linux 7. ]
        Check that runlevel 3, 5 of ipmi is on.
          # /sbin/chkconfig --list ipmi
          ipmi        0:off  1:off  2:off  3:on   4:off  5:on   6:off
                                           ^^^^          ^^^^
        - In the case of on, it is not necessary to change setting of 
          ipmi.

        - In the case of off, change setting of ipmi, and restart the 
          system.
            # /sbin/chkconfig --level 35 ipmi on
            # reboot

      [ Red Hat Enterprise Linux 7. ]
        Check that status of ipmi.
          # systemctl is-enabled ipmi.service
          enabled

        - In the case of enabled, it is not necessary to change 
          setting of ipmi.

        - In the case of disabled, change setting of ipmi, and
          restart the system.
            # systemctl enable ipmi.service
            ln -s '/usr/lib/systemd/system/ipmi.service' '/etc/systemd/system/multi-user.target.wants/ipmi.service'
            # reboot

----------------------------------------------------------------------
Chapter 3 Installation or Upgrade
----------------------------------------------------------------------
  This chapter describes installation or upgrade procedure of NEC 
  ESMPRO Agent. When it upgrade from NEC ESMPRO Agent, you change 
  the argument of procedure 2) to "-Uvh".

   1. Log in to the system as the root user.

   2. Execute the following command to install the NEC ESMPRO Agent.
        # rpm -ivh Esmpro-*

   3. Execute the following command to restart the system:
        # reboot

----------------------------------------------------------------------
Chapter 4 Preparation after installation
----------------------------------------------------------------------
  When it upgrade NEC ESMPRO Agent, this chapter is not necessary.
  Log in to the system as the root user when you set this chapter.

  1)Setting of access control
    NEC ESMPRO Manager and Agent use the following ports. If a 
    firewall is placed between Manager and Agent, or if the firewall 
    is enabled on your system, open the following ports. Refer to the 
    following files for the port range.
      /proc/sys/net/ipv4/ip_local_port_range

        Tips  When you use an opening example of the port using 
              iptables, installation of iptables and 
              iptables-services (RHEL7) are necessary beforehand.

    - Between Manager and Agent
      --------------------------+------------------------+------------
      Function                  |  Agent        Manager  | Note
      --------------------------+------------------------+------------
      Server Monitoring (SNMP)  |  161/udp  <-  161/udp  | snmp
      Report to Manager (SNMP)  |           ->           |
      --------------------------+------------------------+------------
      Report to Manager (SNMP)  | Auto-     ->  162/udp  | snmp-trap
                                | assignment             |
      --------------------------+------------------------+------------
      Report to Manager         | Auto-     -> 31134/tcp |
      (TCP/IP in Band,          | assignment             |
            TCP/IP Out-of-Band) |           <-           |
      --------------------------+------------------------+------------
      Express Report Service    | Auto-     -> 31136/tcp |
      (Via Manager)             | assignment             |
                                |           <-           |
      --------------------------+------------------------+------------
      Express Report Service    | Auto-     -> 31138/tcp |
      (HTTPS Via Forward        | assignment             |
                       Manager) |           <-           |
      --------------------------+------------------------+-------------
      * The upper direction shows the direction at start-up, and the 
        lower shows the return.
      * The port number to use other than SNMP sets it than Report 
        Setting screen.
      * The open examples of the port using iptables are as follows.
          # iptables -I INPUT  -p udp --dport 161 -s <IP Addres of Manager> -j ACCEPT
          # iptables -I OUTPUT -p udp --dport 161 -j ACCEPT
          # iptables -I OUTPUT -p udp --dport 162 -j ACCEPT
          # iptables -I OUTPUT -p tcp --dport 31134 -j ACCEPT
          # iptables -I OUTPUT -p tcp --dport 31136 -j ACCEPT
          # iptables -I OUTPUT -p tcp --dport 31138 -j ACCEPT
          # service iptables save

    - Between Mail Server and Agent
      --------------------------+------------------------+------------
      Function                  |  Agent        Manager  | Note
      --------------------------+------------------------+------------
      Express Report Service    | Auto-     ->   25/tcp  | smtp
      (Internet Mail)           | assignment             |
                                |------------------------+------------
                                | Auto-     ->  110/tcp  | pop3
                                | assignment             |
      --------------------------+------------------------+-------------
      * The upper direction shows the direction at start-up, and the 
        lower shows the return.
      * You can change the port to use than Report Setting.
      * The open examples of the port using iptables are as follows.
          # iptables -I OUTPUT -p tcp --dport 25 -j ACCEPT
          # iptables -I OUTPUT -p tcp --dport 110 -j ACCEPT
          # service iptables save

    - Between HTTPS Server and Agent
      --------------------------+------------------------+------------
      Function                  |  Agent        Manager  | Note
      --------------------------+------------------------+------------
      Express Report Service    | Auto-     ->  443/tcp  | https
      (HTTPS)                   | assignment             |
      --------------------------+------------------------+-------------
      * The upper direction shows the direction at start-up, and the 
        lower shows the return.
      * You can change the port to use than Report Setting.
      * The open examples of the port using iptables are as follows.
          # iptables -I OUTPUT -p tcp --dport 443 -j ACCEPT
          # service iptables save

    NEC ESMPRO Agent uses the following ports in local host.
    When it does access-limit setting using iptables or TCP Wrapper, 
    it admits the access to these.

    - Agent uses internal ports
      --------------------------+------------------------
      Function                  | Port
      --------------------------+------------------------
      rpcbind or portmap        | 111/tcp
                                | 111/udp
      --------------------------+------------------------
      NEC ESMPRO Agent          | Auto-assignment
      --------------------------+------------------------

  2)Setting of SELinux
    If setting of SELinux is not "Disabled", change to "Disabled".

     1. Log in to the system as the root user.

     2. Confirm current setting of SELinux.

        - Case of disabled, displayed as follows.
            # getenforce
            Disabled

        - Case of enable, displayed as follows.
           # getenforce
           Enforcing

        - Case of displayed to warning, displayed as follows.
            # getenforce
            Permissive

    In the case of enabled, execute the following command:

     3. It open /etc/sysconfig/selinux by an editor and and look for 
        the following lines.
          SELINUX=<current setting>

     4. It edit the line mentioned above and save a file.
        - Case of Disabled, edit as follows.
            SELINUX=disabled
        - Case of Enforcing, edit as follows.
            SELINUX=enforcing
        - Case of Permissive, edit as follows.
            SELINUX=permissive

     5. Restart the system.
          # reboot

  3)Setting of Manager(SNMP)
    It is necessary to set report means in "Report Setting" to report 
    it from NEC ESMPRO Agent to NEC ESMPRO Manager after having 
    reboot a system. Refer to NEC ESMPRO Agent Users Guide for the 
    setting method of other report means.

     1. Log in to the system as the root user.

     2. Move to the directory where ESMamsadm is stored.
          # cd /opt/nec/esmpro_sa/bin/

     3. Start Control Panel (ESMamsadm).
          # ./ESMamsadm
        [Report Setting] screen is displayed.

     4. Select "Base Setting" of "Report Setting".
        [Base Setting] screen is displayed.

     5. Select "Manager(SNMP)" of "Base Setting".
        [SNMP Trap Setting] screen is displayed.

     6. Select <add>. Input IP address.

     7. Select [ok]. [SNMP Trap Setting] screen is closed.

     8. Select [close]. [Base Setting] screen is closed.

     9. Select [close]. [Report Setting] screen is closed.

  4)Setting of Express Report Service

    When Express Report Service is introduced, refer to Express 
    Report Service Setup Guide (Linux/VMware).

----------------------------------------------------------------------
Chapter 5 Uninstallation
----------------------------------------------------------------------
  This chapter describes uninstallation procedure of NEC ESMPRO Agent.

   1. Log in to the system as the root user.

   2. Execute the following command to uninstall the NEC ESMPRO Agent:
        # rpm -e Esmpro-type3    or    # rpm -e Esmpro-type1
        # rpm -e Esmpro-Express
        # rpm -e Esmpro-common

   3. Execute the following command to restart the system:
        # reboot

----------------------------------------------------------------------
                                        Copyright NEC Corporation 2016
