Install Etherpad on AlmaLinux 8 - Step by step guide ?

Install Etherpad on AlmaLinux 8 - Step by step guide ?

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.
Here at Fixwebnode, as part of our Server Management Services, we regularly help our Customers to perform related Linux system Open-source Software Software Installation queries.
In this context, we shall look into how to install Etherpad on AlmaLinux 8.

Steps to install Etherpad on AlmaLinux 8

1. Perform System Update
To begin, ensure that the system is up to date with the below commands:

$ sudo dnf update
$ sudo dnf install epel-release


2. Install Git on the system
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"


3. Install 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 ''@'localhost';
exit


4. Install Etherpad on the system
Now, 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


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,

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


7. Configure Firewall
Now, 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


How to access Etherpad Web Interface ?

Once successfully installed, open your favorite browser and navigate to http://your-ip-address:9001. You will get the Etherpad "New Pad" screen where you can easily create and open a Pad with any name desired.


[Need help in fixing Linux System issues ? We can help you. ]


Conclusion

This article covers how to install and configure the Etherpad web-based online collaborative document editor on your AlmaLinux 8 system. In fact, EtherPad is an open-source real-time collaborative web-based text editor in which several people can conveniently work together online on a document.


icon

Sign up to our Newsletter

...and get one free support ticket.