almalinux | LinuxHostSupport Linux Tutorials and Guides Tue, 23 Jan 2024 13:50:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.1 How to Install XWiki on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/#respond Sat, 30 Dec 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1993 XWiki is a free and open-source platform written in Java used for storing structured data and running the server-side code that creates the wiki interface. In this tutorial, we are going to explain how to install XWiki on AlmaLinux 9. XWiki offers a variety of features such as structured content, PDF export, Version control, plugins, […]

The post How to Install XWiki on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
XWiki is a free and open-source platform written in Java used for storing structured data and running the server-side code that creates the wiki interface. In this tutorial, we are going to explain how to install XWiki on AlmaLinux 9.

XWiki offers a variety of features such as structured content, PDF export, Version control, plugins, API programming, and many more. XWiki stores the data into the MySQL database server, and alongside Tomcat we will install the MariaDB database server.

Installing XWiki with all of its requirements will take up to 20 minutes. Let’s get started!

Prerequisites

  • A server running AlmaLinux 9
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation of XWiki, we need to update the system packages to their latest versions available:

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

To install Java, execute the following command:

dnf install java

Once Java is installed, you can check the version with the command below:

java --version

You should get the following output:

[root@host ~]# java --version
openjdk 11.0.21 2023-10-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.21.0.9-1) (build 11.0.21+9-LTS, mixed mode, sharing)

Step 3. Install Tomcat

To install Tomcat, execute the following commands one by one:

groupadd tomcat

useradd -g tomcat -d /opt/tomcat tomcat

su - tomcat

wget https://dlcdn.apache.org/tomcat/tomcat-8/v8.5.96/bin/apache-tomcat-8.5.96.tar.gz -O tomcat8.tar.gz

tar -xzvf tomcat8.tar.gz --strip-components=1

exit

Next, we need to create a service file for Tomcat:

touch /etc/systemd/system/tomcat8.service

Once the file is created, open it with your preferred text editor and paste the following lines of code:

[Unit]
Description=Tomcat 8
After=syslog.target network.target

[Service]
Type=forking

User=tomcat
Group=tomcat

Environment=JAVA_HOME=/usr/lib/jvm/jre
Environment=CATALINA_PID=/opt/tomcat/temp/tomcat.pid
Environment=CATALINA_HOME=/opt/tomcat
Environment=CATALINA_BASE=/opt/tomcat
Environment='CATALINA_OPTS=-Xms512M -Xmx1024M -XX:MaxPermSize=192m -server -XX:+UseParallelGC'
Environment='JAVA_OPTS=-Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom'

ExecStart=/opt/tomcat/bin/startup.sh
ExecStop=/bin/kill -15 $MAINPID

[Install]
WantedBy=multi-user.target

Save the file and close it. Once done, reload the SystemD daemon. start the service, and configure it to start on boot:

systemctl daemon-reload

systemctl start tomcat8

systemctl enable tomcat8

To check the status of the Tomcat service, execute the following command:

systemctl status tomcat8

You should get the following output:

[root@host ~]# systemctl status tomcat8
● tomcat8.service
     Loaded: loaded (/etc/systemd/system/tomcat8.service; disabled; preset: disabled)
     Active: active (running) since Sun 2023-11-19 14:25:10 CST; 2min 21s ago
    Process: 7503 ExecStart=/opt/tomcat/bin/startup.sh (code=exited, status=0/SUCCESS)
   Main PID: 7510 (java)
      Tasks: 28 (limit: 23116)
     Memory: 155.7M
        CPU: 8.996s
     CGroup: /system.slice/tomcat8.service
             └─7510 /usr/lib/jvm/jre/bin/java -Djava.util.logging.config.file=/opt/tomcat/conf/logging.properties -Djava.util.logging.manager>

Nov 19 14:25:10 host.test.vps systemd[1]: Starting tomcat8.service...
Nov 19 14:25:10 host.test.vps startup.sh[7503]: Tomcat started.
Nov 19 14:25:10 host.test.vps systemd[1]: Started tomcat8.service.

Step 4. Install MariaDB database server

To install the MariaDB database server, execute the following command:

dnf install mariadb-server -y

After installation, start and enable the service:

sudo systemctl start mariadb && sudo systemctl enable mariadb

To check the status of the service execute the following command:

sudo systemctl status mariadb

You should get the following output:

[root@host ~]# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.5 database server
     Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; preset: disabled)
     Active: active (running) since Sun 2023-11-19 14:33:59 CST; 49s ago
       Docs: man:mariadbd(8)
             https://mariadb.com/kb/en/library/systemd/
   Main PID: 8446 (mariadbd)
     Status: "Taking your SQL requests now..."
      Tasks: 16 (limit: 23116)
     Memory: 75.5M
        CPU: 670ms
     CGroup: /system.slice/mariadb.service
             └─8446 /usr/libexec/mariadbd --basedir=/usr

Step 5. Create a MariaDB database and User

Now, we need to create a database and user for our XWiki installation. To do that, login to the MariaDB console with the mysql command and execute the following queries:

MariaDB [(none)]> CREATE DATABASE xwiki default character set utf8mb4 collate utf8mb4_bin;
MariaDB [(none)]> CREATE USER 'xwiki'@'localhost' IDENTIFIED BY 'YourStrongPasswordHere';
MariaDB [(none)]> GRANT all privileges on *.* to xwiki@localhost;
MariaDB [(none)]> EXIT;

Make sure to replace YourStrongPasswordHere with a unique, strong password. Remember it, because we’ll need it later.

Step 6. Download XWiki

Finally, we are at the most important step of the installation. We need to download the XWiki installation, place it into the Tomcat webapps folder, and configure the MariaDB database Java connector.

cd /opt/tomcat/webapps

wget https://nexus.xwiki.org/nexus/content/groups/public/org/xwiki/platform/xwiki-platform-distribution-war/15.8/xwiki-platform-distribution-war-15.8.war -O xwiki.war

Next we need to download the MariaDB Java connector and move it into the lib folder of our XWiki application:

wget https://dlm.mariadb.com/3478935/Connectors/java/connector-java-3.3.0/mariadb-java-client-3.3.0.jar

mv mariadb-java-client-3.3.0.jar /opt/tomcat/webapps/xwiki/WEB-INF/lib/

To configure MariaDB, to be the main database server for XWiki, open the following file:

nano /opt/tomcat/webapps/xwiki/WEB-INF/hibernate.cfg.xml

Comment the HSQLDB configuration and uncomment the section for MariaDB configuration:

Save the file and close it.

Now, you can access your XWiki installation at http://YourServerIPAddress:8080/xwiki

Step 7. Finish XWiki Installation

On the first screen, click on the Continue button

In this step, set the administrator username, a strong password and email.

On the third screen, click on the Continue button:

Next choose the wiki to be empty and hit on the Continue button:

On the last window click on the Continue button as well:

Congratulations! You successfully installed XWiki on AlmaLinux 9 with the MariaDB java connector:

Of course, you don’t have to spend your time installing XWiki on AlmaLinux 9 if you have a managed Linux server support plan with us. If you do, you can simply ask our support team to install XWiki on AlmaLinux 9 for you. They are available 24/7 and will be able to help you with the installation of XWiki as well as any additional requirements that you may have.

PS. If you liked this post, please share it with your friends on social networks, or simply leave a reply below if this guide worked for you. Thanks.

The post How to Install XWiki on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-xwiki-on-almalinux-9/feed/ 0
How to Install Tar.gz on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-tar-gz-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-tar-gz-on-almalinux-9/#respond Sat, 15 Jul 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1838 If you are asking what is Tar.gz, then the tar file is an archive that contains files and folders into it, while the gz stands for the compressed file format. If you combine these two, you will get a compressed archive. The compressed archives are used on a daily basis by the system administrators, developers, […]

The post How to Install Tar.gz on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
If you are asking what is Tar.gz, then the tar file is an archive that contains files and folders into it, while the gz stands for the compressed file format. If you combine these two, you will get a compressed archive.

The compressed archives are used on a daily basis by the system administrators, developers, and regular Linux users. Compressing multiple files in one archive can simplify the process of sending that compressed file quickly.

In this blog post, we will install and show you some real-life examples of using the tar.gz format with commands. Let’s get started!

  • A server with AlmaLinux 9 as OS
  • User privileges: root or non-root user with sudo privileges

Update the System

We assume that you have a fresh installation of AlmaLinux 9 so let’s first update the system packages to their latest versions available:

sudo dnf update -y && sudo dnf upgrade -y

Tar.Gz Installation

Tar.Gz can be installed and is compatible with multiple operating systems such as MacOS, Windows and Linux. We will focus of course Linux operating system because AlmaLinux is a Linux distribution. To install tar.gz on AlmaLinux 9, execute the following command:

yum install tar gzip

Once installed, you can check the installed versions of tar and gzip using the following commands:

tar --version

gzip --version

You should get the following output:

[root@host ~]# tar --version
tar (GNU tar) 1.34
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
[root@host ~]# gzip --version
gzip 1.12
Copyright (C) 2018 Free Software Foundation, Inc.
Copyright (C) 1993 Jean-loup Gailly.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License .
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.

How to create Tar.gz files

Now, when the tar.gz is installed, we are going to show you how to create a tar.gz file. Let’s say that we have WordPress files and folders:

[root@host wordpress]# ll
total 228
-rw-r--r--  1 root root   405 Feb  6  2020 index.php
-rw-r--r--  1 root root 19915 Dec 31 18:06 license.txt
-rw-r--r--  1 root root  7402 Mar  4 18:52 readme.html
-rw-r--r--  1 root root  7205 Sep 16  2022 wp-activate.php
drwxr-xr-x  9 root root  4096 May 16 11:45 wp-admin
-rw-r--r--  1 root root   351 Feb  6  2020 wp-blog-header.php
-rw-r--r--  1 root root  2338 Nov  9  2021 wp-comments-post.php
-rw-r--r--  1 root root  3013 Feb 23 04:38 wp-config-sample.php
drwxr-xr-x  4 root root  4096 May 16 11:45 wp-content
-rw-r--r--  1 root root  5536 Nov 23 09:43 wp-cron.php
drwxr-xr-x 28 root root 12288 May 16 11:45 wp-includes
-rw-r--r--  1 root root  2502 Nov 26 15:01 wp-links-opml.php
-rw-r--r--  1 root root  3792 Feb 23 04:38 wp-load.php
-rw-r--r--  1 root root 49330 Feb 23 04:38 wp-login.php
-rw-r--r--  1 root root  8541 Feb  3 07:35 wp-mail.php
-rw-r--r--  1 root root 24993 Mar  1 09:05 wp-settings.php
-rw-r--r--  1 root root 34350 Sep 16  2022 wp-signup.php
-rw-r--r--  1 root root  4889 Nov 23 09:43 wp-trackback.php
-rw-r--r--  1 root root  3238 Nov 29 09:51 xmlrpc.php

We want to compress them in an archive so we can easily upload somewhere or store them locally on our system. To do that, execute the following command inside the WordPress directory:

tar -zcvf wordpress.tar.gz .

This will compress all files and folders of the current directory (That is why we are using dot in the command), and the compressed file will be inside it:

[root@host wordpress]# ll
total 22700
-rw-r--r--  1 root root      405 Feb  6  2020 index.php
-rw-r--r--  1 root root    19915 Dec 31 18:06 license.txt
-rw-r--r--  1 root root     7402 Mar  4 18:52 readme.html
-rw-r--r--  1 root root 23007861 May 19 15:06 wordpress.tar.gz
-rw-r--r--  1 root root     7205 Sep 16  2022 wp-activate.php
drwxr-xr-x  9 root root     4096 May 16 11:45 wp-admin
-rw-r--r--  1 root root      351 Feb  6  2020 wp-blog-header.php
-rw-r--r--  1 root root     2338 Nov  9  2021 wp-comments-post.php
-rw-r--r--  1 root root     3013 Feb 23 04:38 wp-config-sample.php
drwxr-xr-x  4 root root     4096 May 16 11:45 wp-content
-rw-r--r--  1 root root     5536 Nov 23 09:43 wp-cron.php
drwxr-xr-x 28 root root    12288 May 16 11:45 wp-includes
-rw-r--r--  1 root root     2502 Nov 26 15:01 wp-links-opml.php
-rw-r--r--  1 root root     3792 Feb 23 04:38 wp-load.php
-rw-r--r--  1 root root    49330 Feb 23 04:38 wp-login.php
-rw-r--r--  1 root root     8541 Feb  3 07:35 wp-mail.php
-rw-r--r--  1 root root    24993 Mar  1 09:05 wp-settings.php
-rw-r--r--  1 root root    34350 Sep 16  2022 wp-signup.php
-rw-r--r--  1 root root     4889 Nov 23 09:43 wp-trackback.php
-rw-r--r--  1 root root     3238 Nov 29 09:51 xmlrpc.php

The original WordPress directory was 72 megabytes:

[root@host html]# du -csxh wordpress/
72M     wordpress/
72M     total

Now, the compressed file is 22 megabytes which is three times smaller than the WordPress directory:

[root@host wordpress]# du -csxh wordpress.tar.gz
22M     wordpress.tar.gz
22M     total

How to Extract Tar.gz Files

To extract the compressed tar.gz archive, execute the following command:

tar -xzvf wordpress.tar.gz

You can notice now that instead of the c flag, the x flag is used, which means extract.

If you want to know more about the usage of tar, you can execute the following command:

man tar

You should get the following output:

[root@host ~]# man tar
TAR(1)                                                                     GNU TAR Manual                                                                    TAR(1)

NAME
       tar - an archiving utility

SYNOPSIS
   Traditional usage
       tar {A|c|d|r|t|u|x}[GnSkUWOmpsMBiajJzZhPlRvwo] [ARG...]

   UNIX-style usage
       tar -A [OPTIONS] ARCHIVE ARCHIVE

       tar -c [-f ARCHIVE] [OPTIONS] [FILE...]

       tar -d [-f ARCHIVE] [OPTIONS] [FILE...]

       tar -t [-f ARCHIVE] [OPTIONS] [MEMBER...]

       tar -r [-f ARCHIVE] [OPTIONS] [FILE...]

       tar -u [-f ARCHIVE] [OPTIONS] [FILE...]

       tar -x [-f ARCHIVE] [OPTIONS] [MEMBER...]
          .
          .
          .
          .
          .

That’s it. In this blog post, we explained how to install Tar.gz on AlmaLinux 9 and its usage. If you find it difficult to install and use the tar command, you can always sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7

If you liked this post about installing Tar.gz on AlmaLinux 9, please share it with your friends on social networks or simply leave a reply below.

The post How to Install Tar.gz on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-tar-gz-on-almalinux-9/feed/ 0
How to Install Jenkins on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-jenkins-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-jenkins-on-almalinux-9/#respond Tue, 30 May 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1788 In this blog post, we will explain how to install Jenkins on AlmaLinux 9 OS. Jenkins is an open-sourced automation software used to automate the process of the developers. It is used for building, testing, and deploying the apps with the process of continuous integration and continuous delivery. Jenkins is written in Java programming language, […]

The post How to Install Jenkins on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
In this blog post, we will explain how to install Jenkins on AlmaLinux 9 OS.

Jenkins is an open-sourced automation software used to automate the process of the developers. It is used for building, testing, and deploying the apps with the process of continuous integration and continuous delivery. Jenkins is written in Java programming language, running in Java servlet containers such as Apache Tomcat. In this blog post, we will install Jenkins with Apache as a reverse proxy so that you can access it via domain.

Installing Jenkins on AlmaLinux 9 is a straightforward process that may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with AlmaLinux 9 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation of Jenkins, we will update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

To install Java execute the following command::

sudo dnf install java-11-openjdk java-11-openjdk-devel -y

To check the installed Java version, execute the following command:

java -version

You should receive the following output:

[root@host ~]# java -version
openjdk version "11.0.18" 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS, mixed mode, sharing)

Step 3. Install Jenkins

We need to add the Jenkins repo and the GPG key because they are not added by default in the AlmaLinux 9. To do that execute the following commands:

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

Once the repo and key are added, update the system.

sudo dnf update -y

After the update, we can install Jenkins with the following command:

sudo dnf install jenkins -y

To start and enable the Jenkins service to execute the following commands:

sudo systemctl start jenkins && sudo systemctl enable jenkins

To check the status of the Jenkins service, execute the following command:

sudo systemctl status jenkins

You should get the following output:

[root@host ~]# sudo systemctl status jenkins
● jenkins.service - Jenkins Continuous Integration Server
     Loaded: loaded (/usr/lib/systemd/system/jenkins.service; enabled; vendor preset: disabled)
     Active: active (running) since Tue 2023-03-14 02:53:37 CDT; 14s ago
   Main PID: 38472 (java)
      Tasks: 53 (limit: 24796)
     Memory: 1.2G
        CPU: 1min 41.195s
     CGroup: /system.slice/jenkins.service
             └─38472 /usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080

Jenkins is running on port 8080, and you can access it at http://YourIPAddress:8080 to finish the installation.

Step 4. Finish Jenkins Installation

After accessing http://YourIPAddress:8080, you will see this screen without entering a password:

As described in the picture, the initial password can be found by executing the following command on your server:

cat /var/lib/jenkins/secrets/initialAdminPassword

Enter it and hit on the Continue button.

In this window, you can choose to install the suggested plugins or select plugins on your own. We will choose to install the suggested plugins.

The installation will start, and you will need to allow some time to finish.

Once the installation is finished next you need to set up the administrator username, password and email:

The Jenkins URL will be displayed in the next window. Click on Save and Finish.

Now, Jenkins is ready for use. Click on the Start using Jenkins button.

The homepage of Jenkins will be displayed.

Congratulations! You successfully installed Jenkins on AlmaLinux 9. If you find this setup difficult, feel free to contact our technical support via live chat or ticket. We are available 24/7

If you liked this post on how to install Jenkins on AlmaLinux 9, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install Jenkins on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-jenkins-on-almalinux-9/feed/ 0
How to Install and Configure Elasticsearch on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-and-configure-elasticsearch-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-and-configure-elasticsearch-on-almalinux/#comments Mon, 15 May 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1790 Elasticsearch is an open-source search engine built on the Apache Lucene library. Elasticsearch was initially released in 2010 and has become the most popular search engine application ever since. People use Elasticsearch for log analytics, full-text search, operational use cases, etc. Magento, as a well-known e-commerce application also uses Elasticsearch as its search engine. In […]

The post How to Install and Configure Elasticsearch on AlmaLinux appeared first on LinuxHostSupport.

]]>
Elasticsearch is an open-source search engine built on the Apache Lucene library. Elasticsearch was initially released in 2010 and has become the most popular search engine application ever since. People use Elasticsearch for log analytics, full-text search, operational use cases, etc.

Magento, as a well-known e-commerce application also uses Elasticsearch as its search engine. In this tutorial, we will show you how to install and configure Elasticsearch on AlmaLinux.

Prerequisites

  • An AlmaLinux VPS with at least 8GB of RAM
  • root SSH access or a regular user with sudo privileges

Step 1: Log in to your server via SSH

First, you will need to log in to your AlmaLinux 8 VPS via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.

You can check whether you have the proper AlmaLinux version installed on your server with the following command:

# cat /etc/almalinux-release

It will return an output like this.

AlmaLinux release 9.1 (Lime Lynx)

In this article, we are using ‘root’ to execute the shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

Step 2: Update the system

Before starting, you have to make sure that all AlmaLinux OS packages installed on the server are up to date. You can do this by running the following commands:

# yum update
# yum upgrade

Step 3. Install Java

Elasticsearch is based on Java, so we need to install it first. We can simply run this command below to install it from the default repository.

# yum install java-11-openjdk java-11-openjdk-devel

Let’s check java version

# java --version

It will show you an output similar to this:

openjdk 11.0.18 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS, mixed mode, sharing)

Step 4. Add repository

In this step, we are going to add the Elasticsearch repository and then install it from the repository. But, there is an issue with importing the Elastic key on AlmaLinux 9, and it is expected for a workaround, you can invoke this command:

# update-crypto-policies --set LEGACY

then reboot the server

Next, create a file called elasticsearch.repo in the /etc/yum.repos.d/ directory

# nano /etc/yum.repos.d/elasticsearch.repo

Paste the following content into that file

[elasticsearch]
name=Elasticsearch repository for 8.x packages
baseurl=https://artifacts.elastic.co/packages/8.x/yum
gpgcheck=1
gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch
enabled=1
autorefresh=1
type=rpm-md

Save the file, then exit from the editor. Next, let’s update the packages to the latest available version.

# yum update
# yum makecache

Step 5. Install Elasticsearch

Elasticsearch is a memory-intensive application. It requires at least 8GB of RAM to run properly. And in this step, we are going to install it using the repository we added earlier in the previous step. Let’s proceed with the installation.

# yum install elasticsearch

Once installed, the elasticsearch service is not automatically running; let’s execute this command below to run Elasticsearch and enable the service.

# systemctl enable --now elasticsearch

That’s it; Elasticsearch should be up and running now we can verify it by running this command.

# systemctl status elasticsearch

The command will show you an output like this:

[root@almalinux ~]# systemctl status elasticsearch
● elasticsearch.service - Elasticsearch
Loaded: loaded (/usr/lib/systemd/system/elasticsearch.service; enabled; vendor preset: disabled)
Active: active (running) since Fri 2023-03-10 17:30:37 WIB; 54s ago
Docs: https://www.elastic.co
Main PID: 1813 (java)
Tasks: 90 (limit: 10907)
Memory: 1.2G
CPU: 57.850s
CGroup: /system.slice/elasticsearch.service
├─1813 /usr/share/elasticsearch/jdk/bin/java -Xms4m -Xmx64m -XX:+UseSerialGC -Dcli.name=server -Dcli.script=/usr/share/elasticsearch/bin/elasticsearch -Dcli.libs=lib/too>
├─1872 /usr/share/elasticsearch/jdk/bin/java -Des.networkaddress.cache.ttl=60 -Des.networkaddress.cache.negative.ttl=10 -Djava.security.manager=allow -XX:+AlwaysPreTouch>
└─1893 /usr/share/elasticsearch/modules/x-pack-ml/platform/linux-x86_64/bin/controller

Mar 10 17:30:08 almalinux.rosehosting.com systemd[1]: Starting Elasticsearch...
Mar 10 17:30:37 almalinux.rosehosting.com systemd[1]: Started Elasticsearch.

Step 6. Configure Elasticsearch

Elasticsearch has three main configuration files, and you can find them in /etc/elasticsearch directory.

  • elasticsearch.yml for configuring Elasticsearch itself
  • jvm.options for configuring Elasticsearch JVM settings
  • log4j2.properties for configuring Elasticsearch logging

In this step, we are going to modify the elasticsearch.yml file, and the configuration file uses YAML format.

For example, we can edit the listening IP address. By default, Elasticsearch is only accessible on localhost. We can set a different address to expose our Elasticsearch node on the network:

# nano /etc/elasticsearch/elasticsearch.yml

Find this line

#network.host: 192.168.0.1

Uncomment it and modify the IP address. Let’s change it to 0.0.0.0.

network.host: 0.0.0.0

We can also modify the port, it is port 9200 by default, and we can change it to any port we like.

#http.port: 9200

Uncomment and modify the port like this:

http.port: 9222

Save the file, then exit from the editor. Next, restart elasticsearch service.

# systemctl restart elasticsearch

Please note that Elasticsearch uses two ports to listen to external TCP traffic. Port 9200 is used for all API calls over HTTP. This includes search and aggregations and anything else that uses an HTTP request. Port 9300 is a custom binary protocol used for communications between nodes in a cluster.

Congratulations! You have successfully installed Elasticsearch on AlmaLinux 9.

If you are one of our web hosting customers and use our managed Linux Hosting, you don’t have to follow this tutorial and install Elasticsearch on AlmaLinux 9 yourself, our Linux admins will set up and configure an Elasticsearch VPS for you. They are available 24×7 and will take care of your request immediately, and all you need to do is to submit a ticket. We can also help you configure the more complex setup, like configuring Elasticsearch on your Magento website.

PS. If you liked this post, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install and Configure Elasticsearch on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-elasticsearch-on-almalinux/feed/ 2
How To Install Apache Spark on AlmaLinux 9 https://linuxhostsupport.com/blog/how-to-install-apache-spark-on-almalinux-9/ https://linuxhostsupport.com/blog/how-to-install-apache-spark-on-almalinux-9/#respond Sat, 15 Apr 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1777 In this tutorial, we are going to explain in step-by-step detail how to install Apache Spark on AlmaLinux 9 OS. Apache Spark is an open-source unified analytics engine used for data processing large amounts of data. This software stores data in memory and performs the operations very fast using SQL query languages. Apache Spark is […]

The post How To Install Apache Spark on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install Apache Spark on AlmaLinux 9 OS.

Apache Spark is an open-source unified analytics engine used for data processing large amounts of data. This software stores data in memory and performs the operations very fast using SQL query languages. Apache Spark is written in Scala language and is compatible with multiple operating systems such as macOS, Windows, and Linux of course.

Installing Apache Spark and running it as a service is a straightforward process and may take up to 10 minutes. Let’s get things done.

Prerequisites

  • Fresh installation of AlmaLinux 9 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we install Apache Spark we need to update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Java

The application programming interface is written in Java so we need to install Java with the following command:

sudo dnf install java-11-openjdk -y

After the installation you can check the installed Java version with the following command:

java -version

You should get the following output:

[root@vps ~]# java -version
openjdk version "11.0.18" 2023-01-17 LTS
OpenJDK Runtime Environment (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS)
OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-2.el9_1) (build 11.0.18+10-LTS, mixed mode, sharing)

Step 3. Install Apache Spark

We can not install Apache Spark with the command since it is not included in the default repository of AlmaLinux 9. We need to download it manually and extract it in a directory on the server. To do that execute the following commands:

cd /home

curl -O https://www.apache.org/dyn/closer.lua/spark/spark-3.3.2/spark-3.3.2-bin-hadoop3.tgz

gunzip -c spark-3.2.3-bin-hadoop3.2.tgz | tar xvf -

rm spark-3.2.3-bin-hadoop3.2.tgz

mv spark-3.2.3-bin-hadoop3.2/ spark/ 

Step 4. Create System User

We need to create a system user for Apache Spark. To do that execute the following command:

 useradd useradd sparkuser

Once, created you need to set the right permissions of the Apache Spark document root:

chown -R sparkuser:sparkuser /home/spark

Step 5. Create Service files

Now, we need to create two separate services for Apache Spark. Those services are master and slave services required for Apache Spark to work efficiently. We will start with the master service:

Create the master service file first:

touch /etc/systemd/system/spark-master.service

Open the file with your favorite editor and paste the following lines of codes:

[Unit]
Description=Apache Spark Master
After=network.target

[Service]
Type=forking
User=sparkuser
Group=sparkuser
ExecStart=/home/spark/sbin/start-master.sh
ExecStop=/home/spark/sbin/stop-master.sh

[Install]
WantedBy=multi-user.target

Now, create the slave service file.

touch /etc/systemd/system/spark-slave.service

Open the file with your favorite editor and paste the following lines of codes:

[Unit]
Description=Apache Spark Slave
After=network.target

[Service]
Type=forking
User=sparkuser
Group=sparkuser
ExecStart=/home/spark/sbin/start-slave.sh spark://127.0.0.1:7077
ExecStop=/home/spark/sbin/stop-slave.sh

[Install]
WantedBy=multi-user.target

Once, the files are created reload the daemon and start the services:

sudo systemctl daemon-reload

sudo systemctl start spark-master

sudo systemctl start spark-slave

To check the status of the master service execute the following command:

sudo systemctl status spark-master

You should receive the following output:

[root@host spark]# sudo systemctl status spark-master
● spark-master.service - Apache Spark Master
     Loaded: loaded (/etc/systemd/system/spark-master.service; disabled; vendor preset: disabled)
     Active: active (running) since Sat 2023-02-25 05:45:47 CST; 48s ago
    Process: 1274 ExecStart=/home/spark/sbin/start-master.sh (code=exited, status=0/SUCCESS)
   Main PID: 1286 (java)
      Tasks: 34 (limit: 24796)
     Memory: 242.9M
        CPU: 11.958s
     CGroup: /system.slice/spark-master.service
             └─1286 /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el9_1.x86_64/bin/java -cp "/home/spark/conf/:/home/spark/jars/*" -Xmx1g org.apache.spark.deploy.master.

To check the status of the slave service execute the following command:

sudo systemctl status spark-slave

You should receive the following output:

[root@host spark]# sudo systemctl status spark-slave
● spark-slave.service - Apache Spark Slave
     Loaded: loaded (/etc/systemd/system/spark-slave.service; disabled; vendor preset: disabled)
     Active: active (running) since Sat 2023-02-25 05:45:54 CST; 2min 31s ago
    Process: 1350 ExecStart=/home/spark/sbin/start-slave.sh spark://127.0.0.1:7077 (code=exited, status=0/SUCCESS)
   Main PID: 1363 (java)
      Tasks: 33 (limit: 24796)
     Memory: 178.2M
        CPU: 11.086s
     CGroup: /system.slice/spark-slave.service
             └─1363 /usr/lib/jvm/java-11-openjdk-11.0.18.0.10-2.el9_1.x86_64/bin/java -cp "/home/spark/conf/:/home/spark/jars/*" -Xmx1g org.apache.spark.deploy.worker.

That’s it. Now you can access the Apache Spark service on the following URL: http://YourServerIPAddress:8080.

Congratulations! You successfully installed and configured the Apache Spark service on AlmaLinux 9. If you find any difficulties installing this software and service, you can contact our support. All you need to do is to sign up for one of our NVMe VPS plans and submit a support ticket. We are available 24/7.

The post How To Install Apache Spark on AlmaLinux 9 appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-apache-spark-on-almalinux-9/feed/ 0
How To Install ERPNext on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-erpnext-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-erpnext-on-almalinux/#respond Thu, 30 Mar 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1771 In this tutorial, we are going to explain in step-by-step detail how to install ERPNext on AlmaLinux OS. ERPNext or Enterprise Resource Planning is an open-source integrated software solution that collects and organizes business information. ERPNext is built on the Frappe Framework in Python and Javascript that stores the data in the MySQL database server. […]

The post How To Install ERPNext on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to explain in step-by-step detail how to install ERPNext on AlmaLinux OS.

ERPNext or Enterprise Resource Planning is an open-source integrated software solution that collects and organizes business information. ERPNext is built on the Frappe Framework in Python and Javascript that stores the data in the MySQL database server. The framework also uses Nginx as a web server and Redis cache. It is important to know that ERPNext requires only a clean server and has a configuration that needs to be installed from scratch. In this tutorial, we are going to use AlmaLinux 8.5 OS.

Installing ERPNext on AlmaLinux OS can take up to 1 hour. Let’s get things done!

Prerequisites

  • A VPS with at least 4GB of RAM (Our NVMe 4 VPS plan)
  • Fresh install of AlmaLinux 8 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

We need to update the system packages to their latest version available before installation of ERPNext

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Dependencies

To install the required dependencies, execute the following command:

yum groupinstall "Development Tools" -y
yum install epel-release gcc make git openssl-devel zlib-devel bzip2-devel libffi-devel xz-devel redis -y

After installation of the required dependencies, start and enable the Redis service.

sudo systemctl start redis && sudo systemctl enable redis

Step 3. Install Python

The latest version of ERPNext requires python version 3.10. To install the Python 3.10 version, execute the following commands:

cd /opt

wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tar.xz

tar -xvf Python-3.10.0.tar.xz

rm Python-3.10.0.tar.xz

cd Python-3.10.0

./configure --enable-optimizations && make altinstall

After installation, make a symbolic link

ln -s /usr/local/bin/python3.10 /usr/bin/python3

Check the installed version with the following command: python3 -V

You should receive the following output:

[root@host Python-3.10.0]# python3 -V
Python 3.10.0

If there was already a symbolic link, just remove it with the following command:

rm -f /usr/bin/python3

Now, install pip3 and wheel dependencies with the newly installed Python3.10 version:

python3 -m pip install --upgrade pip setuptools wheel

Step 4. Install the MariaDB database server

Next, we need to install the MariaDB database server. To do that, execute the following command:

sudo yum install -y  mariadb mariadb-server

Start and enable the mariadb.service with the following commands:

sudo systemctl start mariadb && sudo systemctl enable mariadb

Check the status of the mariadb.service

sudo systemctl status mariadb

You should receive the following output:

[root@host]# sudo systemctl status mariadb
● mariadb.service - MariaDB 10.3 database server
   Loaded: loaded (/usr/lib/systemd/system/mariadb.service; enabled; vendor preset: disabled)
   Active: active (running) since Fri 2023-02-10 03:59:54 CST; 20s ago
     Docs: man:mysqld(8)
           https://mariadb.com/kb/en/library/systemd/
 Main PID: 47326 (mysqld)
   Status: "Taking your SQL requests now..."
    Tasks: 30 (limit: 23666)
   Memory: 87.4M
   CGroup: /system.slice/mariadb.service
           └─47326 /usr/libexec/mysqld --basedir=/usr

Feb 10 03:59:50 host.test.vps systemd[1]: Starting MariaDB 10.3 database server...
Feb 10 03:59:50 host.test.vps mysql-prepare-db-dir[47223]: Initializing MariaDB database
Feb 10 03:59:54 host.test.vps mysqld[47326]: 2023-02-10  3:59:54 0 [Note] /usr/libexec/mysqld (mysqld 10.3.35-MariaDB) starting as process 47326 ...
Feb 10 03:59:54 host.test.vps systemd[1]: Started MariaDB 10.3 database server.

We must secure the database instance and set MySQL root password:

mysql_secure_installation

Follow the steps to secure the database:

Enter current password for root (enter for none): Hit Enter

Set root password? [Y/n] Y
New password:
Re-enter new password:
Password updated successfully!

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

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Save the MySQL root password since you will need it while installing ERPNext.

Next, we need to add the lines of code below in /etc/my.cnf file:

[mysqld]
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]

default-character-set = utf8mb4

After adding these lines, restart the MariaDB service:

sudo systemctl restart mariadb

Step 5. Install NodeJS

ERPNext’s latest version, 14, requires a newer NodeJS version, such as NodeJS 16. To install nodejs execute the following command:

yum module list nodejs 

yum module enable nodejs:16

yum install nodejs -y

After installation, check the Node and NPM versions with the following command:

node -v && npm -v

You should get the following output:

[root@host]# node -v && npm -v
v16.18.1
8.19.2

After nodejs installation, we will install Yarn:

npm install -g yarn

Check the installed Yarn version with the yarn -v command:

[root@host]# yarn -v
1.22.19

Step 6. Install ERPNext

Finally, we are at the last step of the tutorial, and that step is the installation of ERPNext.

First, create an ERPNext user, add to the wheel group, and set a password.

sudo useradd -m erpnext -G wheel

sudo passwd erpnext

Changing password for user erpnext.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Switch to the erpnext user.

su - erpnext

Go into the /home directory of the erpnext user:

cd /home/erpnext/

Install the Frappe bench version 14 with the following command:

pip3 install --user frappe-bench

bench init frappe-bench --frappe-branch version-14

After the successful installation of the bench, you will receive the following output:

frappe/dist/js/
├─ bootstrap-4-web.bundle.22U72DEL.js                       1.73 Kb
├─ controls.bundle.RQCO7PK6.js                              1228.26 Kb
├─ data_import_tools.bundle.ZHGGYJ52.js                     106.10 Kb
├─ desk.bundle.VYQDF5SY.js                                  1414.14 Kb
├─ dialog.bundle.X36Y7A7S.js                                53.07 Kb
├─ form.bundle.6OYSHLE3.js                                  153.69 Kb
├─ frappe-web.bundle.W6O5MTCM.js                            949.60 Kb
├─ libs.bundle.YZMCKPNH.js                                  574.13 Kb
├─ list.bundle.RERWMHEV.js                                  185.53 Kb
├─ logtypes.bundle.7STJ7YLS.js                              0.73 Kb
├─ recorder.bundle.5AOEUOFD.js                              179.54 Kb
├─ report.bundle.IQ4SSISM.js                                170.93 Kb
├─ user_profile_controller.bundle.YR6XHZRM.js               11.35 Kb
├─ video_player.bundle.UO3KNN5D.js                          120.59 Kb
├─ web_form.bundle.75LN4HKD.js                              1562.54 Kb
├─ print_format_builder.bundle.KP4FAW42.js                  170.39 Kb
├─ build_events.bundle.L2HAVD4K.js                          11.62 Kb
└─ kanban_board.bundle.VCVKXCPT.js                          27.42 Kb

frappe/dist/css/
├─ desk.bundle.MBTR4LD7.css                                 547.98 Kb
├─ email.bundle.D7YLNAJF.css                                4.02 Kb
├─ login.bundle.6T5NJHU5.css                                24.88 Kb
├─ print.bundle.N3SFSER3.css                                196.28 Kb
├─ print_format.bundle.JH7UBL6H.css                         178.93 Kb
├─ report.bundle.HWLJLFER.css                               5.36 Kb
├─ web_form.bundle.YDYF7I73.css                             14.73 Kb
└─ website.bundle.IPR4YLHZ.css                              422.09 Kb

frappe/dist/css-rtl/
├─ desk.bundle.PZAWYDHE.css                                 548.23 Kb
├─ email.bundle.HU2YKLCX.css                                4.02 Kb
├─ login.bundle.FLH267FT.css                                24.88 Kb
├─ print.bundle.ALDGUYEF.css                                196.43 Kb
├─ print_format.bundle.3QFLLY7D.css                         179.05 Kb
├─ report.bundle.LY72JI7U.css                               5.35 Kb
├─ web_form.bundle.L26SZB7K.css                             14.72 Kb
└─ website.bundle.355E5L7G.css                              422.24 Kb

DONE  Total Build Time: 41.861s
Done in 45.98s.
SUCCESS: Bench frappe-bench initialized

Next is to create the website:

cd frappe-bench

bench new-site YourDomainName

The installation will ask for the MySQL root password, and you will need to set up a password for the administrator</b login user.

[erpnext@host frappe-bench]$ bench new-site YourWebsiteName
MySQL root password:
Updating DocTypes for frappe        : [========================================] 100%
Updating country info               : [========================================] 100%
Set Administrator password:
Re-enter Administrator password:
*** Scheduler is disabled ***

Enable the scheduler:

bench --site YourDomainName enable-scheduler

Once the scheduler is enabled, we need to get the ERPNext app and install it with the following commands:

bench get-app erpnext --branch version-14

bench --site YourDomainName  install-app erpnext

Step 7. Setup ERPNext in Production Mode

Now, we can install the bench in production mode with the following substeps:

pip3 install frappe-bench

Next, we will install Nginx and Supervisor:

sudo yum install nginx supervisor -y

After installation, open the /etc/nginx/nginx.conf file and change the Nginx user from root to erpnext.

user erpnext;

Save the file, close it, and start both services:

sudo systemctl start nginx && sudo systemctl enable nginx

sudo systemctl start supervisord && sudo systemctl enable supervisord

Once the services are enabled, create the symbolic links for Nginx, Supervisor, and Python3.10 again:

sudo ln -s `pwd`/config/supervisor.conf /etc/supervisord.d/frappe-bench.ini

sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe-bench.conf

sudo rm /usr/bin/python3

sudo ln -s /usr/local/bin/python3.10 /usr/bin/python3

Once the symbolic links are set, setup nginx and supervisor with the following commands:

bench setup supervisor

bench setup nginx

You should get the following output:

Site YourWebsiteDomain assigned port: 80

The last thing is to restart the services:

sudo systemctl restart supervisord

sudo systemctl restart nginx

sudo supervisorctl start all

Now, you can access your website at http://YourWebsiteDomain using administrator as username and the password you set above.

That’s it. You successfully installed and configured ERPNext 14 on AlmaLinux 8 OS in production mode. If you find this setup difficult, you can always contact our technical support and they will help you immediately. You just need to sign up for one of our NVMe VPS hosting plans with >= 4GB of RAM and submit a support ticket.

If you liked this about installing ERPNext on AlmaLinux, please share it with your friends on social networks or simply leave a reply below.

The post How To Install ERPNext on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-erpnext-on-almalinux/feed/ 0
How to Install Docker CE on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-docker-ce-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-docker-ce-on-almalinux/#respond Wed, 15 Mar 2023 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1768 Docker Community Edition (CE) is a free, open-source, and community-supported version of the Docker platform. Docker CE provides all the essential features to build, ship, and run container applications. It is designed for developers who are just starting out with containerization, as well as for small-scale development and testing environments. Docker CE includes the Docker […]

The post How to Install Docker CE on AlmaLinux appeared first on LinuxHostSupport.

]]>
Docker Community Edition (CE) is a free, open-source, and community-supported version of the Docker platform. Docker CE provides all the essential features to build, ship, and run container applications. It is designed for developers who are just starting out with containerization, as well as for small-scale development and testing environments.

Docker CE includes the Docker Engine, a lightweight runtime and packaging tool, and Docker CLI, a command-line interface for interacting with the Docker Engine. With Docker CE, developers can quickly build, package, and deploy their applications as containers, making it easier to run the same application across multiple environments, such as development, testing, and production.

In the following tutorial, we will show you how to install Docker CE on AlmaLinux server.

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

First, log in to your AlmaLinux  server via SSH as the root user:

# ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address‘ and ‘Port_number‘ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the admin account username if necessary.

Before starting, you have to make sure that all AlmaLinux packages installed on the server are up to date. You can do this by running the following command:

# dnf update

Step 2. Install Docker CE and Docker Compose

By default, the latest Docker CE package is unavailable in the AlmaLinux default repository, so you must add the Docker CE official repository to your server.

To add a Docker CE repository to your AlmaLinux system, run the following command:

# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo

Update the package index by running the following command:

# dnf update

You can check the added repo, including others of your system, using the command:

# dnf repolist -v

Now that the Docker repository has been added to your system, you can continue to install Docker CE:

# dnf install docker-ce docker-ce-cli containerd.io

Once Docker is installed, verify the installed version with the following command:

# docker --version

You should get the following output:

Docker version 23.0.1, build a5ee5b1

Start the Docker CE service by running the following command:

# systemctl start docker

Enable the Docker service to start automatically at boot time by running the following command:

# systemctl enable docker

Verify the service is up and running with the following command:

# systemctl status docker

You should see a similar output with information about Docker being active:

● docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
     Active: active (running) since Fri 2023-02-17 15:36:29 CET; 1min 9s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 49178 (dockerd)
      Tasks: 7
     Memory: 30.6M
        CPU: 160ms
     CGroup: /system.slice/docker.service
             └─49178 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Step 3. Run Docker without root

This step is optional, but if you prefer the ability to run Docker as your current user, add your account to the docker group with this command:

# usermod -aG docker $USER

You need to reboot your system for those changes to take effect.

# reboot

Step 4. Running Docker Containers

Now that you have installed Docker CE on AlmaLinux and set up your user account to run Docker commands, you can run Docker containers.

To run a Docker container, you need to have a Docker image. A Docker image is a pre-built environment for running an application.

Run the following command to pull a Docker image from the Docker Hub repository:

# docker pull hello-world

Note: Replace “hello-world” with the name of the Docker image you want to pull.

Run the following command to start a Docker container:

# docker run -it hello-world

The output should be similar to this:

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/

You can see your locally available images by using the docker images command.

# docker images

If you want to see the container information, you can use the following command:

# docker ps -a

The output should be similar to this:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
519a0de94621 hello-world "/hello" 7 minutes ago Exited (0) 7 minutes ago gracious_hamilton

In this tutorial, we learned how to install Docker CE on your AlmaLinux server and the basics of using it.

Of course, you don’t have to spend your time and follow this article to install Docker CE on AlmaLinux if you have an active AlmaLinux VPS Hosting service with us, in which case you can ask our expert Linux admins to install Docker CE for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post about installing Docker CE on AlmaLinux, please share it with your friends on social networks or leave a reply below.

The post How to Install Docker CE on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-docker-ce-on-almalinux/feed/ 0
How to Install Bagisto Ecommerce on Almalinux https://linuxhostsupport.com/blog/how-to-install-bagisto-ecommerce-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-bagisto-ecommerce-on-almalinux/#respond Sun, 15 Jan 2023 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1751 Bagisto is an open-source eCommerce platform built using Laravel framework and VueJS. The framework is very flexible and easy to use, even for non-tech users. Bagisto offers Multi-Warehouse Inventory; almost everything you need when building an eCommerce website is available in Bagisto. In this tutorial, we will show you how to install Bagisto Ecommerce on […]

The post How to Install Bagisto Ecommerce on Almalinux appeared first on LinuxHostSupport.

]]>
Bagisto is an open-source eCommerce platform built using Laravel framework and VueJS. The framework is very flexible and easy to use, even for non-tech users. Bagisto offers Multi-Warehouse Inventory; almost everything you need when building an eCommerce website is available in Bagisto. In this tutorial, we will show you how to install Bagisto Ecommerce on Almalinux.

Prerequisites

  • A server with AlmaLinux as the operating system
  • Root access or regular access with sudo privileges

Step 1. Log in to your server via SSH

First, you will need to log in to your AlmaLinux VPS via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.

You can check whether you have the proper AlmaLinux version installed on your server with the following command:

# cat /etc/almalinux-release

You will see an output similar to this:

[root@almalinux9 ~]# cat /etc/almalinux-release
AlmaLinux release 9.1 (Lime Lynx)

The shell commands in this article are executed using ‘root’ account. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

Step 2. Update the system

Before starting, you have to make sure that all AlmaLinux OS packages installed on the server are up to date. You can do this by running the following commands:

# dnf update
# dnf upgrade

Step 3. Install and Configure the Web Server

In this tutorial, we are going to use Nginx as the web server. Run this command to install it.

# dnf install nginx -y

Start nginx and enable it on boot.

# systemctl enable --now nginx

Now, let’s create an nginx server block or virtual host.

# nano /etc/nginx/conf/bagisto.conf

Paste the following and make sure you replace bagisto.yourdomain.com with your actual domain or subdomain name:

server {
   listen 80;
   server_name bagisto.yourdomain.com;
   root /opt/bagisto/public;

   add_header X-Frame-Options "SAMEORIGIN";
   add_header X-Content-Type-Options "nosniff";

   index index.php;

   charset utf-8;

   location / {
      try_files $uri $uri/ /index.php?$query_string;
   }

   location = /favicon.ico { access_log off; log_not_found off; }
   location = /robots.txt { access_log off; log_not_found off; }

   error_page 404 /index.php;

   location ~ \.php$ {
      fastcgi_pass unix:/run/php-fpm/www.sock;
      fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
      include fastcgi_params;
   }

   location ~ /\.(?!well-known).* {
      deny all;
   }
}

Save the file, then exit and restart nginx.

# systemctl restart nginx

Step 4. Install MariaDB and Create a Database

In this step, we are going to install the MariaDB server from the default repository. To install the MariaDB server, execute this command:

# dnf install mariadb-server

Let’s run the MariaDB service and enable it on boot.

# systemctl enable --now mariadb

MariaDB has been successfully installed, and it is running; now we can proceed with creating a new database and a user for our Bagisto website.

# mysql

There is no password for root at the moment, so that you can log in to MySQL/MariaDB shell without one.

mysql> CREATE DATABASE bagisto;
mysql> GRANT ALL on bagisto.* to bagisto@localhost identified by 'm0d1fyth15';
mysql> FLUSH PRIVILEGES;
mysql> \q

Make sure to create a stronger database password, and replace m0d1fyth15 in the command above with a stronger password.

Step 5. Install PHP

The default version of PHP available in AlmaLinux 9 is version 8. We can use this PHP version to proceed with Bagisto installation.

Run this command to install PHP and the required extensions

# dnf install php-{bcmath,common,curl,fpm,gd,intl,mbstring,mysqlnd,soap,xml,xsl,zip,cli,devel,pear} libsodium-devel

We would also need to install Sodium, and this can be installed using PECL

# pecl install libsodium

To enable Sodium extension, we can add enable it by adding extension=sodium.so in php.ini file, run this command:

# echo "extension=sodium.so" >> /etc/php.ini

You can check and verify the installed PHP version with this command.

# php -v

It will return an output like this:

[root@almalinux9 ~]# php -v
PHP 8.0.20 (cli) (built: Jun 8 2022 00:33:06) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.20, Copyright (c) Zend Technologies
with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies

Step 6. Install Composer

Composer is a package manager for the PHP programming language that can be used for managing dependencies of PHP software and required libraries.

The installation of Composer is fairly easy and straightforward. Simply download and install Composer with these commands:

# curl -sS https://getcomposer.org/installer -o composer-setup.php
# php composer-setup.php --install-dir=/usr/local/bin --filename=composer

That’s it. You have successfully installed Composer on your AlmaLinux server. To check the Composer version, you can run the following command:

# composer -V

Or

# composer --version

Step 7. Install NodeJS

For this tutorial purpose, we are going to install the latest LTS version of NodeJS. Invoke these commands to add the NodeJS repository, then install it.

# curl -sL https://rpm.nodesource.com/setup_lts.x | bash -
# dnf install nodejs -y

NodeJS has been installed, and we can verify the installation by checking the node and vpm versions.

# node -v; npm -v

You should see this output:

[root@almalinux9 ~]# node -v; npm -v
v18.12.1
8.19.2

Step 8. Install Bagisto using Composer

When running composer using the root account, we would receive a warning message. Since we are using the ‘root’ user in this tutorial to install Bagisto, we need to run this command to allow the root to run composer.

# export COMPOSER_ALLOW_SUPERUSER=1

We should be able to run the composer executable without warning. Next, go to /opt; we will install Bagisto in /opt/bagisto

# cd /opt

Execute the command below to start downloading Bagisto.

# composer create-project bagisto/bagisto

Now, we need to modify the .env file to proceed with the installation.

# nano /opt/bagisto/.env

Make sure to edit the followings:

APP_URL=http://localhost
DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
DB_PREFIX=

You need to use the MySQL database credentials we created earlier. It should look like this:

APP_URL=http://bagisto.yourdomain.com
DB_DATABASE=bagisto
DB_USERNAME=bagisto
DB_PASSWORD=m0d1fyth15
DB_PREFIX=bgs_

Save the changes, then exit from the editor. Now, we can start the installation.

# cd bagisto
# php artisan bagisto:install

The command above will install Bagisto, and you will see an output similar to this:

Congratulations!
The installation has been finished and you can now use Bagisto.
Go to http://bagisto.yourdomain.com/admin and authenticate with:
Email: admin@example.com
Password: admin123

You can use a web browser and navigate to http://bagisto.yourdomain.com/admin now.

Once logged in, you will be brought to the dashboard.

Step 9. Install SSL/TLS Certificate

This step is optional but highly recommended to complete. This step will walk you through SSL installation from Let’s Encrypt using certbot.

# dnf install certbot python3-certbot-nginx

Prior to generating a new SSL certificate for your bagisto.yourdomain.com, make sure that the domain/subdomain DNS A record is already pointing to your server IP address. If there is an issue when generating a free SSL certificate, most likely, the DNS update is not fully propagated.

# certbot

You will get an output like this; you need to answer the prompts.

[root@almalinux9 bagisto]# certbot

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
(Enter 'c' to cancel): you@yourdomain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: n
Account registered.

Which names would you like to activate HTTPS for?
We recommend selecting either all domains, or all domains in a VirtualHost/server block.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: bagisto.yourdomain.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Requesting a certificate for bagisto.yourdomain.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/bagisto.yourdomain.com/fullchain.pem
Key is saved at: /etc/letsencrypt/live/bagisto.yourdomain.com/privkey.pem
This certificate expires on 2023-03-04.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for bagisto.yourdomain.com to /etc/nginx/conf.d/bagisto.yourdomain.com.conf
Congratulations! You have successfully enabled HTTPS on https://bagisto.yourdomain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

That’s it! You have learned how to install Bagisto Ecommerce on Almalinux. Your bagisto website should be accessible at https://bagisto.yourdomain.com.

Of course, you don’t have to install Bagisto Ecommerce on Almalinux if you use one of our Django VPS Hosting services. You can simply ask our expert Linux admins to install Bagisto Ecommerce on Almalinux VPS for you. They are available 24/7 and will take care of your request immediately.

PS. If you liked this post on how to install Bagisto Ecommerce on Almalinux, please share it with your friends on the social networks using the buttons below or simply leave a reply in the comments sections. Thanks.

The post How to Install Bagisto Ecommerce on Almalinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-bagisto-ecommerce-on-almalinux/feed/ 0
How to Install CouchDB on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-couchdb-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-couchdb-on-almalinux/#respond Thu, 15 Dec 2022 18:30:00 +0000 https://linuxhostsupport.com/blog/?p=1735 Apache CouchDB is a free yet reliable non-relational or NoSQL database engine. It is written in Erlang language and natively supports data in JSON format. The data can be accessed and queried via the HTTP protocol, making it easier and more scalable than traditional SQL relational databases like MySQL. CouchDB also offers replication capability and […]

The post How to Install CouchDB on AlmaLinux appeared first on LinuxHostSupport.

]]>
Apache CouchDB is a free yet reliable non-relational or NoSQL database engine. It is written in Erlang language and natively supports data in JSON format. The data can be accessed and queried via the HTTP protocol, making it easier and more scalable than traditional SQL relational databases like MySQL. CouchDB also offers replication capability and provides high availability access. This tutorial will show you how to install CouchDB on AlmaLinux.

Prerequisites

  • An AlmaLinux VPS
  • SSH access with root privileges

Step 1: Log in to your server via SSH

First, you will need to log in to your AlmaLinux VPS via SSH as the root user:

ssh root@IP_Address -p Port_number

You will need to replace ‘IP_Address’ and ‘Port_number’ with your server’s respective IP address and SSH port number. Additionally, replace ‘root’ with the username of the system user with sudo privileges.

You can check whether you have the proper AlmaLinux version installed on your server with the following command:

# cat /etc/redhat-release

You will get an output similar to this:

AlmaLinux release 8.7 (Stone Smilodon)

We use ‘root’ in this article when running the shell commands. If you want to use your regular user with sudo privileges to run the commands, make sure to append ‘sudo’ in front of the commands.

Step 2: Update the System

Before starting, you have to make sure that all AlmaLinux OS packages installed on the server are up to date. You can do this by running the following commands:

# dnf update

Step 3. Install CouchDB

In this step, we will install CouchDB from its default repository. First, we need to install yum-utils package on our AlmaLinux:

# dnf install -y yum-utils

Now you can download and enable the CouchDB repository on your server with the following command:

# yum-config-manager --add-repo https://couchdb.apache.org/repo/couchdb.repo

Then, let’s update our local package index again with this command:

# dnf update

You will be prompted to add the GPG key, and you need to press Y to continue.

Next, use the command below to install CouchDB:

# dnf install -y couchdb

That’s it all, and Apache CouchDB has been successfully installed on your server.

Step 4. Configure CouchDB

In this step, we will configure CouchDB to run on all available IP addresses instead of the default 127.0.0.1 and give a password.

Let’s open the configuration file in /opt/couchdb/etc/local.ini

# nano /opt/couchdb/etc/local.ini

Find the [chttpd] section the uncomment the port and bind address. In the default configuration file, CouchDB is set to listen on 127.0.0.1. You can change it to 0.0.0.0, which means it listens on all interfaces. We can also change it to our specific IP address. So, let’s edit these lines:

[chttpd]
#port = 5984
#bind_address = 127.0.0.1

to

[chttpd]
port = 5984
bind_address = 0.0.0.0

Still, in the same file, scroll down and find the [admins] section. In this section, we can modify our CouchDB user and password.

Change these lines

[admins]
;admin = mysecretpassword

to

[admins]
admin = m0d1fyth15

Save the changes and exit from the file editor. Please make a note about your password because once the CouchDB service is running, the password you specified in the configuration file will be hashed.

Next, we can start and enable it to run upon reboot on your AlmaLinux 8 with the following command:

# systemctl enable couchdb
# systemctl start couchdb

CouchDB is now up and running. We can verify this by checking its status.

# systemctl status couchdb

The command above will give you an output like this:

● couchdb.service - Apache CouchDB
Loaded: loaded (/usr/lib/systemd/system/couchdb.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2022-11-15 20:22:16 CST; 19min ago
Main PID: 6493 (beam.smp)
Tasks: 37 (limit: 11384)
Memory: 47.0M
CGroup: /system.slice/couchdb.service
├─6493 /opt/couchdb/bin/../erts-11.2.2.13/bin/beam.smp -K true -A 16 -Bd -- -root /opt/couchdb/bin/.. -progname couchdb -- -home /opt/couchdb -- -boot /opt/couchdb/bin/../re>
├─6505 /opt/couchdb/bin/../erts-11.2.2.13/bin/epmd -daemon
└─6524 erl_child_setup 65536

Nov 15 20:22:16 almalinux.rosehosting.com systemd[1]: Started Apache CouchDB.

Step 5. Access CouchDB

CouchDB is now running, and we can start working on it. We can use CLI (Command Line Interface) to manage our CouchDB databases, or we can also use the GUI. You can navigate to http://YOUR_IP_ADDRESS/_utils/ and then log in using the username and password you specified earlier in the previous step if you prefer to use its GUI.

Enter the username and password. Then you will be brought to the CouchDB dashboard.

You will see no databases in the dashboard because we have not created one. You can now start working and using CouchDB, like creating a database, creating a cluster, or even database replication.

That’s it! You have successfully installed CouchDB on AlmaLinux

If you are one of our web hosting customers and use our managed Linux Hosting, you don’t have to follow this tutorial and install CouchDB on AlmaLinux yourself; our Linux admins will set up and configure a CouchDB VPS for you. They are available 24×7 and will take care of your request immediately, and all you need to do is to submit a ticket.

PS. If you liked this post, please share it with your friends on social networks or simply leave a reply below. Thanks.

The post How to Install CouchDB on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-couchdb-on-almalinux/feed/ 0
How to Install and Configure CSF on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-and-configure-csf-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-and-configure-csf-on-almalinux/#respond Thu, 15 Sep 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1713 In this tutorial we are going to install and explain in step-by-step detail how to configure CSF on AlmaLinux OS. Config Server Firewall or CSF is a free and advanced firewall for most Linux distributions. CSF can be easily installed on a server with control panels such as DirectAdmin, WHM/cPanel and etc. It includes security […]

The post How to Install and Configure CSF on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to install and explain in step-by-step detail how to configure CSF on AlmaLinux OS.

Config Server Firewall or CSF is a free and advanced firewall for most Linux distributions. CSF can be easily installed on a server with control panels such as DirectAdmin, WHM/cPanel and etc. It includes security features such as login, intrusion, flood detections, and many more. With CSF we can easily block IP addresses, whitelist IP addresses, open and close ports and etc.

Installing and configuring CSF on AlmaLinux is a straightforward process that may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with AlmaLinux 20.04 as OS
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we install the CSF we need to update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Download and Install CSF

Install some prerequisites before you download and install CSF

sudo dnf install epel-release -y

sudo dnf install iptables perl-libwww-perl.noarch perl-LWP-Protocol-https.noarch perl-GDGraph wget tar perl-Math-BigInt -y

Then download the CSF file.

cd /usr/src 

wget https://download.configserver.com/csf.tgz

Once downloaded, extract the csf file with the following command:

tar zxvf csf.tgz

Once extracted enter in the csf directory and execute the script for installation.

cd csf/

sh install.sh

After successfull installation you should receive the following output:

Don't forget to:
1. Configure the following options in the csf configuration to suite your server: TCP_*, UDP_*
2. Restart csf and lfd
3. Set TESTING to 0 once you're happy with the firewall, lfd will not run until you do so

Adding current SSH session IP address to the csf whitelist in csf.allow:
Can't locate lib.pm in @INC (you may need to install the lib module) (@INC contains: /usr/local/lib64/perl5/5.32 /usr/local/share/perl5/5.32 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/sbin/csf line 10.
BEGIN failed--compilation aborted at /usr/sbin/csf line 10.
'lfd.service' -> '/usr/lib/systemd/system/lfd.service'
'csf.service' -> '/usr/lib/systemd/system/csf.service'
Created symlink /etc/systemd/system/multi-user.target.wants/csf.service → /usr/lib/systemd/system/csf.service.
Created symlink /etc/systemd/system/multi-user.target.wants/lfd.service → /usr/lib/systemd/system/lfd.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Created symlink /etc/systemd/system/firewalld.service → /dev/null.
'/etc/csf/csfwebmin.tgz' -> '/usr/local/csf/csfwebmin.tgz'

Installation Completed

As you can see the first message is a reminder that the CSF is not configured. Before we configure CSF, we can check if the required iptables modules are installed. Execute the command below:

sudo perl /usr/local/csf/bin/csftest.pl

If everything is OK, you should receive the following output:

[root@host csf]# sudo perl /usr/local/csf/bin/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing xt_connlimit...OK
Testing ipt_owner/xt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK
Testing iptable_nat/ipt_DNAT...OK

RESULT: csf should function on this server

Step 3. Manage the CSF service

In the previous step we downloaded and installed the CSF. After that, we confirmed that the iptables modules are loaded. Next is to start and enable the CSF service.

To start and enable the CSF service execute the commands below:

sudo systemctl start csf.service && sudo systemctl enable csf.service

To check the status of the CSF service:

sudo systemctl status csf.service

You should receive the following output:

[root@host csf]# sudo systemctl status csf
● csf.service - ConfigServer Firewall & Security - csf
   Loaded: loaded (/usr/lib/systemd/system/csf.service; enabled; vendor preset: disabled)
   Active: active (exited) since Mon 2022-08-08 17:13:49 EDT; 5s ago
 Main PID: 6595 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 23666)
   Memory: 0B
   CGroup: /system.slice/csf.service

Aug 08 17:13:49 host.test.vps csf[6595]: csf: FASTSTART loading UDP_IN (IPv4)
Aug 08 17:13:49 host.test.vps csf[6595]: csf: FASTSTART loading UDP_OUT (IPv4)
Aug 08 17:13:49 host.test.vps csf[6595]: ACCEPT  all opt -- in lo out *  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: ACCEPT  all opt -- in * out lo  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: LOGDROPOUT  all opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: LOGDROPIN  all opt -- in !lo out *  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: csf: FASTSTART loading DNS (IPv4)
Aug 08 17:13:49 host.test.vps csf[6595]: LOCALOUTPUT  all opt -- in * out !lo  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps csf[6595]: LOCALINPUT  all opt -- in !lo out *  0.0.0.0/0  -> 0.0.0.0/0
Aug 08 17:13:49 host.test.vps systemd[1]: Started ConfigServer Firewall & Security - csf.

Step 4. Configuring CSF

In Step 2. we received the following output after the installation process:

1. Configure the following options in the csf configuration to suite your server: TCP_*, UDP_*
2. Restart csf and lfd
3. Set TESTING to 0 once you're happy with the firewall, lfd will not run until you do so.

First add the following ports for TCP in /etc/csf.conf

# Allow incoming TCP ports
TCP_IN = "20,21,22,25,53,80,110,143,443,465,587,993,995"

# Allow outgoing TCP ports
TCP_OUT = "20,21,22,25,53,80,110,113,443,587,993,995"

Next, set Testing to 0

# lfd will not start while this is enabled
TESTING = "0"

End the last is to start the ldf service and restart the CSF for the changes to take effectivity

sudo systemctl start lfd.service

sudo systemctl restart csf.service

Check the status of the lfd service

sudo systemctl status lfd.service

You should receive the following output:

[root@host csf]# systemctl status lfd
● lfd.service - ConfigServer Firewall & Security - lfd
   Loaded: loaded (/usr/lib/systemd/system/lfd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2022-08-08 17:31:26 EDT; 13s ago
  Process: 6961 ExecStart=/usr/sbin/lfd (code=exited, status=0/SUCCESS)
 Main PID: 6970 (lfd - sleeping)
    Tasks: 1 (limit: 23666)
   Memory: 124.2M
   CGroup: /system.slice/lfd.service
           └─6970 lfd - sleeping

Step 5. Basic CSF commands

This is the last step of our tutorial about CSF and in this paragraph we will show you some basic CSF commands.

Enable CSF

csf -e

Whitelist IP address in CSF

csf -a 192.168.1.1

Block IP address in CSF

csf -d 192.168.1.2

Displays the current list of temporary allow and deny IP entries with their TTL and comments

csf -t

Restart CSF

csf -r

Disable CSF

csf -x

That’s it. You successfully installed and configured CSF on AlmaLinux OS. Also, you learned the most used CSF commands in no time. If you find any difficulties with this setup you can always contact our technical support and we will help you immediately. We are available 24/7. You just need to sign up for one of our NVMe VPS plans and submit a support ticket.

If you liked this about installing and configuring CSF on AlmaLinux, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below.

The post How to Install and Configure CSF on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-configure-csf-on-almalinux/feed/ 0
How to install iRedMail on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-iredmail-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-iredmail-on-almalinux/#respond Mon, 15 Aug 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1710 In this tutorial, we are going to install iRedMail on AlmaLinux and explain the installation process in step-by-step detail. iRedMail is an open-source email server software that is capable of supporting the latest IMAP, POP3, and SMTP protocols. In this blog post, we are going to install the iRedMail email server with the installation script. […]

The post How to install iRedMail on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial, we are going to install iRedMail on AlmaLinux and explain the installation process in step-by-step detail.

iRedMail is an open-source email server software that is capable of supporting the latest IMAP, POP3, and SMTP protocols. In this blog post, we are going to install the iRedMail email server with the installation script. In the installation script are included Nginx as a web server, Postfix as a mail transfer agent, Dovecot as IMAP and POP3 server, SpamAssassin as a spam scanner, ClamAV as a virus scanner, OpenLDAP, iRedAPD and etc.

Installing iRedMail on AlmaLinux is a straightforward process and may take up to 10 minutes. Let’s get started!

Prerequisites

  • A server with AlmaLinux 20.04 as OS and a Minimum of 4GB of RAM
  • Valid hostname and domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we start with the installation process it is necessary to update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Download iRedmail

Before we made the installation script executable we need to download it in the “root” directory on our server. The latest stable release of iRedMail can be downloaded with the command below:

wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.6.0.tar.gz

After successful download, extract the file.

tar -xzvf 1.6.0.tar.gz

List the content of the root directory to check if the file is extracted properly.

ls -al

You should receive the following output:

[root@vps ~]# ls
1.6.0.tar.gz  iRedMail-1.6.0

Step 3. Execute the Installation Script

Go into the iRedMail-1.6.0 directory and make the script executable

cd iRedMail-1.6.0/

chmod +x iRedMail.sh

Once done, execute the installation script with the command below:

./iRedMail.sh

Once, the script is executed there will be a couple of windows that you will need to fill with information so you can completely install the iRedMail service.

On the first window, hit Yes to start the installation process.

On the next window, you just need to confirm the storage path by hitting Enter to proceed with the installation.

The next step is to choose Nginx as a web server since you need to access the iRedMail via domain name in the browser.

The next step is to choose the database server. We will choose MariaDB in this tutorial.

Once the database server is checked, the next step is to enter a strong root password.

In the next window, you have to specify your domain name yourdomain.com.

Once, the domain is set, you need to enter the password for the mail domain administrator.

In the next window, just hit the Enter button to proceed with the installation.

On the next 4 questions, just type Y and hit Enter to finish the installation.

Once, the installation is complete, you should receive the following output.

********************************************************************
* URLs of installed web applications:
*
* - Roundcube webmail: https://mail.yourdomain.com/mail/
* - netdata (monitor): https://mail.yourdomain.comk/netdata/
*
* - Web admin panel (iRedAdmin): https://mail.yourdomain.com/iredadmin/
*
* You can login to above links with below credential:
*
* - Username: postmaster@yourdomain.com
* - Password: YourStrongPasswordHere
*
*
********************************************************************
* Congratulations, mail server setup completed successfully. Please
* read below file for more information:
*
*   - /var/www/html/iRedMail-1.6.0/iRedMail.tips
*
* And it's sent to your mail account postmaster@yourdomain.com
*
********************* WARNING **************************************
*
* Please reboot your system to enable all mail services.
*
********************************************************************

You need to reboot the system, and then you can access your iRedMail Web admin panel at https://mail.yourdomain.com/iredadmin/

Once logged in, you will see the iRedMail admin dashboard as described in the picture below:

That’s it. You successfully installed and configured iRedMail mail server software on AlmaLinux OS.

If you do not know how to install iRedMail, you just need to contact our technical support, and they will do the rest. Of course, first, you need to sign up for one of our monthly or yearly NVMe VPS plans. Do not hesitate to contact us anytime. We are available 24/7!

If you liked this post on how to install iRedMail on AlmaLinux OS, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to install iRedMail on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-iredmail-on-almalinux/feed/ 0
How to Install and Secure PhpMyAdmin on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-and-secure-phpmyadmin-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-and-secure-phpmyadmin-on-almalinux/#respond Sat, 30 Jul 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1707 In this tutorial we are going to explain in step-by-step detail how to install and secure PhpMyAdmin on AlmaLinux. PhpMyAdmin is a free and open-source tool written in PHP used for managing MySQL databases via browser. It provides a very easy and user-friendly interface, that allows users to easily create databases, create users, tables columns […]

The post How to Install and Secure PhpMyAdmin on AlmaLinux appeared first on LinuxHostSupport.

]]>
In this tutorial we are going to explain in step-by-step detail how to install and secure PhpMyAdmin on AlmaLinux.

PhpMyAdmin is a free and open-source tool written in PHP used for managing MySQL databases via browser. It provides a very easy and user-friendly interface, that allows users to easily create databases, create users, tables columns and etc in no time. In this blog post, we are going to install PhpMyAdmin with the LAMP stack.

Installing and securing PhpMyAdmin on AlmaLinux is a straightforward process and may take up to 15 minutes. Let’s get started!

Prerequisites

  • A server with AlmaLinux 20.04 as OS
  • Valid domain pointed to the servers IP address
  • User privileges: root or non-root user with sudo privileges

Step 1. Update the System

Before we install the LAMP stack we need to update the system packages to the latest version available.

sudo dnf update -y && sudo dnf upgrade -y

Step 2. Install Apache2 Web Server

To install the Apache2 execute the following command:

sudo dnf install httpd -y

To start and enable the apache service, execute the commands below:

sudo systemctl start httpd && sudo systemctl enable httpd

Check the status of the Apache service:

sudo systemctl status httpd

You should receive the following output:

[root@host ~]# sudo systemctl status httpd
● httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           └─php-fpm.conf
   Active: active (running) since Sun 2022-07-03 11:11:13 CDT; 8min ago
     Docs: man:httpd.service(8)
 Main PID: 4665 (httpd)
   Status: "Total requests: 2; Idle/Busy workers 100/0;Requests/sec: 0.00409; Bytes served/sec:  20 B/sec"
    Tasks: 213 (limit: 23674)
   Memory: 38.0M
   CGroup: /system.slice/httpd.service
           ├─4665 /usr/sbin/httpd -DFOREGROUND
           ├─4670 /usr/sbin/httpd -DFOREGROUND
           ├─4671 /usr/sbin/httpd -DFOREGROUND
           ├─4672 /usr/sbin/httpd -DFOREGROUND
           └─4673 /usr/sbin/httpd -DFOREGROUND

Jul 03 11:11:12 host.test.vps systemd[1]: Starting The Apache HTTP Server...

Step 3. Install PHP8.0 with extensions

First we need to add the repository for PHP8.0 with the command below:

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm

Update the system and list the available php modules

sudo dnf update

sudo dnf module list php

You should receive the following output:

Last metadata expiration check: 0:00:33 ago on Sun 03 Jul 2022 07:22:57 AM CDT.
AlmaLinux 8 - AppStream
Name                           Stream                               Profiles                                             Summary
php                            7.2 [d][e]                           common [d], devel, minimal                           PHP scripting language
php                            7.3                                  common [d], devel, minimal                           PHP scripting language
php                            7.4                                  common [d], devel, minimal                           PHP scripting language
php                            8.0                                  common [d], devel, minimal                           PHP scripting language

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name                           Stream                               Profiles                                             Summary
php                            remi-7.2                             common [d], devel, minimal                           PHP scripting language
php                            remi-7.3                             common [d], devel, minimal                           PHP scripting language
php                            remi-7.4                             common [d], devel, minimal                           PHP scripting language
php                            remi-8.0                             common [d], devel, minimal                           PHP scripting language
php                            remi-8.1                             common [d], devel, minimal                           PHP scripting language

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Select the PHP8.0 with the comands below:

sudo dnf module reset php

sudo dnf module enable php:remi-8.0

sudo dnf install php -y

After sucessfull installation you can check the version with php -v command and receive output similar like this:

[root@host ~]# php -v
PHP 8.0.20 (cli) (built: Jun  8 2022 00:33:06) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.20, Copyright (c) Zend Technologies
    with Zend OPcache v8.0.20, Copyright (c), by Zend Technologies

Step 4. Install MySQL database server

To install MySQL database server execute the following commands:

sudo dnf install mysql-server mysql

Start and enable the mysqld.service with the following commands:

sudo systemctl start mysqld && sudo systemctl enable mysqld

Check the status of the mysqld.service

sudo systemctl status mysqld

You should receive the following output:

[root@host ~]# sudo systemctl status mysqld
● mysqld.service - MySQL 8.0 database server
   Loaded: loaded (/usr/lib/systemd/system/mysqld.service; enabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-07-03 07:53:36 CDT; 2s ago
 Main PID: 39835 (mysqld)
   Status: "Server is operational"
    Tasks: 38 (limit: 23674)
   Memory: 467.1M
   CGroup: /system.slice/mysqld.service
           └─39835 /usr/libexec/mysqld --basedir=/usr

Jul 03 07:53:23 host.test.vps systemd[1]: Starting MySQL 8.0 database server...

Step 5. Download and Install PhpMyAdmin

Go into the default Apache document root directory and download the PHPMyAdmin:

 cd /var/www/html

wget https://files.phpmyadmin.net/phpMyAdmin/5.2.0/phpMyAdmin-5.2.0-all-languages.zip

Once downloaded extract the zip file and rename it to phpmyadmin.

unzip phpMyAdmin-5.2.0-all-languages.zip

mv phpMyAdmin-5.2.0-all-languages/ phpmyadmin/

Set the right permissions:

chown -R apache:apache /var/www/html/

Now, you can access the phpMyAdmin at http://YOURSERVERIPADDRESS/phpmyadmin/ This way we are not able to secure the URL since it is an IP address and the SSL certificate can not be installed on the IP address. In the next steps, we will explain a bit more about this.

Step 6. Create Apache Virtual Host File

First we need to create Apache virtual host file so we can access the phpMyAdmin via a domain name.

touch /etc/httpd/sites-available/phpmyadmin.conf

Open the file with your favorite editor and paste the following lines of code.

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /var/www/html/phpmyadmin
    ErrorLog /var/log/httpd/phpmyadmin_error.log
</VirtualHost>

Save the file, close it and enable the Apache configuration.

ln -s /etc/httpd/sites-available/phpmyadmin.conf /etc/httpd/sites-enabled/

Check the Apache syntax with the command below:

httpd -t

If everything is OK, you should receive the following output:

[root@host html]# httpd -t
Syntax OK

Now, you can restart the Apache service and access your application in browser at http://yourdomain.com

Step 7. Secure the Website with Free Let’s Encrypt SSL certificate

First we need to install the mod_ssl module and the python certbot in order can generate the SSL certificate.

sudo dnf install epel-release mod_ssl -y

sudo dnf install python3-certbot-apache -y

Next we can install the Free Let’s Encrypt SSL certificate with the following command:

sudo certbot --apache --agree-tos --redirect --hsts --staple-ocsp --email admin@yourdomain.com -d yourdomain.com

After successful installation you should see the following output:

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/yourdomain.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/yourdomain.com/privkey.pem
This certificate expires on 2022-10-01.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for yourdomain.com to /etc/httpd/sites-available/phpmyadmin-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on https://yourdomain.com

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
 * Donating to EFF:                    https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Now, you can access your website securely at https://yourdomain.com

Congratulations! You successfully installed PhpMyAdmin on AlmaLinux with the Let’s Encrypt SSL certificate. If you find it difficult to complete these steps feel free to contact us anytime you want. We are available 24/7.

If you liked this post on how to install and secure PhpMyAdmin on AlmaLinux, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.

The post How to Install and Secure PhpMyAdmin on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-and-secure-phpmyadmin-on-almalinux/feed/ 0
How to Install Varnish 7 on AlmaLinux https://linuxhostsupport.com/blog/how-to-install-varnish-7-on-almalinux/ https://linuxhostsupport.com/blog/how-to-install-varnish-7-on-almalinux/#respond Sun, 15 May 2022 17:30:00 +0000 https://linuxhostsupport.com/blog/?p=1670 Varnish is a free, and open-source web application accelerator used for caching website content in memory. It is designed for HTTP to speed up caching of heavy dynamic websites. It is capable of speeding up your website page loading time by a factor of 10x to 300x. This will helps you with your Search Engine […]

The post How to Install Varnish 7 on AlmaLinux appeared first on LinuxHostSupport.

]]>
Varnish is a free, and open-source web application accelerator used for caching website content in memory. It is designed for HTTP to speed up caching of heavy dynamic websites. It is capable of speeding up your website page loading time by a factor of 10x to 300x. This will helps you with your Search Engine Results Page and also improve the user experience on your website.

In this post, we will show you how to install Varnish 7 on AlmaLinux.

Prerequisites

  • An AlmaLinux VPS with root access enabled or a user with sudo privileges.

Log in via SSH and Update your System

First, you will need to log in to your AlmaLinux VPS via SSH as the root user:

ssh root@IP_ADDRESS -p PORT_NUMBER
Next, run the following commands to upgrade all installed packages on your VPS:

dnf update -y

Once all the packages are updated, restart your system to apply the changes.

Add Varnish Repo

By default, the latest version of Varnish is not included in the AlmaLinux default repo. So you will need to disable the default Varnish repo. You can disable it with the following command:

dnf module disable varnish

You will get the following output:

AlmaLinux - AppStream                                                                                     5.6 MB/s | 9.7 MB     00:01    
AlmaLinux - BaseOS                                                                                        8.8 MB/s | 6.8 MB     00:00    
AlmaLinux - Extras                                                                                         28 kB/s |  12 kB     00:00    
Dependencies resolved.
==============================================================================================================================================
 Package                           Architecture                     Version                           Repository                         Size
==============================================================================================================================================
Disabling modules:
 varnish                                                                                                                                     

Transaction Summary
==============================================================================================================================================

Is this ok [y/N]: y
Complete!

Next, install the EPEL repository and add the Varnish 7 repo with the following command:

dnf install epel-release -y
curl -s https://packagecloud.io/install/repositories/varnishcache/varnish70/script.rpm.sh | bash -

Install Varnish 7

Now, you can run the following command to install the Varnish 7 on your server.

dnf install varnish -y

Once the Varnish is installed, you can verify the Varnish version using the following command:

rpm -qi varnish

You will get the Varnish package information in the following output:

Name        : varnish
Version     : 7.0.2
Release     : 1.el8
Architecture: x86_64
Install Date: Wednesday 06 April 2022 03:21:17 PM UTC
Group       : System Environment/Daemons
Size        : 8907085
License     : BSD
Signature   : (none)
Source RPM  : varnish-7.0.2-1.el8.src.rpm
Build Date  : Wednesday 12 January 2022 02:25:34 PM UTC
Build Host  : 7fc509e75620
Relocations : (not relocatable)
URL         : https://www.varnish-cache.org/
Summary     : High-performance HTTP accelerator
Description :
This is Varnish Cache, a high-performance HTTP accelerator.

Manage Varnish Service

By default, the Varnish service is managed by systemd. You can start the Varnish service with the following command:

systemctl start varnish

To enable the Varnish service, run the following command:

systemctl enable varnish

To check the status of the Varnish service, run the following command:

systemctl status varnish

You will get the following output:

● varnish.service - Varnish Cache, a high-performance HTTP accelerator
   Loaded: loaded (/usr/lib/systemd/system/varnish.service; disabled; vendor preset: disabled)
   Active: active (running) since Wed 2022-04-06 15:21:40 UTC; 6s ago
  Process: 25005 ExecStart=/usr/sbin/varnishd -a :6081 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m (>
 Main PID: 25006 (varnishd)
    Tasks: 217
   Memory: 108.5M
   CGroup: /system.slice/varnish.service
           ├─25006 /usr/sbin/varnishd -a :6081 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m
           └─25017 /usr/sbin/varnishd -a :6081 -a localhost:8443,PROXY -p feature=+http2 -f /etc/varnish/default.vcl -s malloc,256m

Apr 06 15:21:39 rockylinux systemd[1]: Starting Varnish Cache, a high-performance HTTP accelerator...
Apr 06 15:21:40 rockylinux varnishd[25006]: Version: varnish-7.0.2 revision 9b5f68e19ca0ab60010641e305fd12822f18d42c
Apr 06 15:21:40 rockylinux varnishd[25006]: Platform: Linux,4.18.0-348.12.2.el8_5.x86_64,x86_64,-junix,-smalloc,-sdefault,-hcritbit
Apr 06 15:21:40 rockylinux varnishd[25006]: Child (25017) Started
Apr 06 15:21:40 rockylinux varnishd[25006]: Child (25017) said Child starts
Apr 06 15:21:40 rockylinux systemd[1]: Started Varnish Cache, a high-performance HTTP accelerator.

Configure Varnish

By default, Varnish listens on port 6081. You can check it with the following command:

ss -antpl | grep varnish

You will get the following output:

LISTEN 0      128          0.0.0.0:6081       0.0.0.0:*    users:(("cache-main",pid=25017,fd=6),("varnishd",pid=25006,fd=6))
LISTEN 0      128             [::]:6081          [::]:*    users:(("cache-main",pid=25017,fd=7),("varnishd",pid=25006,fd=7))

Now, you will need to configure Varnish to listen on port 80. You can do it by editing the Varnish configuration file:

nano /usr/lib/systemd/system/varnish.service

Replace the port 6081 with 80 as shown below:

ExecStart=/usr/sbin/varnishd \
          -a :80 \
          -a localhost:8443,PROXY \
          -p feature=+http2 \
          -f /etc/varnish/default.vcl \
          -s malloc,2g

Save and close the file then reload the systemd daemon to apply the changes:

systemctl daemon-reload

Next, you will also need to edit the Varnish VCL configuration file and define your Nginx backend.

nano /etc/varnish/default.vcl

Define your Nginx backend as shown below:

backend default {
    .host = "127.0.0.1";
    .port = "8080";
}

Save and close the file when you are finished.

Note: Replace 127.0.0.1 with your Nginx web server IP.

Configure Varnish for Nginx

First, install the Nginx web server package with the following command:

dnf install nginx -y

Once the Nginx is installed, you will need to edit the Nginx configuration file and change the listen port from 80 to 8080:

nano /etc/nginx/nginx.conf

Change the default port from 80 to 8080:

    listen       8080 default_server;
        listen       [::]:8080 default_server;

Save and close the file then restart the Nginx service to apply the changes:

systemctl restart nginx

Finally, restart the Varnish service to apply the changes:

systemctl restart varnish

Verify Varnish

At this point, Varnish is installed and configured to work with Nginx. Now it’s time to verify it.

You can verify it using the curl command as shown below:

curl -I http://your-server-ip

If everything is fine, you will get the following output:

HTTP/1.1 200 OK
Server: nginx/1.14.1
Date: Wed, 06 Apr 2022 15:25:48 GMT
Content-Type: text/html
Content-Length: 3429
Last-Modified: Thu, 10 Jun 2021 09:09:03 GMT
ETag: "60c1d6af-d65"
X-Varnish: 2
Age: 0
Via: 1.1 varnish (Varnish/7.0)
Accept-Ranges: bytes
Connection: keep-alive

Of course, if you are one of our Linux VPS hosting customers, you don’t have to install Varnish 7 on your AlmaLinux VPS – simply ask our admins, sit back, and relax. Our admins will install Varnish 7 on AlmaLinux for you immediately.

PS. If you liked this post about how to install Varnish 7 on AlmaLinux VPS, please share it with your friends on the social networks using the buttons below, or simply leave a comment in the comments section. Thanks.

The post How to Install Varnish 7 on AlmaLinux appeared first on LinuxHostSupport.

]]>
https://linuxhostsupport.com/blog/how-to-install-varnish-7-on-almalinux/feed/ 0