Skip to main content
Loading

Install on Red Hat Enterprise Linux

caution

Aerospike Database is not supported on systems with SELinux in Enforcing mode. If you are using SELinux, it must be permanently disabled or permanently set to Permissive mode. See the RHEL documentation for more information.

Follow these steps to install Aerospike Database on Red Hat Enterprise Linux (RHEL), and on el8, el9, and compatible variants, such as CentOS, Rocky Linux, Amazon Linux, and Oracle Linux.

Assumed skills

These instructions assume that you have the following skills or understanding:

  • Familiarity with the Linux operating system you are installing on.
  • Shell commands like wget or apt-get, tar, and editors.
  • TCP/IP networking.

Prerequisites

  • SELinux must be permanently disabled or permanently set to Permissive mode.
  • For RHEL 8 (Server 5.7 and later), if you are running a non-standard version of the OS, such as a "stripped down" version to eliminate certain packages for security, Aerospike Enterprise Edition (EE) has certain dependencies that must be satisfied before installation. Refer to CentOS 8 package dependencies.
  • Support for CentOS 7 was removed in server 7.0. For CentOS, the Aerospike installation files are built with OpenSSL version 1.02. Aerospike will fail on earlier versions of OpenSSL.
  • To install, you must have root access or permission to run sudo.
  • For Aerospike Database 5.1 and later, be sure to install the proper version of libcurl. See libcurl Required.
note

Aerospike requires Linux kernels that support 64K memory pages. This excludes RHEL 7 and RHEL 8 on ARM64, but variants such as Amazon Linux 2 are supported.

Download the package

See Download Aerospike Database for more details on manual or automated downloads of server versions.

# In server version 6.2 and later
wget -O aerospike.tgz https://download.aerospike.com/artifacts/aerospike-server-enterprise/6.2.0.0/aerospike-server-enterprise_6.2.0.0_tools-8.0.2_el8_x86_64.tgz
# In server versions prior to 6.2
wget -O aerospike.tgz https://download.aerospike.com/artifacts/aerospike-server-enterprise/5.7.0.17/aerospike-server-enterprise-5.7.0.17-el7.tgz

For version 4.5.x or earlier of the Aerospike EE, use the following command and enter your username and password:

wget -O aerospike.tgz https://download.aerospike.com/artifacts/aerospike-server-enterprise/4.5.3.22/aerospike-server-enterprise-4.5.3.22-el7.tgz --user='userName' --password='passWord'

Extract the contents of the package

To extract the contents of the package, run the following:

tar -xvf aerospike.tgz

The directory includes:

Install and Configure Aerospike

Install Aerospike Database

To install the server and the tools packages, run the following from the command line:

cd aerospike-server-enterprise-*
sudo ./asinstall

For a description of files and directories that are installed, see Directory Structure.

Alternatively, you can install the RPMs directly.

RPM Format

aerospike-server-<edition>-<version>-1.<RHEL>.<architecture>.rpm
aerospike-tools-<version>-1.<RHEL>.<architecture>.rpm

edition: community, enterprise, federal

version: 6.2.0.0, and so on

RHEL: el8, el9

architecture: x86_64, aarch64

sudo rpm -Uvh aerospike-server-enterprise-6.2.0.0-1.el7.aarch64.rpm
sudo rpm -Uvh aerospike-tools-8.1.0-1.el7.aarch64.rpm

Troubleshoot the installation

If there are errors during the installation, see Troubleshooting Install Problems. The Knowledge Base is also a good source of troubleshooting tips.

Configure Aerospike

Installation establishes the server's default configuration. An in-memory test namespace is configured by default. See Configure Aerospike Database to modify and tune the configuration.

Add devices and more

To add SSDs, make sure to read about setup and initialization.

Configure EE feature-key file

caution

Aerospike EE requires a feature-key file to start up and optionally enable gated features, such as compression.

Since server 6.1 the feature-key file for a single-node cluster is provided, so the server will start up automatically.

Configure logging

To configure logging for the Aerospike database, refer to Configuring Log Files.

Relocate Aerospike

Starting in version 7.1, you can relocate the Aerospike Database installation from /usr, /etc, and /opt if required by security or other policies. In the steps below, Aerospike is installed to /mnt/aerospike.

caution

Installing Aerospike in /tmp is not supported.

  1. Install Aerospike to /mnt/aerospike.

    rpm --relocate /opt=/mnt/aerospike/opt --relocate /etc=/mnt/aerospike/etc --relocate /usr=/mnt/aerospike/usr -Uvh <aerospike-package.rpm>
  2. Add the install path to your environment.

    export PATH=$PATH:/mnt/aerospike/opt:/mnt/aerospike/etc:/mnt/aerospike/usr/bin
  3. Create a symlink to the new install location.

    ln -s /mnt/aerospike/opt/aerospike /opt/aerospike
  4. Set the Aerospike configuration file variable.

    export ASD_CONFIG_FILE=/mnt/aerospike/etc/aerospike/aerospike.conf
  5. Update /tmp/usr/lib/systemd/system/aerospike.service with the install location.

    [Unit]
    Description=Aerospike Server
    After=network-online.target
    Wants=network.target
    [Service]
    LimitNOFILE=100000
    TimeoutSec=600
    User=root
    Group=root
    EnvironmentFile=/mnt/aerospike/etc/sysconfig/aerospike
    PermissionsStartOnly=True
    ExecStartPre=/mnt/aerospike/usr/bin/asd-systemd-helper
    ExecStart=/mnt/aerospike/usr/bin/asd $ASD_OPTIONS --config-file $ASD_CONFIG_FILE --fgdaemon
    [Install]
    WantedBy=multi-user.target
  6. Copy aerospike.service to /usr/lib/systemd/system.

    sudo cp usr/lib/systemd/system/aerospike.service /usr/lib/systemd/system
  7. Edit /etc/passwd.

    aerospike:x:980:980:Aerospike server:/mnt/aerospike:/usr/sbin/nologin
  8. In the Aerospike configuration file, set work-directory and user-path to the custom install path. See Configure Aerospike Database for more information.

    service {
    ...
    work-directory /mnt/aerospike/opt/aerospike
    }
    mod-lua {
    user-path /mnt/aerospike/opt/aerospike/usr/udf/lua
    }
    tip

    Before starting asd, manually execute (or automate) the tasks described in Aerospike Daemon Management, which include setting kernel params and increasing the file descriptor limit. These tasks are normally executed by our systemd init script.

  9. Start asd from command line with the --config-file option pointing to the correct configuration file location.

Start Aerospike

The Aerospike database can be controlled with standard systemctl commands. For details, see Aerospike Daemon Management.

Troubleshoot the startup

If there are errors during start up, see Startup Problems. The Knowledge Base is also a good source of troubleshooting tips.

Verify Aerospike is running

For details on getting the status of the Aerospike database with systemctl, see Aerospike Daemon Management.