Context
It is generally recommended to use the default locations provided by the installer as this has been tested by our quality assurance team. Using this method of installing in alternative directories can affect how Aerospike server runs and may be outside Aerospike support.
If you have any questions about running the Aerospike server in this configuration, it may be a good idea to work with Aerospike Professional Services to develop an operating plan.
With this understood, it is sometimes required by customer policy that they run vendor software in specified locations.
Method
Synopsis:
The Aerospike RPM and Debfile installer will hard set the default locations for files.
How can you install Aerospike in the directory of your choice?
To run Aerospike in a nonstandard location, you can extract the Aerospike Enterprise installation media and move the directories to another location on the server. You must make configuration updates to aerospike.conf. You must also manually provide aerospike.conf when you start Aerospike in a non-standard location. Please also review the guide to using aerospike as a non-root user, especally if you are using Aerospike with a non-root user.
The following steps describe how to install Aerospike in a non-standard location:
1. Download the Aerospike installer.
2. Extract the installer
1. RedHat/CentOS
1. Use the following command syntax to extract the server installation from the .rpm file: `rpm2cpio aerospike-server-enterprise-3.6.4-1.el6.x86_64.rpm | cpio -idmv`
2. `rpm2cpio` creates four new directories, etc, opt, usr, and var.
2. Ubuntu/Debian
1. Use the following command syntax to extract the server installation from the .deb file: `ar vx aerospike-server-enterprise-3.6.4.ubuntu12.04.x86_64.deb`
2. Unzip and untag data.tar.gz which will extract to four new directories, etc, opt, usr, and var.
3. Move the four directories extracted from the installer to their installation locations.
4. Open `<install_location>/etc/aerospike/aerospike.conf`, and update the following configurations:
1. If you are using a non-root user, select a user to run Aerospike:
service {
user <existing user to run Aerospike>
group <existing group for Aerospike server user>
}
2. Pidfile for Aerospike process (not needed on systemd systems):
pidfile <install_location>/var/run/aerospike/asd.pid
3. Location of the Aerospike log file :
logging {
file <install_location>/var/log/aerospike/aerospike.log
}
4. Add the location of lua files :
mod-lua {
system-path <install_location>/modules/lua-core/src
user-path <install_location>/modules/lua-core/test
}
5. Verify that `proto-fd-max` does not exceed the new user's file descriptor limit. If it does, either increase the file descriptors for the user, or decrease proto-fd-max. Verify the user's file descriptor settings using `ulimit -a` to check the file descriptor limit.
6. Test the settings with `sudo <install_location>/usr/bin/asd --config-file <install_location>/etc/aerospike/aerospike.conf` and once the settings are correct you can create a systemd, init.d, or other system manager config to handle startup as needed.