How to Install RavenDB Database on Ubuntu 18.04 | 20.04

How to Install RavenDB Database on Ubuntu 18.04 20.04

In this article, we are going to shows that how to Install RavenDB NoSQL Database on Ubuntu 18.04 | 20.04.

RavenDB NoSQL Database is a free, high performance, reliable and open-source document-oriented NoSQL database that is designed for .NET/Windows platform. It is easy to install, easy to implement and easy to use.

RavenDB uses JSON to store documents and does not requires a schema to be declared and enables developers to work with data more naturally.

It is mostly used by major corporations who looking for high performance NoSQL database management system.


Install RavenDB Database on Ubuntu 18.04 | 20.04

Simply follow below steps to install RavenDB NoSQL Database on Ubuntu system:

Step 1 : Install required packages and Dependencies

Before starting to install RavenDB, you will need to install required packages and Dependencies in your system including NET Core runtime by running below command:

wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Next, update the repository and install .NET core by running below command:

sudo apt update 
sudo apt-get install apt-transport-https
sudo apt-get install aspnetcore-runtime-3.1

Step 2 : Install RavenDB

Now download the latest version of the RavenDB by running the bellow command:

cd ~/
wget -O ravendb.tar.bz2 https://hibernatingrhinos.com/downloads/RavenDB%20for%20Linux%20x64/latest

After download, extract the downloaded file using the below command:

tar xvjf ravendb.tar.bz2

Now, set proper permission, make the file executable and install it by running below command:

sudo chmod -R 755 RavenDB
cd ~/RavenDB
./run.sh

The above commands will install RavenDB and start listening on port number 42105. press CTRL + C to exit.


Step 3 : Configure RavenDB

By default, the RavenDB is accessible only from the localhost. And if you need to configure it to access from the remote host then run the below command to open its config file and add the IP address:

sudo nano ~/RavenDB/Server/settings.json

Then add / replace highlighted text with your public IP:

{
  "DataDir": "RavenData",
  "License.Eula.Accepted": true,
  "Setup.Mode": "Unsecured",
  "Security.UnsecuredAccessAllowed": "PublicNetwork",
  "ServerUrl": "http://127.0.0.1:8080",
  "ServerUrl.Tcp": "tcp://127.0.0.1:38888"
}

Step 4 : Create a Systemd Service File

To manage and control the RavenDB, you will need to create a systemd service file. Run the below command to create file:

sudo nano /etc/systemd/system/ravendb.service

After create file, copy and paste the below content into the file and save it:

[Unit]
Description=RavenDB v4.0
After=network.target

[Service]
LimitCORE=infinity
LimitNOFILE=65536
LimitRSS=infinity
LimitAS=infinity
User=mkk
Restart=on-failure
Type=simple
ExecStart=/home/mkk/RavenDB/run.sh

[Install]
WantedBy=multi-user.target

After made the changes, Save and close the file.

 Reload the systemd using below commands:

sudo systemctl daemon-reload
sudo systemctl start ravendb
sudo systemctl enable ravendb

Run the below command to check the status of the RavenDB:

sudo systemctl status ravendb

Step 5 : Access RavenDB Web Interface

To access RavenDB web interface, open your favorite web browser and type the URL http://your-server-ip:8080. It will open the below screen:

how to install RavenDB Database on Ubuntu

Now, accept the License Agreement by clicking on the Accept button. When you click on the Accept button, it will open a new screen like below:

Ravendb-security-option

In the above image, it have three options, select the Unsecured option. It will open the below screen:

Ravendb-details

Now, provide the HTTP Port, IP address and click on the Next button.

how to install RavenDB Database on Ubuntu

Click on the Restart server button . After restart the server, it will be redirected to the RavenDB dashboard.


That’s all

If you find any error and issue in above steps , please use comment box below to report.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top