LEMP stack running successfully on AlmaLinux

How to install LEMP stack on AlmaLinux

A LEMP stack is an assortment of software that contains everything you need in order to serve a website, show dynamic content, and store or retrieve data from a database. The software is all within the LEMP acronym, namely the Linux operating system, NGINX web server, MySQL database (or MariaDB alternatively), and PHP programming language.

If you’ve installed AlmaLinux or migrated from CentOS to AlmaLinux, then you already have the first requirement done. Next, you just need to get your LEMP stack up and running. In this guide, we’ll show the step by step instructions to install a LEMP stack on AlmaLinux.

Note that it’s also possible to install a LAMP stack on AlmaLinux, which is very similar to LEMP except that it contains Apache as the web server instead of NGINX.

In this tutorial you will learn:

  • How to install all LEMP prerequisite packages on AlmaLinux
  • How to secure MariaDB database
  • How to start NGINX and MariaDB services
  • How to open HTTP and HTTPS firewall ports
LEMP stack running successfully on AlmaLinux

LEMP stack running successfully on AlmaLinux

Read more

Disabling SELinux on AlmaLinux

How to disable SELinux on AlmaLinux

SELinux, which stands for Security Enhanced Linux, is an extra layer of security control built into Red Hat Enterprise Linux and its derivative Linux distributions, such as AlmaLinux. SELinux is enabled by default on the system, and would have to be manually disabled if a user doesn’t wish to use it.

Although SELinux can protect our system through access control for programs and system services, it’s not always necessary to have it enabled. Some users may even find that it interferes with certain programs they try to install. In this guide, we’ll go over the step by step instructions to disable SELinux on AlmaLinux, whether you’ve freshly installed AlmaLinux or migrated from CentOS to AlmaLinux.

In this tutorial you will learn:

  • How to check the status of SELinux
  • How to put SELinux in permissive mode
  • How to disable SELinux
Disabling SELinux on AlmaLinux

Disabling SELinux on AlmaLinux

Read more

Adding a new static route in AlmaLinux

How to add route on AlmaLinux

By default, when a Linux system tries to communicate with a network address, the computer will send the request to the default gateway. The default gateway is usually a router, which can take the system’s request and forward it to the next hop, wherever that may be.

This behavior can be overridden by adding one or more static routes to the Linux machine. Such a configuration can be desirable if the network has multiple networks and routers, and a user needs to instruct the computer which way to route certain traffic.

Red Hat based distributions, such as AlmaLinux, can use the nmcli command line utility to configure static routes, along with the ip route command and manual configuration of ifcfg files. Alternatively, you can use your installed desktop environment to apply the configuration. In this guide, we’ll go over the step by step instructions to add static routes on AlmaLinux through both command line and GUI methods. These instructions are applicable whether you’ve freshly installed AlmaLinux or have migrated from CentOS to AlmaLinux.

In this tutorial you will learn:

  • How to add a route via nmcli command
  • How to add a route via ip route command
  • How to add a route via ifcfg files
  • How to add a route via GNOME GUI
Adding a new static route in AlmaLinux

Adding a new static route in AlmaLinux

Read more

Resetting a user password on AlmaLinux

How to reset password on AlmaLinux

After installing AlmaLinux or migrating from CentOS to AlmaLinux, most users will eventually run into the need to do some user account management, such as adding a new user account or resetting a password.

If you or one of the other users of an AlmaLinux system forgets the password to their account, there’s a simple way to reset the password from either command line or GUI. The same steps can also apply if it’s simply time to change your password or you want to force another user’s password to expire and change.

There are several scenarios that you might encounter that cause you to reset your password.

  1. You need to change a normal user or the root account’s password
  2. You want to force a user to change their password
  3. You have forgotten the root account password

In this guide, we’ll be covering the step by step instructions for problems 1 and 2 mentioned above. If you need help resetting your system’s root password, see our other guide for recovering a root password on RHEL.

In this tutorial you will learn:

  • How to change user or root password via command line
  • How to change user password via GNOME GUI
  • How to force a user’s password to expire and be reset
Resetting a user password on AlmaLinux

Resetting a user password on AlmaLinux

Read more

SSH server enabled and running on AlmaLinux

How to enable SSH on Almalinux

SSH is the primary method of remote access and administration on Linux systems. SSH is a client-server service providing secure, encrypted connections over a network connection. After installing AlmaLinux or migrating from CentOS to AlmaLinux, it will probably be one of the first things you want to configure.

In this guide, we’ll go over the step by step instructions to install and configure SSH on AlmaLinux. This will help you whether you just want to connect to remote systems via SSH or you want your own system to accept incoming connections as well.

In this tutorial you will learn:

  • How to install SSH
  • How to start and stop the SSH service
  • How to allow SSH through system firewall
SSH server enabled and running on AlmaLinux

SSH server enabled and running on AlmaLinux

Read more

ERROR: Unable to find the kernel source tree for the currently running kernel error message on CentOS / RHEL

ERROR: Unable to find the kernel source tree for the currently running kernel – CentOS / RHEL / AlmaLinux

This article will provide you with an information on how to install kernel source on CentOS/RHEL Linux system. Alternatively it will guide you through a simple troubleshootng process in case you have already installed kernel sources/headers and yest still receiving the bellow error message:

  ERROR: Unable to find the kernel source tree for the currently running kernel.  Please make sure you have installed the kernel     
         source files for your kernel and that they are properly configured; on Red Hat Linux systems, for example, be sure you have 
         the 'kernel-source' or 'kernel-devel' RPM installed.  If you know the correct kernel source files are installed, you may    
         specify the kernel source path with the '--kernel-source-path' command line option.

In this tutorial you will learn:

  • How to install kernel-headers
  • How to install kernel-devel
  • How to check kernel version
  • How to check for installed kernel-devel version

Read more

Apache Solr installed on Linux

Apache Solr Linux install

Apache Solr is open source search software. It’s capable of being implemented as an enterprise-level search engine thanks to its high scalability, advanced indexing, fast queries, and ability to integrate with a large variety of applications. It’s capable of tackling big data and also has high availability with its load balancing and failover configurations.

The platform is written in Java and can be installed on Linux systems. In this guide, we’ll show the step by step instructions for installing Apache Solr on some of the most popular Linux distros, including Ubuntu, Debian, CentOS, and Red Hat.

In this tutorial you will learn:

  • How to install Apache Solr on Debian based systems
  • How to install Apache Solr on Red Hat based systems
  • Initial configuration of Apache Solr
Apache Solr installed on Linux

Apache Solr installed on Linux

Read more

SSH login to RHEL 7 server without password

In order to login to RHEL7 Linux server we first need to exchange public keys between server and client machine. To do that we can use ssh-copy-id command.

$ ssh-copy-id user@rhel-server
The authenticity of host 'rhel-server (rhel-server)' can't be established.
ECDSA key fingerprint is 21:4d:71:f6:ef:1f:c1:f7:a9:d9:81:4d:9d:34:4d:a9.
Are you sure you want to continue connecting (yes/no)? yes
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
user@rhel-server's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'user@rhel-server'"
and check to make sure that only the key(s) you wanted were added.

Read more

Mount and install VirtualBox Guest Additions on Redhat 7 linux

RHEL 7 VirtualBox Guest Additions installation

In this short tutorial we will show you how to install VirtualBox Guest Additions on RHEL 7 gnome desktop. To start simply boot to virtual RHEL 7 system. First we will install all prerequisites. To do that open terminal and enter following linux commands:

[root@rhel7 ~]# yum groupinstall 'Development Tools'

as well as we will need kernel development package:

[root@rhel7 ~]# yum install kernel-devel

Read more

How to install Fedora/RHEL/CentOS via kickstart on an existing LUKS device

How to install Fedora/RHEL/CentOS via kickstart on an existing LUKS device

Kickstart installations let us easily script and replicate unattended or semi-unattended installations of Fedora, Red Hat Enterprise Linux or CentOS. The instructions needed to install the operating system are specified, with a dedicated syntax, inside a Kickstart file which is passed to the Anaconda installer. In this tutorial we will see how to reuse an already existing LUKS (Linux Unified Keys Setup) container when performing a Kickstart installation: this is something that cannot be achieved just with Kickstart instructions and requires some extra steps.

In this tutorial you will learn:

  • How to use an existing LUKS container when performing a Kickstart installation of Fedora, RHEL or CentOS
  • How to create and use an updates.img file to be used with the Anaconda installer.

Read more