AlmaLinuxLinuxTutorials

How To Install Etherpad on AlmaLinux 8

Install Etherpad on AlmaLinux 8

In this tutorial, we will show you how to install Etherpad on AlmaLinux 8. For those of you who didn’t know, EtherPad is a real-time collaborative web-based text editor in which several people can conveniently work together online on a document. It is written in Node.js and can be self-hosted to work with various platforms like WordPress, Drupal, Odoo, Joomla, etc.

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 through the step-by-step installation of the Etherpad open-source online editor on an AlmaLinux 8. You can follow the same instructions for CentOS and Rocky Linux.

Prerequisites

  • A server running one of the following operating systems: AlmaLinux 8, CentOS 8, or Rocky Linux 8.
  • It’s recommended that you use a fresh OS install to prevent any potential issues
  • 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 Etherpad on AlmaLinux 8

Step 1. First, let’s start by ensuring your system is up-to-date.

sudo dnf update
sudo dnf install epel-release

Step 2. Installing Git on AlmaLinux 8.

Git is available on the default repository on Almalinux. Now run the following command to install it:

sudo dnf install git

Confirm the installation and check the version executing the following command:

git --version

Next, add the initial configuration:

git config --global user.name "YourName"
git config --global user.email "name@your-domain.com"

Step 3. Installing MariaDB on AlmaLinux 8.

MariaDB is a popular database server. Now we install the MariaDB database server with the following command below:

sudo dnf install mariadb-server mariadb

Once the installation is complete, start to enable it to start on system start-up using:

sudo systemctl restart mariadb
sudo systemctl status mariadb
sudo systemctl enable 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

To log into MariaDB, use the following command (note that it’s the same command you would use to log into a MariaDB database):

mysql -u root -p

Now we create a new database for Etherpad:

create database `etherpad_db`;
CREATE USER 'etherpaduser'@'localhost' identified by 'your-strong-password';
grant CREATE,ALTER,SELECT,INSERT,UPDATE,DELETE on `etherpad_db`.* to '<etherpaduser>'@'localhost';
exit

Step 4. Installing Etherpad on AlmaLinux 8.

First, we create a new Etherpad user using the following command:

sudo adduser --system --home /opt/etherpad --create-home --user-group etherpad

Next, we will clone the binaries into /opt/etherpad a directory:

cd /opt/etherpad
git clone --branch master git://github.com/ether/etherpad-lite.git
cd etherpad-lite

Finally, run the installation script:

src/bin/run.sh

Step 5. Configure Etherpad.

Etherpad stores its settings in the settings.json file in the installation directory, we need to set some settings and configure it:

nano settings.json

Find the following code and comment it out by putting // in front of it:

//  "dbType": "dirty",
//  "dbSettings": {
//    "filename": "var/dirty.db"
//  },

Next, find the following code and change its values as follows. Make sure to remove /* and */ at the beginning and the end:

  "dbType" : "mysql",
  "dbSettings" : {
  "user":     "etherpaduser",
  "host":     "localhost",
  "port":     3306,
  "password": "your-strong-password",
  "database": "etherpad_db",
  "charset":  "utf8mb4"
  },

After that, scroll down a little to find the trustProxy setting and changing its value from false to true:

"trustProxy": true,

Step 6. Create Etherpad Service.

Now we create an Etherpad systemd service file:

sudo nano /etc/systemd/system/etherpad.service

Add the following line:

[Unit]
Description=Etherpad, a collaborative web editor.
After=syslog.target network.target

[Service]
Type=simple
User=etherpad
Group=etherpad
WorkingDirectory=/opt/etherpad
Environment=NODE_ENV=production
ExecStart=/usr/bin/node --experimental-worker /opt/etherpad/etherpad-lite/node_modules/ep_etherpad-lite/node/server.js
Restart=always

[Install]
WantedBy=multi-user.target

Save and close a file, then start the Etherpad service:

sudo systemctl daemon-reload
sudo systemctl enable etherpad --now

Step 7. Configure Firewall

Don’t forget to allow the port in the firewall:

sudo firewall-cmd --permanent --add-service=http
sudo firewall-cmd --permanent --add-service=https
sudo firewall-cmd --permanent --add-port=9001/tcp

Step 8. Accessing Etherpad Web Interface.

Once successfully installed, open your favorite browser and navigate to http://your-ip-address:9001. You will get the following screen:

Install Etherpad on AlmaLinux 8

Congratulations! You have successfully installed Etherpad. Thanks for using this tutorial for installing the Etherpad web-based online collaborative document editor on your AlmaLinux 8 system. For additional help or useful information, we recommend you check the official Etherpad 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 an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button