: Install the Traps Agent for Linux
Focus
Focus

Install the Traps Agent for Linux

Table of Contents

Install the Traps Agent for Linux

Traps for Linux is designed to protect Linux servers and operates transparently in the background as a system process. After you install Traps for Linux, it is typically not necessary to interact with the Traps agent; however, to perform common actions, such as initiating a manual check in with the Traps Endpoint Security Manager, you can use the command-line utility (also available for Mac and Windows) named Cytool. Cytool is available in the /opt/traps/bin/cytool directory and must be run as root or with root permissions.
Before installing Traps on a Linux server, verify that the system meets the requirements described in Traps for Linux Requirements.
If you intend to use SELinux, make sure to enable it before you proceed with the Traps installation. This ensures that Traps disables any injection-based modules which cause compatibility issues. If you later enable SELinux, you must reinstall Traps to avoid any compatibility issues.
You can then install Traps using software distribution tools that support Linux such as Satellite or Chef, or you can manually install Traps using the following workflow:
  1. Download the Traps installation script from the ESM Console.
  2. Copy the installation package to the Linux server on which you want to install the Traps software.
    For example, to copy the file securely from a local machine to the Linux server:
    user@local ~
    $ scp Traps_Linux_installer_4.2.0.660.tar.gz root@ubuntu.example.com:/tmp 
    Traps_Linux_installer_4.2.0.660.tar.gz                     100%   21MB   1.2MB/s   00:18
    
  3. Log on to the Linux server and unpack the Traps software.
    user@local ~
    $ ssh root@ubuntu.example.com
    Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-1041-aws x86_64)
    
     * Documentation:  https://help.ubuntu.com
     * Management:     https://landscape.canonical.com
     * Support:        https://ubuntu.com/advantage
    
      Get cloud support with Ubuntu Advantage Cloud Guest:
        http://www.ubuntu.com/business/services/cloud
    
    0 packages can be updated.
    0 updates are security updates.
    
    
    Last login: Tue Dec 26 22:14:15 2017 from 192.168.1.100
    root@ubuntu:/$ cd /tmp
    root@ubuntu:/tmp$ tar -xzf Traps_Linux_installer_4.2.0.660.tar.gz 
    root@ubuntu:/tmp$ ls
    Servers.xml
    traps-installer.sh
    traps_linux-4.2.0.660.sh
    Traps_Linux_installer_4.2.0.660.tar.gz
    The software package contains several scripts that are needed for the installation. Use the traps-installer.sh script as described in the following step and ensure that you run the script from the same folder as the other files.
  4. Run the install script (traps-installer.sh) as root or with root permissions.
    For example:
    root@ubuntu:/tmp$ ./traps-installer.sh
    Starting Traps for Linux installer with the following params:
    traps_version: 4.2.0.660
    installer_path: /tmp/traps_linux-4.2.0.660.sh
    servers_xml_path: /tmp/Servers.xml
    
    Verifying archive integrity...  100%   All good.
    Uncompressing Traps traps_installer installer  100%
    [1] Checking prerequisites
    Verifying Debian (dpkg) packages:
      * openssl ... OK
      * ca-certificates ... OK
    Done
    [2] Installing Traps at /opt/traps
    Done
    [3] Creating logger directory
    Done
    [4] Installing AppArmor policies
    Done
    [5] Defining Traps local services (systemd)
    Created symlink from /etc/systemd/system/multi-user.target.wants/traps_trapsd.service to /etc/systemd/system/traps_trapsd.service.
    Created symlink from /etc/systemd/system/multi-user.target.wants/traps_pmd.service to /etc/systemd/system/traps_pmd.service.
    Created symlink from /etc/systemd/system/multi-user.target.wants/traps_authorized.service to /etc/systemd/system/traps_authorized.service.
    Done
    [6] Starting Traps security services
    Done
    
    The script installs the files for the Traps app for Linux in the /opt/traps folder with the Cytool utility available at /opt/traps/bin/cytool.
    After the Traps agent successfully connects to the server for the first time and retrieves a valid license, the agent begins protecting the Linux server.