Last active
September 6, 2023 03:00
-
-
Save JimLynchCodes/b75236124dfe78fcb1bd5571b164de15 to your computer and use it in GitHub Desktop.
Installs & starts an aerospike database on a fresh server instance running debian linux.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First, decide which version of aerospike [community, federal, and enterprise] you want to use, | |
# and which linux + computer architecture you will be running- this code is meant to run on Debian 12 on x86 machines. | |
# Check here to browse aerospike package versions: https://download.aerospike.com/artifacts/ | |
# 1) Get the aerospike tools package | |
wget -O aerospike-tools.tgz https://download.aerospike.com/artifacts/aerospike-server-community/latest/aerospike-server-community_6.4.0.2_tools-9.0.0_debian12_x86_64.tgz | |
## TODO - verify the file downloaded properly | |
# 2) Open the compressed tar file | |
tar -xvf aerospike-tools.tgz | |
# 3) Install Aerospike stuff | |
cd aerospike-tools-* | |
sudo ./asinstall | |
# 4) Run Aerospike server: | |
sudo /etc/init.d/aerospike start | |
# Check that Aerospike server is running: | |
sudo /etc/init.d/aerospike status | |
# To stop Aerospike server: | |
# `sudo /etc/init.d/aerospike stop` | |
# --- | |
## CRUD Commands to run in the terminal | |
# in general: | |
# ascli [operation] [database name] [table / collection name] [key] | |
# Insert some data into a table of a database: | |
# `ascli put test test_set "john_doe" '{"gender": "M", "state": "CA"}'` | |
# Check if the data exists: | |
# `ascli exists test test_set "john_doe"` | |
# Get the data: | |
# `ascli get test test_set "john_doe"` | |
# `Remove the data: | |
# `asclie remove test test_set "john_doe"` | |
# --- | |
## Monitoring | |
# Start up monitor mode: | |
# `asmonitor -h v15 -p 3000` | |
# Then view stats: | |
# `stat` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment