How to Install InvenioRDM on Debian Latest

InvenioRDM is a research data management system developed by CERN, the European Organization for Nuclear Research. It is an open-source platform that enables researchers to store, share, and manage their data.

In this tutorial, we will guide you through the process of installing InvenioRDM on Debian Latest.

Prerequisites

Before you begin, you will need:

Step 1: Install Required Packages

We will start by installing the packages required for InvenioRDM. Open your terminal and run the following command:

sudo apt-get update
sudo apt-get install -y python3-pip python3-venv git libpq-dev build-essential

Step 2: Create a Virtual Environment

It is recommended to use a virtual environment while working with InvenioRDM. To create a new virtual environment, run the following command:

python3 -m venv /path/to/venv

Step 3: Activate the Virtual Environment

Activate the virtual environment by running the following command:

source /path/to/venv/bin/activate

Step 4: Clone InvenioRDM Repository

Clone the InvenioRDM repository by running the following command:

git clone https://github.com/inveniosoftware/invenio-rdm.git
cd invenio-rdm

Step 5: Install Dependencies

Install the required dependencies by running the following command:

pip install -r requirements/test.txt

Step 6: Install Elasticsearch

InvenioRDM requires Elasticsearch for indexing and searching. Install Elasticsearch by running the following command:

sudo apt-get install -y openjdk-8-jre-headless
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.10.2-amd64.deb
sudo dpkg -i elasticsearch-7.10.2-amd64.deb
sudo systemctl enable elasticsearch.service
sudo systemctl start elasticsearch.service

Step 7: Install PostgreSQL

InvenioRDM requires a PostgreSQL database. Install PostgreSQL by running the following command:

sudo apt-get install -y postgresql

Step 8: Create a Database and User

Create a new PostgreSQL database and user by running the following commands:

sudo -u postgres createuser -P invenio
sudo -u postgres createdb -O invenio invenio

Step 9: Configure InvenioRDM

Create a configuration file for InvenioRDM by running the following command:

cp instance/instance.cfg.tmpl instance/instance.cfg

Open the instance.cfg file and add the following lines to it:

SECRET_KEY = "your_secret_key"
SQLALCHEMY_DATABASE_URI = "postgresql+psycopg2://invenio:<your_password>@localhost:5432/invenio"
SEARCH_INDEX = "invenio"
SEARCH_MAPPINGS = "invenio_search.mappings"
SEARCH_DEFAULT_MAPPINGS = "invenio_search.default_mappings"
APP_ALLOWED_HOSTS = '*'
APP_ALLOWED_ORIGINS = '*'

Replace your_secret_key and your_password with your actual secret key and password, respectively.

Step 10: Initialize the Database

Initialize the database by running the following command:

./scripts/init-db.sh

Step 11: Run InvenioRDM

Start the InvenioRDM server by running the following command:

export FLASK_APP=invenio_app.py
export FLASK_ENV=development
flask run

Conclusion

In this tutorial, we have installed InvenioRDM, an open-source research data management system developed by CERN, on Debian Latest. You can now use InvenioRDM to store, share, and manage your research data.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!