LinuxTutorialsUbuntu

How To Install EPrints on Ubuntu 20.04 LTS

Install EPrints on Ubuntu 20.04

In this tutorial, we will show you how to install EPrints on Ubuntu 20.04 LTS. For those of you who didn’t know, EPrints is a free and open-source software for document management systems, which are more commonly implemented as university repositories that store scientific work documents such as theses, theses, dissertations, and research journals.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the EPrints on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian-based distribution like Linux Mint.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 20.04, 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • SSH access to the server (or just open Terminal if you’re on a desktop).
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Install EPrints on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running the following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing the LAMP stack.

A Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Installing EPrints on Ubuntu 20.04.

By default, EPrints is not available on the Ubuntu base repository. Now we add the EPrints package repository to your Ubuntu system:

echo "deb http://deb.eprints.org/3.4/stable/ ./" > /etc/apt/sources.list.d/eprints.list

Next, import the GPG key:

wget -O - http://deb.eprints.org/keyFile | apt-key add -

After that, update apt repository and install EPrints using the following command below:

sudo apt install update
sudo apt install eprints

Step 4. Configuring MariaDB.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next, we will need to log in to the MariaDB console and create a database for the EPrints. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for EPrints installation:

CREATE DATABASE eprints_db;
CREATE USER 'eprintspuser'@'localhost' IDENTIFIED BY 'Your-Strong-Passwd';
GRANT ALL PRIVILEGES ON `eprints_db`.* TO 'eprintsuser'@'localhost';
FLUSH PRIVILEGES;

Step 5. Configure EPrints.

First, we changed to the EPrints user and navigated to the /usr/share/EPrints directory:

su eprints
cd /usr/share/eprints

Next, start with archive creation:

./bin/epadmin create zero

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: "idrootprints" or "test123"

Archive ID? idrootrepo  

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

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? admin@your-domain.com

Archive Name [Test Repository] ? ENTER

Organisation Name [Organisation of Test] ? ENTER

Write these core settings? [yes] ? ENTER

Configure database? [yes] ? 

Configuring Database for: idrootrepo
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_strong_password'
Email? admin@your-domain.com

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!

Save and close then, restart the Apache webserver so that the changes take place:

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

Step 6. Accessing EPrints Web Interface.

Once successfully installed, open your favorite browser and navigate to the URL https://server-ip-address/. If you are using a firewall, please open port 80 to enable access to the control panel.

Congratulations! You have successfully installed EPrints. Thanks for using this tutorial for installing the EPrints on Ubuntu 20.04 LTS Focal Fossa system. For additional help or useful information, we recommend you check the official EPrints website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button