How To Install EPrints on Ubuntu 20.04

how to install eprints on ubuntu 20.04

EPrints is open-source software designed for building open access repositories that are OAI-PMH compliant. It is primarily used for scientific journals and institutional repositories although it can be also used as a document management system.

installing eprints on ubuntu 20.04

It is based on LAMP architecture, but with Perl instead of PHP.
EPrints consists of Web and command-line application which offers a wide range of plugins and addons available. So let’s get started with the installation!


  • For the purposes of this tutorial, we will use an Ubuntu20.04 VPS.
  • Access to the root user account (or a user with sudo privileges)

Step 1: Log in to the Server & Update the Server OS Packages

As always, first log in to your VPS via SSH:

ssh user@hostname

Once you are in, run the following commands to update the package index and upgrade all installed packages to the latest available version.

sudo apt-get update
sudo apt-get upgrade

Step 2: Installing LAMP stack

LAMP (Linux, Apache, MySQL, Perl) is a combination of open-source software stacks required to run the EPrints application.

The Apache web server can be easily installed with:

sudo apt-get install apache2

Once the installation is complete, enable the Apache service to start automatically upon system boot.

sudo systemctl enable apache2

The next step is to install MySQL. It is one of the most popular database management systems and offers a lot of functionality with managing and configuring databases.

To install MySQL on your system, type the following command and enter Y when prompted:

sudo apt-get install mysql-server

Last in this step is to install Perl, which comes installed with Ubuntu 20.04 by default, but if you don’t have Perl installed on your system you can install it with the following command:

sudo apt install perl

Step 3: EPrints installation

You will first need to add the EPrints package repository to your Ubuntu server with the following command:

echo "deb ./" > /etc/apt/sources.list.d/eprints.list

You can proceed with adding the GPG key and then updating the repositories with the commands:

wget -O - | apt-key add -
apt-get update

Now you can install the EPrints package.

apt-get install eprints

When the installation is finished you can find Eprints installed to /usr/share/eprints. However, you still won’t have a running archive.

Before we create the archive, “epadmin create” runs at the eprints user, this will not be able to create a database for EPrints. That’s why we will create the EPrints user in MySQL and grant him permissions.

First login into MySQL with your root user, if you still haven’t set a password for your root user you can log in with:

mysql -u root

This will take you to the MySQL Command-Line Tool, here you can create the eprints user and grant him permissions. Please don’t forget to change the ‘changeme’ with your real password:

CREATE USER 'eprints'@'localhost' IDENTIFIED by 'changeme';


flush privileges;

You may also want to restrict which databases the EPrints user has control over if you know the “Archive ID” you are going to use.

Now you can proceed to create your first archive. Start by changing to the EPrints user and navigating to the /usr/share/EPrints directory:

Need a fast and easy fix?
✔ Unlimited Managed Support
✔ Supports Your Software
✔ 2 CPU Cores
✔ 2 GB RAM
✔ 50 GB PCIe4 NVMe Disk
✔ 1854 GeekBench Score
✔ Unmetered Data Transfer

Now just $43 .99

su eprints

cd /usr/share/eprints

You can start with archive creation with:

./bin/epadmin create zero

This will the script with a number of configurations, you can check the example below or you can choose your own configuration:

-bash-4.1$ ./bin/epadmin create

Create an EPrint Repository

Please select an ID for the repository, which will be used to create a directory
and identify the repository. Lower case letters and numbers, may not start with
a number. examples: "lemurprints" or "test3"

Archive ID? testrepo  

Configure vital settings? [yes] ? ENTER
Core configuration for testrepo

Hostname? testprint

Webserver Port [80] ? ENTER

Enter a single hash (#) when you're done.

Alias (enter # when done) [#] ? testprint.local
Redirect testprint.local to testprint [yes] ? 

Alias (enter # when done) [#] ? ENTER

Path [/] ? ENTER

HTTPS Hostname [] ? ENTER

Administrator Email?

Archive Name [Test Repository] ? ENTER

Organisation Name [Organisation of Test] ? ENTER

Write these core settings? [yes] ? ENTER

Configure database? [yes] ? 

Configuring Database for: testrepo
Database Name [testrepo] ? ENTER
MySQL Host [localhost] ? ENTER

You probably don't need to set socket and port (unless you do!?).
MySQL Port (# for no setting) [#] ? ENTER
MySQL Socket (# for no setting) [#] ? ENTER
Database User [testrepo] ? ENTER
Database Password [nxxxxuAw] ? ENTER 
Database Engine [InnoDB] ? ENTER

Write these database settings? [yes] ?  ENTER

Create database "testrepo" [yes] ? ENTER

Database Superuser Username [root] ? eprints

Database Superuser Password? nxxxxuAw #the same password previously

Create database tables? [yes] ? ENTER

Create an initial user? [yes] ? ENTER

Enter a username [admin] ? ENTER

Select a user type (user|editor|admin) [admin] ? ENTER  
Enter Password? 'Choose_your_user_password'

Successfully created new user:
       ID: 1
Do you want to build the static web pages? [yes] ? ENTER 

Do you want to import the LOC subjects? [yes] ? ENTER

You must restart apache for any changes to take effect!

For the changes to take effect exit the EPrints user and restart the apache2 service.

Now you can disable the default web page and enable the EPrint’s configuration on Apache, don’t forget to restart the service at the end. You can do that with the following commands:

a2dissite 000-default.conf
a2ensite eprints.conf
systemctl restart apache2

That’s it! The installation of EPrints on Ubuntu 20.04 has been completed, and you can now access the EPrint’s page with your IP address URL, http://IP_ADDRESS on your favorite web browser.

Of course, you don’t need to install EPrints on Ubuntu 20.04 yourself if you use one of our fully managed VPS Hosting services, in which case you can simply ask our expert Linux admins to install and configure it for you. They are available 24×7 and will take care of your request immediately.

how to set up eprints on ubuntu 20.04

P.S. If you liked this post on how to install EPrints on Ubuntu 20.04 please share it with your friends on the social networks by using the share shortcuts below, or simply leave a comment in the comments section. Thanks

Leave a Comment