Installing Anzo

This topic provides instructions for installing Anzo as a non-root user. The tasks below guide you through creating a service user and then installing and running Anzo as that user. For information about system requirements, see Anzo Requirements.

Note: If your organization will use Anzo Unstructured with Elasticsearch to onboard unstructured data, it is especially important to install and run Anzo as a non-root user. Elasticsearch cannot be run by a root user, but it must have access to the data that Anzo writes on the shared file store. When Anzo is run as root the data that it generates is owned by root and Elasticsearch cannot access it.

  1. Create an Anzo User and Installation Directory
  2. Install and Configure Anzo
  3. Post Installation Configuration

Create an Anzo User and Installation Directory

Follow the instructions below to add an Anzo service user, create the Anzo installation directory, and change ownership of the installation directory to the service user.

Note: Root user privileges are required to complete this task.

  1. As the root user on the Anzo host server, run the following command to create an Anzo installation directory.
    # mkdir -p /path/directory

    Where path is the location of the directory, and directory is the new directory name to create. The default Anzo installation directory is /opt/Anzo. For example:

    # mkdir -p /opt/Anzo
  2. Run the following command to add a new Anzo service user:
    # useradd name

    Where name is the username to create. For example the command below adds a user named anzo:

    # useradd anzo
  3. Run the following command to set a password for the user:
    # passwd name

    Where name is the name of the user that you added. Follow the prompts to set the password.

  4. Run the following command to change ownership of the Anzo installation directory to the new service user and group:
    # chown name:name /path/directory

    Where name is the new username and /path/directory is the path and directory name of the installation directory. For example:

    # chown anzo:anzo /opt/Anzo

Install and Configure Anzo

Follow the instructions below to install Anzo. These instructions assume that you have copied the Anzo installation script to the server.

Important: Complete the steps below as the service user that you created in Create an Anzo User and Installation Directory.

  1. If necessary, run the following command to become the Anzo service user:
    # su name

    Where name is the name of the service user. For example:

    # su anzo
  2. If necessary, run the following command to make the Anzo installation script executable:
    chmod +x script_name
  3. Run the following command to start the installation wizard:
    ./script_name

    The script unpacks the JRE and then waits for input before starting the installation.

  4. Press Enter to start the installation.
  5. Review the software license agreement. Press Enter to scroll through the terms. At the end of the agreement, type 1 to accept the terms or type 2 to disagree and stop the installation.
  6. Specify the components to install. Item 1 is the Anzo server; item 2 is the Anzo command line client. To install both components, accept the default value by pressing Enter. Or type 1 to install only the server or 2 to install only the command line client, then press Enter.
  7. Specify the installation directory. Type the path and directory that you created in Create an Anzo User and Installation Directory and press Enter. Since the installation directory was previously created, the installer notifies you that the directory exists and asks you confirm that you want to install in that location. Press Enter for yes.
  8. Indicate whether you want the installer to create symlinks. Press Enter for yes or type n and press Enter for no.
  9. If you chose to let the installer create symlinks, specify the directory to create the symlinks in. Press Enter to accept the default path or type an alternate path and then press Enter.
  10. Specify the maximum amount of memory (in MB) that the server can use and then press Enter. The installation wizard lists the total RAM available. To meet the minimum memory requirement, the wizard chooses 1/4 of the total memory as the default value. Cambridge Semantics recommends that you allocate at least 1/2 of the total memory to Anzo.

    The wizard installs the components that you selected and then asks if you want to start the Anzo services.

  11. Press Enter to start the Anzo services. When prompted, open a browser and go to the following URL to open the license administration wizard.
    http://Anzo_server:8945/

    Where Anzo_server is the Anzo server DNS name or IP address. The License Key Information screen appears.

  12. Paste your license key into the box provided and then click Next. If necessary, you can obtain the license key by clicking Retrieve your license key and logging in to your Cambridge Semantics account.
  13. The wizard displays your license details. Review the details and then click Next. The wizard displays the System Configuration screen.

  14. Specify the user ID and password for the system administrator. The default system user ID is sysadmin. You can click Advanced Configuration to view the advanced Storage Directory setting. This setting configures the binary store location. By default Anzo stores binary data in /opt/Anzo/Server/data. You can change the location by typing a new path and directory.
  15. Click Finish. The wizard starts configures and restarts the server. The process may take several minutes. Once the server is running, the browser displays the Anzo login screen. Before logging in, there is one more configuration step to complete. Some of the Anzo services will not have started properly because they could not bind to the default HTTP/S ports. The default Anzo HTTP port is 80 and the HTTPS port is 443. Since non-root users cannot access ports below 1000, Anzo services will not be able to access the default ports when Anzo is run by the new service user. The Anzo port settings need to be changed to the non-root ports 8080 and 8443:
    1. On the Anzo server, run the following command to make an SSH connection to the Anzo Command Console as the sysadmin user:
      ssh sysadmin@localhost -p 8022
    2. When prompted, specify the password for the sysadmin user and log in to the Anzo OSGI Command Console.
    3. At the OSGI prompt, run the commands below, followed by exit to exit the console:
      osgi> httpPort 8080
      osgi> httpsPort 8443
      osgi> exit
  16. Run the following command to restart Anzo and complete the port configuration:
    ./install_path/Anzo_root_dir/Server/AnzoServer restart
  17. When Anzo starts, open the Anzo user interface by going to the following URL in your browser:
    https://hostname

    Where hostname is the Anzo server DNS name or IP address.

Post Installation Configuration

This section provides instructions for completing post-installation tasks.

Route Anzo HTTP/S Ports to Non-Root Ports for User Access

This section provides instructions for configuring the firewall to forward HTTP requests to port 8080 and HTTPS requests to port 8443 so that users can access Anzo without having to specify the new HTTP/S ports.

Note: Root user privileges are required to complete this task.

To re-route Anzo ports using the iptables interface

Run the following commands to route the Anzo ports via the iptables interface:

# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080
# iptables -A PREROUTING -t nat -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8443
# iptables-save > /etc/sysconfig/iptables

To re-route Anzo ports using the firewalld interface

Run the following commands to route the Anzo ports via the firewalld interface:

# firewall-cmd --add-port=80/tcp --permanent
# firewall-cmd --add-port=443/tcp --permanent
# firewall-cmd --add-forward-port=port=80:proto=tcp:toaddr=127.0.0.1:toport=8080 --permanent # firewall-cmd --add-forward-port=port=443:proto=tcp:toaddr=127.0.0.1:toport=8443 --permanent # firewall-cmd --reload

Change the Local Spark Engine Callback URL to the Non-Root Port

If you plan to use the pre-configured local Anzo Spark ETL engine to run pipelines, the callback URL for the engine must be configured to bind to the new Anzo HTTP port. Follow the instructions below to change the callback URL.

  1. In the Anzo console, expand the Administration menu and click ETL Engine Config.
  2. On the ETL Engine Config screen, click the Local Spark Engine to view the configuration details for the engine.
  3. Click the Run tab. Anzo displays the Run screen. For example:

  4. At the bottom of the screen, click the edit icon () next to the Callback URL field. Then edit the callback URL value to specify the HTTP port at the end of the IP address. For example:

  5. Click the check mark icon () to save the change.

Configure an Anzo Service Manager

Cambridge Semantics recommends that you configure an Anzo service for starting Anzo automatically as the service user. Follow the instructions below to implement the service.

Note: Root user privileges are required to complete this task.

  1. Create a file called anzo-server.service in the /usr/lib/systemd/system directory. For example:
    # vi /usr/lib/systemd/system/anzo-server.service
  2. Add the following contents to anzo-server.service:
    [Unit]
    Description=Service for Anzo server.
    After=syslog.target network.target local-fs.target remote-fs.target nss-lookup.target
    [Service]
    Type=simple
    RemainAfterExit=yes
    ExecStart=/install_path/Server/AnzoServer start
    ExecStop=/install_path/Server/AnzoServer stop
    User=service_user_name
    Group=service_user_name
    [Install]
    WantedBy=default.target

    Where install_path is the installation path and directory and service_user_name is the name of the service user that you created in Create an Anzo User and Installation Directory above. For example:

    [Unit]
    Description=Service for Anzo server.
    After=syslog.target network.target local-fs.target remote-fs.target nss-lookup.target
    [Service]
    Type=simple
    RemainAfterExit=yes
    ExecStart/opt/Anzo/Server/AnzoServer start
    ExecStop=/opt/Anzo/Server/AnzoServer stop
    User=anzo
    Group=anzo
    [Install]
    WantedBy=default.target
  3. Save and close the file, and then run the following commands to start and enable the new service:
    # systemctl start anzo-server.service
    # systemctl enable anzo-server.service

    The client displays a message such as the following:

    Created symlink from /etc/systemd/system/default.target.wants/anzo-server.service to
    /usr/lib/systemd/system/anzo-server.service.

Once the service is in place, Anzo should be stopped and started via systemctl. For example, systemctl stop anzo-server and systemctl start anzo-server.

See the Getting Started Guide for an introduction to the user interface, basic setup, and instructions for building a sample solution from scratch.

Related Topics