With the help of several servers, the distributed NoSQL database Riak KV aims to maximize data availability. On Debian and Ubuntu-based computers, the Riak KV base may also be installed via a binary or a build from source.
The database has been tested and is currently compatible with the following CentOS versions:
- CentOS 7.4;
- CentOS 6.10.
Other versions may not function properly. You must deactivate SELinux if it isn’t already. Run the following command to determine SELinux’s current state:
sestatus
The output is likely to be:
You can see that SELinux is on and employing the enforcing policy in this image. To deactivate SELinux, follow these steps:
1. Open the /etc/selinux/config file using any editor, such as nano:
nano /etc/selinux/config
2. Find the SELinux parameter and change its value to disabled:
SELinux=enforcing
You must reload SELinux for the changes to take effect:
sudo setenforce 0
Installation
The repository must first be added to the system. To do this, there is a special script that configures the file and saves it to /etc/yum.repos.d/ under the name basho.repo. You only need to specify the version of CentOS and run the script.
Create a script.sh file:
nano script.sh
The following lines are added to it, where DIST denotes the operating system version you are using:
#!/bin/bash
HOSTNAME=hostname -f
FILENAME=/etc/yum.repos.d/basho.repo
OS=el
DIST=7
PACKAGE_CLOUD_RIAK_DIR=https://packagecloud.io/install/repositories/basho/riak
curl "${PACKAGE_CLOUD_RIAK_DIR}/config_file.repo?os=${OS}&dist=${DIST}&name=${HOSTNAME}" > $FILENAME
You must execute the script.sh file after saving it. Enter the subsequent command in the place where the file is located to achieve this:
sh script.sh
After that, the script will automatically add two Riak repositories. Update the package list:
yum update
Install Riak:
yum install riak
Next, you need to start Riak. To do this, run the following command:
riak start
If you get an error as a result of running the command, just add two values to the /etc/security/limits.conf file. Opening the file:
nano /etc/security/limits.conf
Move to the end of the file and insert 2 lines:
* soft nofile 65536
* hard nofile 65536
Save the file and restart Riak:
riak restart
As a result, the command should return ok to the console. This will mean that Riak has rebooted and you can check if it works, for example, by getting the properties of Riak:
curl -v http://127.0.0.1:8098/types/default/props
As a result, you will get output like this:
This completes the installation of Riak KV on CentOS 6/7.
Welcome to the world of DomainRooster, where roosters (and hens) rule the roost! We're a one-stop shop for all your entrepreneurial needs, bringing together domain names and website hosting, and all the tools you need to bring your ideas to life. With our help, you'll soar to new heights and hatch great success. Think of us as your trusty sidekick, always there to lend a wing and help you navigate the sometimes-complex world of domain names and web hosting. Our team of roosters are experts in their fields and are always on hand to answer any questions and provide guidance. So why wait? Sign up today and join the ranks of the world's greatest entrepreneurs. With DomainRooster, the sky's the limit! And remember, as the saying goes, "Successful people do what unsuccessful people are not willing to do." So don't be afraid to take that leap of faith - DomainRooster is here to help you reach for the stars. Caw on!