How to Install RERO ILS on Debian Latest
RERO ILS is an integrated library system developed by the RERO consortium. In this tutorial, we will guide you on how to install RERO ILS on Debian latest.
Prerequisites
Before we start, ensure that you have the following prerequisites:
- A Debian latest installation
- Root access or a user with sudo privileges
- At least 2 GB of memory (RAM)
- At least 10 GB of disk space
- Java 11
Step 1: Update and upgrade your Debian system
First, update and upgrade your Debian system to ensure that you have the latest packages installed.
sudo apt-get update
sudo apt-get upgrade
Step 2: Install PostgreSQL and Redis
RERO ILS requires a PostgreSQL database and a Redis instance. Follow the steps below to install and configure them.
Install PostgreSQL
sudo apt-get install postgresql
By default, PostgreSQL creates a database user called postgres with superuser privileges. We will use this user to create the RERO ILS database.
Install Redis
sudo apt-get install redis-server
Step 3: Install Elasticsearch
RERO ILS uses Elasticsearch for search indexing. Follow the steps below to install and configure Elasticsearch.
sudo apt-get install -y apt-transport-https gnupg2
sudo wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
sudo sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
sudo apt-get update
sudo apt-get install -y elasticsearch
Next, edit the Elasticsearch configuration file /etc/elasticsearch/elasticsearch.yml and set the following options:
cluster.name: rero
network.host: 127.0.0.1
discovery.type: single-node
Step 4: Install RERO ILS dependencies
RERO ILS uses several dependencies that need to be installed. Use the following commands to install these dependencies:
sudo apt-get install -y python3 python3-dev python3-pip python3-venv build-essential libpq-dev libffi-dev libssl-dev
Step 5: Install RERO ILS
You can download the latest version of RERO ILS from the official website. After downloading the source code, follow the steps below to install it.
tar zxvf rero-ils-latest.tar.gz
cd rero-ils-latest
python3 -m venv venv
source venv/bin/activate
python3 -m pip install --upgrade pip
pip3 install -r requirements.txt
Step 6: Configure RERO ILS
Before running RERO ILS, you need to configure it. Copy the sample configuration file and edit it accordingly.
cp rero_ils/settings/common.py.sample rero_ils/settings/common.py
vim rero_ils/settings/common.py
At a minimum, you need to set the following options:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'rero_ils',
'USER': 'postgres',
'PASSWORD': 'password',
'HOST': 'localhost',
'PORT': '',
}
}
CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': 'redis://127.0.0.1:6379/2',
'OPTIONS': {
'CLIENT_CLASS': 'django_redis.client.DefaultClient',
}
}
}
ELASTICSEARCH_INDEX = 'rero'
ELASTICSEARCH_SERVERS = [{'host': 'localhost'}]
Step 7: Initialize the database
You need to initialize the RERO ILS database and create a superuser before running the application.
python manage.py migrate
python manage.py createsuperuser
Step 8: Start RERO ILS
You are now ready to start RERO ILS.
python manage.py runserver
By default, RERO ILS will listen on http://127.0.0.1:8000/. You can access the application by visiting this URL in your web browser.
Conclusion
In this tutorial, we have shown you how to install RERO ILS on Debian latest. If you face any issues during the installation process, you can consult the official RERO ILS documentation or seek help from the RERO community.