How to install aerospike on ubuntu using 8 easy steps

How to Install Aerospike on Ubuntu using 8 Easy Steps

In this article, we will see how to install aerospike on Ubuntu using 8 Easy Steps. Aerospike is a free and open source, in-memory, scalable, multi-model real-time NoSQL database. It is designed to help enterprises such as e-commerce, retails, gaming, telecommunication etc to scale up their businesses by increasing the efficiency of the applications using flash and hybrid memory architectures. It is a distributed database with support of document based data models that provide strong consistency with no downtime. It is quite easy to deploy and manage on both cloud and on-premise environments. Here we will see the steps to install Aerospike on Ubuntu based Linux systems.

Sponsored

 

How to install aerospike on ubuntu using 5 easy steps

How to Install Aerospike on Ubuntu using 8 Easy Steps

Also Read: What is API and its Usage ? :[4 Types of APIs]

Step 1: Prerequisites

a) You should have a running Ubuntu Server.

b) You should have sudo or root access to run privileged commands.

c) You should have apt and wget utility available in your Server.

d) You should also have tar utility available in your Server.

 

Step 2: Update Your Server

Before installing aerospike database, it is a good practice to first check for all the latest available updates and then install them by using sudo apt update && sudo apt upgrade command as shown below. This will make sure all the latest security updates and bug fixes are installed on the server.

cyberithub@ubuntu:~$ sudo apt update && sudo apt upgrade
[sudo] password for cyberithub:
Hit:1 https://d3nt0h4h6pmmc4.cloudfront.net/ubuntu focal InRelease
Hit:2 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 https://dl.winehq.org/wine-builds/ubuntu focal InRelease
Hit:4 http://ppa.launchpad.net/flatpak/stable/ubuntu focal InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://in.archive.ubuntu.com/ubuntu focal InRelease
Hit:7 http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal InRelease
Get:8 http://in.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Hit:9 https://download.sublimetext.com apt/stable/ InRelease
Hit:10 http://ppa.launchpad.net/juju/stable/ubuntu focal InRelease
Hit:11 https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/focal pgadmin4 InRelease
Hit:12 https://ngrok-agent.s3.amazonaws.com buster InRelease
Hit:13 http://ppa.launchpad.net/libreoffice/ppa/ubuntu focal InRelease
Hit:14 http://ppa.launchpad.net/mojo-maintainers/ppa/ubuntu focal InRelease
Hit:15 http://in.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:16 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu focal InRelease
Get:17 http://in.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [2,822 kB]
Get:18 http://in.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages [878 kB]
Fetched 3,813 kB in 7s (542 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
2 packages can be upgraded. Run 'apt list --upgradable' to see them.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
node-hosted-git-info python2.7-minimal python2.7 node-tar libgsasl7
libopusfile0 libjs-jquery-ui libsdl2-2.0-0 libsdl2-2.0-0
libpython2.7-minimal libpython2.7-stdlib
Learn more about Ubuntu Pro at https://ubuntu.com/pro
The following packages have been kept back:
xdg-desktop-portal xdg-desktop-portal-gtk
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

 

Step 3: Download Aerospike

You have to visit Aerospike official website and download the latest available community or enterprise edition package by running below wget command. This will download the package in current working directory and save it as aerospike.tgz file.

cyberithub@ubuntu:~$ 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_ubuntu20.04_x86_64.tgz
--2023-09-15 01:04:39-- https://download.aerospike.com/artifacts/aerospike-server-enterprise/6.2.0.0/aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64.tgz
Resolving download.aerospike.com (download.aerospike.com)... 35.160.61.238, 52.11.217.236, 54.69.157.73
Connecting to download.aerospike.com (download.aerospike.com)|35.160.61.238|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 53374066 (51M) [application/x-gzip]
Saving to: ‘aerospike.tgz’

aerospike.tgz 100%[============================================================================>] 50.90M 2.21MB/s in 27s

2023-09-15 01:05:07 (1.89 MB/s) - ‘aerospike.tgz’ saved [53374066/53374066]

 

Also Read

 

Step 4: Extract Package

After successfully downloading the package, extract it by running tar -xvf aerospike.tgz command as shown below.

cyberithub@ubuntu:~$ tar -xvf aerospike.tgz
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/SHA256SUMS
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/aerospike-tools_8.0.2-ubuntu20.04_amd64.deb
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/LICENSE
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/aerospike-server-enterprise_6.2.0.0-1ubuntu20.04_amd64.deb
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/asinstall
aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/dep-check

 

Step 5: Install Aerospike

To install aerospike server and tools package, switch to the extracted directory and run sudo ./asinstall command as shown below.

cyberithub@ubuntu:~$ cd aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64/
cyberithub@ubuntu:~/aerospike-server-enterprise_6.2.0.0_tools-8.0.2_ubuntu20.04_x86_64$ sudo ./asinstall
Checking dependencies
Installing tools
dpkg -i aerospike-tools_8.0.2-ubuntu20.04_amd64.deb
Selecting previously unselected package aerospike-tools.
(Reading database ... 258704 files and directories currently installed.)
Preparing to unpack aerospike-tools_8.0.2-ubuntu20.04_amd64.deb ...
Unpacking aerospike-tools (8.0.2) ...
Setting up aerospike-tools (8.0.2) ...
Installing /opt/aerospike
Writing /usr/local/lib/python3.8/dist-packages/aerospike.pth
Adding python path /opt/aerospike/lib/python
Installing server
dpkg -i aerospike-server-enterprise_6.2.0.0-1ubuntu20.04_amd64.deb
Selecting previously unselected package aerospike-server-enterprise.
(Reading database ... 258994 files and directories currently installed.)
Preparing to unpack aerospike-server-enterprise_6.2.0.0-1ubuntu20.04_amd64.deb ...
Unpacking aerospike-server-enterprise (6.2.0.0-1) ...
Setting up aerospike-server-enterprise (6.2.0.0-1) ...

 

Step 6: Check Version

You can verify the current installed version by using asd --version command as shown below.

cyberithub@ubuntu:~$ asd --version
Aerospike Enterprise Edition build 6.2.0.0

 

Step 7: Start Aerospike

By default, aerospike service won’t be started after installation, you have to start it by using sudo systemctl start aerospike command. Then you can verify the service status by running sudo systemctl status aerospike command. If you see service status as active and running then it confirms that aerospike is running fine and you can now start connecting the database cluster.

cyberithub@ubuntu:~$ sudo systemctl start aerospike
cyberithub@ubuntu:~$ sudo systemctl status aerospike
● aerospike.service - Aerospike Server
     Loaded: loaded (/lib/systemd/system/aerospike.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/aerospike.service.d
             └─aerospike.conf
     Active: active (running) since Fri 2023-09-15 01:42:16 IST; 2s ago
    Process: 120829 ExecStartPre=/usr/bin/asd-systemd-helper (code=exited, status=0/SUCCESS)
   Main PID: 120867 (asd)
      Tasks: 95 (limit: 2261)
     Memory: 132.5M
     CGroup: /system.slice/aerospike.service
             └─120867 /usr/bin/asd --config-file /etc/aerospike/aerospike.conf --fgdaemon

Sep 15 01:42:17 ubuntu asd[120867]: Sep 14 2023 20:12:17 GMT: INFO (as): (as.c:423) service ready: soon there will be cake!
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (clustering): (clustering.c:6354) principal node - forming new cluster with succession li>
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (clustering): (clustering.c:5794) applied new cluster key 31355de35826
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (clustering): (clustering.c:5796) applied new succession list bb956d109270008
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (clustering): (clustering.c:5798) applied cluster size 1
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (exchange): (exchange.c:2345) data exchange started with cluster key 31355de35826
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (exchange): (exchange.c:2728) exchange-compatibility-id: self 11 cluster-min 0 -> 11 clus>
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (exchange): (exchange.c:3296) received commit command from principal node bb956d109270008
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (exchange): (exchange.c:3259) data exchange completed with cluster key 31355de35826
Sep 15 01:42:19 ubuntu asd[120867]: Sep 14 2023 20:12:19 GMT: INFO (partition): (partition_balance.c:1006) {test} replication factor is 1

 

Step 8: Uninstall Aerospike

Once you are done using aerospike, you can choose to remove it from your server by using sudo apt remove aerospike-server-enterprise command as shown below.

cyberithub@ubuntu:~$ sudo apt remove aerospike-server-enterprise
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
aerospike-server-enterprise
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 35.1 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 259020 files and directories currently installed.)
Removing aerospike-server-enterprise (6.2.0.0-1) ...


Discover more from Ubuntu-Server.com

Subscribe to get the latest posts sent to your email.

Comments

No comments yet. Why don’t you start the discussion?

    Leave a Reply