How to Install InvenioRDM on NixOS Latest
InvenioRDM is an open-source research data management platform developed by CERN. NixOS is a Linux distribution that offers a purely functional package management system.
In this tutorial, we will guide you through the installation process of InvenioRDM on NixOS latest version.
Prerequisites
Before you start installing InvenioRDM on NixOS, you must have the following:
- A running instance of NixOS Latest.
- An account with sudo privileges.
Step 1: Install Required Dependencies
Before you install InvenioRDM, ensure that you have all the necessary dependencies installed on your system. Open up a terminal and run the following command:
sudo nix-env -iA nixos.python36Packages.python nixos.postgresql10
This command will install the following packages:
- Python 3.6
- PostgreSQL 10
Step 2: Install InvenioRDM
To install InvenioRDM, run the following command:
sudo nix-env -f https://github.com/inveniosoftware/invenio-rdm/releases/download/v4.2.2/nix-env-invenio-rdm-4.2.2.tar.gz -iA invenio-rdm
This command will download and install the latest release of InvenioRDM for NixOS.
Step 3: Configure InvenioRDM
After the installation is complete, you need to configure InvenioRDM. To do that, create a new file called invenio.cfg:
sudo nano /etc/invenio/invenio.cfg
Add the following content to the file:
SERVER_NAME = "localhost"
SQLALCHEMY_DATABASE_URI = "postgresql://invenio:invenio@localhost:5432/invenio"
DEFAULT_SECURE_HEADERS["Strict-Transport-Security"] = "max-age=31536000; includeSubDomains"
Save and close the file.
Step 4: Initialize InvenioRDM
After the configuration is complete, you can initialize InvenioRDM by running the following command:
sudo -iu invenio invenio rdm init
This command will create the necessary database tables and initialize the application.
Step 5: Run InvenioRDM
Now that you have installed and configured InvenioRDM on NixOS, you can run it using the following command:
sudo -iu invenio invenio run
This command will start the InvenioRDM server.
Conclusion
InvenioRDM is now installed and running on your NixOS system. You can access the application by opening a web browser and visiting http://localhost:5000.
You can now start using InvenioRDM to manage your research data. If you need any assistance, refer to the InvenioRDM documentation available at https://inveniordm.docs.cern.ch/.