Amar Host Helpdesk Amar Host Helpdesk
  • Helpdesk Article
  • Forums
My Account
Amar Host Helpdesk Amar Host Helpdesk
My Account
  • Helpdesk Article
  • Forums
  • banner shape
  • banner shape
  • plus icon
  • plus icon

How to Setup AlmaLinux on Your VPS

Updated on November 22, 2025
16 minutes
AlmaLinux,Server Guide
Share

How to Setup AlmaLinux on Your VPS

Or copy link

Clipboard Icon
66 Views

How to Setup AlmaLinux on Your VPS: A Complete Hosting Installation Guide

Introduction: Mastering Your Server Environment

Choosing the right operating system (OS) is the foundational step in deploying any successful online project. For those transitioning away from CentOS due to shifts in its lifecycle, AlmaLinux has emerged as the leading, stable, community-driven, and enterprise-grade alternative. If you are looking to take full control of your cloud resources or dedicated virtual private server (VPS), learning how to Install AlmaLinux on VPS is an essential skill.

This comprehensive guide from Amar Hoster (আমার হোস্টার) will walk you through the entire process, from initial provisioning to final configuration. AlmaLinux provides the stability, security, and performance required for high-traffic websites, robust applications, and intricate database operations. By the end of this tutorial, you will have a perfectly configured server ready for hosting your next big idea.


Prerequisites for a Successful AlmaLinux Installation

Before we dive into the technical steps, it is crucial to ensure you have the necessary foundations in place. A smooth setup relies heavily on proper resource allocation and choosing a reliable hosting partner.

1. Selecting Your VPS Provider and Resources

The performance of your AlmaLinux installation is directly tied to the underlying hardware provided by your host. When selecting your VPS, consider the following:

  • Reliability: Providers like Amar Hoster (আমার হোস্টার) offer VPS services in multiple locations globally (Bangladesh, Germany, Finland, America, Singapore). If your primary audience is in Bangladesh, utilizing BDIX-connected hosting ensures the fastest possible connection speeds.
  • Resources: While AlmaLinux can run minimally, standard web hosting requires sufficient resources:
    • CPU: At least 2 Cores.
    • RAM: Minimum 2 GB (4 GB recommended for production environments or cPanel integration).
    • Storage: 50 GB SSD minimum for general web services.
  • Networking: Ensure your VPS includes a public IP address and stable network uplink.

2. Accessing Your VPS Control Panel

You will need access to the root console or VNC (Virtual Network Computing) interface provided by your hosting control panel. This is essential for the initial boot and installation phase, especially if you are manually installing the OS via an ISO image rather than using a pre-built template.

3. Required Media and Licensing

AlmaLinux is 100% free and open-source. You do not need to purchase any licenses. If your host provides a generic OS installation option, you may need the AlmaLinux installation ISO image, though most reputable VPS providers, including Amar Hoster, offer AlmaLinux as a standard template choice, simplifying the process dramatically.


Step-by-Step Guide: How to Install AlmaLinux on VPS

This guide focuses on the process of provisioning and configuring AlmaLinux, assuming you are starting with a new or freshly reset VPS instance.

Step 1: Provisioning the VPS Instance

The very first step is instructing your VPS control panel to allocate resources and prepare the server for the operating system installation.

  1. Log into the Client Area: Access the control panel provided by Amar Hoster (or your chosen provider).
  2. Select Server Creation/Reinstall: Navigate to the “Servers” or “Virtual Machines” section and choose the option to create a new server or reinstall the operating system on an existing one.
  3. Choose AlmaLinux: In the OS selection menu, find and select the latest stable release of AlmaLinux (e.g., AlmaLinux 9 or 8). Many providers offer templates that save you the manual installation steps. If you are using an ISO, you will need to mount the ISO image via the control panel’s CD-ROM/ISO feature and set the VPS to boot from that media.
  4. Define Resources: Confirm the allocated CPU, RAM, and storage meet your project’s needs.
  5. Start Installation/Reboot: Initiate the provisioning process. If using a template, the system will typically install automatically. If using an ISO, you must access the VNC console immediately after the reboot to interact with the installation wizard.

Step 2: Accessing the VNC Console (If Manual Installation is Required)

For manual installations or highly customized setups, the VNC console allows you to interact with the graphical installer.

  1. Locate VNC/Console Button: In your VPS management panel, click the “VNC Console” or “Remote Desktop” button. A new window displaying the server’s boot sequence will open.
  2. Boot Menu: When prompted, select “Install AlmaLinux” from the boot menu.

Step 3: Navigating the Anaconda Installer

AlmaLinux utilizes the Anaconda installer, which is common across RHEL-based distributions. You will be presented with a centralized screen containing all configuration categories.

3.1. Localization and Language Setup

  • Language: Select your preferred language (e.g., English) and click “Continue.”

3.2. Installation Destination (Disk Setup)

This is one of the most critical steps in the process of Install AlmaLinux on VPS.

  • Select Disk: Choose the primary disk where AlmaLinux will reside (usually the only option available in a standard VPS).
  • Partitioning Scheme:
    • Automatic: Recommended for most users. Anaconda will automatically create standard partitions (e.g., /boot, swap, and the large root partition /) using LVM (Logical Volume Management).
    • Custom (LVM): For advanced users or large storage deployments. LVM provides flexibility to resize partitions later without downtime. If you choose custom, ensure you create a small /boot partition (1 GB), a swap partition (equal to or slightly less than RAM, but max 8GB is often enough), and a primary / (root) partition utilizing the rest of the space.

3.3. Network and Hostname Configuration

  • Network: Typically, the VPS template handles network configuration via DHCP, meaning the interface (e.g., eth0 or ens18) will be set to “ON” and receive an IP automatically.
  • Hostname: Set a descriptive hostname for your server (e.g., webserver1.mycompany.com).

3.4. Software Selection

The choice here determines the complexity and resource usage of your initial installation.

  • Minimal Install: Highly recommended for web hosting and production environments. This installs only the essential command-line tools, maximizing security and minimizing attack surface. You will manually install Apache/Nginx later.
  • Server with GUI: Select this only if you absolutely require a desktop environment for management. (Not recommended for high-performance hosting.)

Step 4: Setting Security Credentials

Before starting the installation, you must secure the system with a root password and create an administrative user.

  • Root Password: Set a strong, complex password for the root user. This user has ultimate control over the system.
  • User Creation: Create a standard, non-root user (e.g., admin). Check the box “Make this user administrator” to allow them to use the sudo command later. This is a vital security practice.

Step 5: Final Review and Installation Execution

Once all required fields are marked as complete (no warning triangles), click “Begin Installation.” The Anaconda installer will format the disks, copy the OS files, and prepare the bootloader. This process may take 10 to 30 minutes, depending on your VPS speed.

Step 6: Reboot and Initial Login

Once the installation is complete, the system will prompt you to “Reboot System.” Remove the installation ISO (if manual setup was used) and allow the system to boot from the newly installed AlmaLinux environment.

  • Login: Access the server via SSH (Secure Shell) using the IP address assigned by your host, or log in via the console using the standard user you created.
    ssh [email protected]
    

This successfully completes the foundational process to Install AlmaLinux on VPS. Now we move to necessary post-installation hardening.


Post-Installation Essential Configurations (System Hardening)

A newly installed AlmaLinux system, even a minimal one, needs immediate updates and configuration to ensure stability and security. These steps are crucial whether you are setting up a small personal website or large-scale hosting infrastructure.

1. Initial System Update

The first action after successfully booting into your new AlmaLinux environment is to update all system packages to their latest versions, patching any security vulnerabilities present in the installation media.

# Switch to the root user or use sudo
sudo dnf update -y

The dnf package manager (the successor to yum) will fetch and install all updates. This step is essential before installing any new applications.

2. Setting Hostname and Timezone

Ensure your server identity and clock are accurately set.

A. Timezone Configuration

Setting the correct timezone is vital for logging, scheduling tasks (cron jobs), and proper application behavior.

# List available timezones
timedatectl list-timezones

# Set your specific timezone (Example: Dhaka)
sudo timedatectl set-timezone Asia/Dhaka

B. Hostname Verification (If not set during installation)

# Set the desired hostname (replace example.com)
sudo hostnamectl set-hostname myhost.example.com

# Verify
hostnamectl

3. Configuring the Firewall (Firewalld)

AlmaLinux uses firewalld as its default dynamic firewall management tool. By default, the minimal installation may block most incoming connections. You must explicitly open ports for services you intend to run (e.g., SSH, HTTP, HTTPS).

A. Ensure Firewalld is Running

sudo systemctl enable firewalld
sudo systemctl start firewalld
sudo systemctl status firewalld

B. Opening Essential Ports

The following commands open the standard ports required for remote management and basic web services. The --permanent flag ensures these rules persist after a reboot.

  • SSH (Port 22): Essential for remote access.
    sudo firewall-cmd --zone=public --add-service=ssh --permanent
    
  • HTTP (Port 80) and HTTPS (Port 443): Required for serving websites.
    sudo firewall-cmd --zone=public --add-service=http --permanent
    sudo firewall-cmd --zone=public --add-service=https --permanent
    

C. Reloading the Firewall

After adding permanent rules, you must reload the service to apply them immediately.

sudo firewall-cmd --reload

4. Securing SSH Access

SSH is your primary entry point, making its security paramount.

A. Disable Root Login (Highly Recommended)

Connecting directly as root is dangerous. If an attacker gains the root password, they have full control. Disable this in the SSH configuration file (/etc/ssh/sshd_config).

  1. Open the configuration file:
    sudo nano /etc/ssh/sshd_config
    
  2. Find the line PermitRootLogin and change its value:
    PermitRootLogin no
    

B. Change the Default SSH Port (Optional but Recommended)

Changing the default port (22) dramatically reduces the automated brute-force attacks against your server. Choose a high, non-standard port (e.g., 50022).

  1. In /etc/ssh/sshd_config, find the line #Port 22 and change it:
    Port 50022
    
  2. Crucial Step: You must open the new port in the firewall before restarting SSH, otherwise you will be locked out.
    sudo firewall-cmd --zone=public --add-port=50022/tcp --permanent
    sudo firewall-cmd --reload
    
  3. Restart the SSH service:
    sudo systemctl restart sshd
    

Now, when you connect via SSH, you must specify the new port: ssh [email protected] -p 50022.

By performing these steps, you have successfully secured the foundation of your server after you Install AlmaLinux on VPS.


Preparing the VPS for Web Hosting (LAMP/LEMP Stack Installation)

The goal of most users who Install AlmaLinux on VPS is to run a website, blog, or application. This requires installing a complete web stack. The two most common stacks are LAMP (Linux, Apache, MySQL/MariaDB, PHP) and LEMP (Linux, Nginx, MySQL/MariaDB, PHP). We will outline the LAMP setup, which is standard for hosting environments like those offered by Amar Hoster.

1. Installing the Web Server (Apache)

We will use the httpd package, which is the Apache web server implementation for RHEL-based systems.

# Install Apache
sudo dnf install httpd -y

# Enable Apache to start on boot and start the service now
sudo systemctl enable httpd
sudo systemctl start httpd

Since you already opened ports 80 and 443 in the previous firewall steps, Apache should be immediately accessible. You can test this by navigating to your VPS IP address in a browser.

2. Installing the Database Server (MariaDB)

MariaDB is a robust, community-developed fork of MySQL and is the preferred database server for AlmaLinux.

# Install MariaDB server
sudo dnf install mariadb-server -y

# Enable and start the service
sudo systemctl enable mariadb
sudo systemctl start mariadb

Securing MariaDB

Immediately after installation, run the security script to set the root password and remove insecure defaults.

sudo mysql_secure_installation

Follow the prompts: set the root password, remove anonymous users, disallow remote root login, and remove the test database.

3. Installing PHP

PHP is the scripting language used by most modern web applications, including popular CMS platforms like WordPress. Amar Hoster supports multiple versions, and you should install the version most appropriate for your application. We will use the standard repository, which typically installs PHP 8.x.

# Install necessary PHP packages for web hosting compatibility
sudo dnf install php php-cli php-fpm php-mysqlnd php-gd php-curl php-zip php-json -y

Configuring PHP for Apache

By default, the PHP installation may use PHP-FPM (FastCGI Process Manager). For Apache, we need to ensure the correct modules are loaded, or sometimes ensure PHP-FPM is configured to work with Apache.

  1. If using php-fpm with Apache: Ensure PHP-FPM is running and configured to use the apache user.
    sudo systemctl enable php-fpm
    sudo systemctl start php-fpm
    
  2. Configuration Check: Restart Apache to ensure it recognizes the new PHP modules:
    sudo systemctl restart httpd
    

4. Deploying Your First Website

With the stack installed, you can now host content. The default web root for Apache on AlmaLinux is usually /var/www/html/.

  1. Create a test PHP file (e.g., info.php):
    sudo nano /var/www/html/info.php
    

    Add the following content:

    <?php
    phpinfo();
    ?>
    
  2. Adjust Permissions: The Apache process needs read access to the files.
    sudo chown -R apache:apache /var/www/html
    sudo chmod -R 755 /var/www/html
    
  3. Test: Navigate to http://your.vps.ip.address/info.php. If you see the detailed PHP configuration page, your LAMP stack is running successfully after you Install AlmaLinux on VPS.

Integrating Managed Hosting Features

If you plan on installing a CMS like WordPress, note that while the manual AlmaLinux setup gives you flexibility, simpler hosting packages from Amar Hoster, such as the Budget hosting starting at 160 Tk or Premium hosting starting at 430 Tk, come with pre-configured cPanel environments that allow one-click installs. If you ever decide to move away from self-management, you can rely on the automated tools.

If you are determined to use this AlmaLinux VPS for WordPress, you will need to:

  1. Manually create the database using MariaDB commands (or phpMyAdmin).
  2. Download the WordPress files to /var/www/html/.
  3. Configure the wp-config.php file.

(For a simplified installation process on a managed platform, please refer to the Amar Hoster video guide on WordPress installation: https://youtu.be/OoJMkdyJJm8).


Advanced Optimization and Management

Achieving long-term stability requires ongoing maintenance and optimization. These steps further refine your AlmaLinux environment.

1. Enabling SELinux (Mandatory Access Control)

AlmaLinux leverages SELinux (Security-Enhanced Linux), a powerful security module. While many guides suggest disabling SELinux because it can complicate configuration, keeping it enabled is essential for enterprise-level security.

When configuring web applications (especially custom installations or non-standard ports), SELinux may block operations. Instead of disabling it, use the semanage tool to adjust policies.

  • Check Status:
    sestatus
    
  • Troubleshooting: If an application is blocked, the audit.log will contain clues. You can install the SELinux troubleshooting tools:
    sudo dnf install setroubleshoot-server
    

    The setroubleshoot tool can often generate commands to fix policy issues.

2. Installing Useful Management Tools

To efficiently manage and monitor your server after you Install AlmaLinux on VPS, install these utilities:

  • Nano (Text Editor): Often easier than vi for beginners.
    sudo dnf install nano -y
    
  • Htop (Process Viewer): A dynamic real-time system monitoring tool.
    sudo dnf install htop -y
    
  • Wget/Curl: Necessary for downloading files from the command line.

3. Implementing Automated Backups

Data loss is the single biggest threat to any hosting environment. While Amar Hoster provides robust infrastructure options, implementing off-server backups is critical.

  • Scripting: Write a simple cron job to regularly dump your MariaDB databases and compress your web directories.
  • Storage: Securely transfer these compressed archives to a separate storage location (S3 bucket, remote SFTP, etc.).

If you encounter a disaster or need a specific rollback, our support team at Amar Hoster can often assist with server-level issues. If you require a full state rollback, you can open a support ticket directly at: https://go.amar.host/openticket.

4. Monitoring Resource Usage

As your website grows, you may need to scale your VPS resources (RAM, CPU). Use htop to regularly monitor:

  • Load Average: High numbers indicate resource contention.
  • Memory Usage: If PHP or the database constantly swap to disk, you need more RAM.

If you are using a non-BDIX Global location, and notice latency issues for your Bangladeshi audience, consider migrating to a BDIX Premium Hosting package available at Amar Hoster. Migration is typically free, and you can initiate a transfer hosting request via a ticket here: panel.amarhoster.com/submitticket.php?step=2&deptid=9.


Troubleshooting Common Issues After AlmaLinux Installation

Even a perfect process to Install AlmaLinux on VPS can sometimes yield minor post-install issues.

IssuePotential CauseSolution
“Connection Refused” on SSHSSH port not open in Firewalld, or SSH service is down.Ensure firewall-cmd --list-all shows your port (22 or custom port) is open. Restart sshd service.
PHP code shows as plain textPHP module not loaded by Apache, or php-fpm is not running.Verify php-fpm is active (sudo systemctl status php-fpm). Ensure PHP packages are fully installed.
Cannot connect to MariaDBDatabase service is down, or firewall is blocking the port (3306).Check status (sudo systemctl status mariadb). Ensure MariaDB is listening on 127.0.0.1 or the correct network interface.
Permission Denied (403 Error)Incorrect file ownership or restrictive SELinux policy.Check file permissions (ls -l /var/www/html). Change ownership to apache:apache if needed. Use setroubleshoot to identify and fix SELinux denials.
Can’t Install New PackagesDNF repository cache is outdated or connection is blocked.Run sudo dnf clean all followed by sudo dnf update. Check network connectivity (ping 8.8.8.8).

Getting Further Assistance from Amar Hoster

If you are struggling with a complex configuration issue on your server after you Install AlmaLinux on VPS, Amar Hoster offers multiple robust support channels:

  • Live Chat: For immediate help with common questions.
  • WhatsApp: Contact 01406155756.
  • Support Ticket: For technical, in-depth issues requiring server access, submit a detailed ticket at panel.amarhoster.com/submitticket.php.

We understand that server management can be challenging. Whether you need help connecting a domain (Video: https://youtu.be/thbcPactI1o) or configuring your webmail (Video: https://youtu.be/ZkRr5wlu6EI), our team is ready to assist.


Conclusion: Empowering Your Hosting Journey

Learning how to Install AlmaLinux on VPS gives you a distinct advantage: a powerful, stable, and highly customizable hosting environment that rivals major enterprise solutions. AlmaLinux ensures compatibility with RHEL, providing a predictable environment that will receive security updates for years to come.

By following this comprehensive guide, you have successfully moved from a blank slate to a fully secured and operational web server, ready to handle traffic and deploy applications.

Remember that while self-managing a VPS running AlmaLinux offers maximum control, you always have the option to switch to a simpler, cPanel-driven environment with Amar Hoster (আমার হোস্টার) if your needs change. We offer flexible hosting solutions, including yearly hosting cycles (3, 6, 12, 24, 36 months), and easy payment methods including PayPal, Card, and local options like bKash/Nagad/Rocket.

Start building your next online project today with the reliability and speed of AlmaLinux and the dedicated support of Amar Hoster! For domain registration, remember that high-value domains like .COM are available for just 1099 Tk.

Contact Amar Hoster:

  • Phone: +88 0961 3825 013
  • Email: [email protected]
  • Website: www.amarhoster.com
Tags : AlmaLinux AlmaLinux installation Installation guide Linux server Server setup Virtual Private Server VPS configuration VPS hosting

Related Post

how-to-fix-error-fetching-installed-ssl-certs-in-cpanel
3 minutes cPanel

How to Fix Error Fetching Installed SSL Certs

If you are trying to install or manage an SSL certifica...

increase mysql database upload limit phpmyadmin whm
2 minutes WHM

How to Increase MySQL Database Upload Limit i

When working with large databases, default upload limit...

Leave a Comment Cancel reply

Recent Posts

SMTP Integration Guide with AmarHost
4 minutes January 19, 2026
How to Access Amarhost Shared Hosting via SSH using PuTTY
3 minutes January 19, 2026
VIP Member at AmarHost
Become a VIP Member at AmarHost and Unlock Exclusive Deals & Discounts
3 minutes January 9, 2026
How to Protect Your Website from SQL Injection, XSS, DDoS, and Hacking
How to Protect Your Website from SQL Injection, XSS, DDoS, and Hacking
4 minutes December 23, 2025

Recent Comments

    Categories

    • AlmaLinux
    • Cloudflare
    • cPanel
    • Domain
    • Domain Guide
    • Getting Started
    • Hosting
    • Hosting Guide
    • Hosting Offer
    • Laravel
    • Script
    • Server
    • Server Guide
    • SMTP
    • Website & Apps
    • Webuzo
    • WHM
    • WordPress

    Tags

    .COM Domain Affordable Domains Affordable Pricing AlmaLinux Amar Hoster Buy .COM CDN Cheap Domains Cloudflare Cloudflare tutorial cPanel cPanel Email database DNS setup Domain Names Domain Registration Domain Transfer Email Deliverability Fast Website Speed Hosting Provider https://www.amar.host/affordable-com-domain-registration-starting-at-1099-tk-with-amar-hoster/ Installation guide Local Hosting PHPMailer Port 465 Port 587 Register Domain security setup guide SMTP Integration SMTP Settings SPF and DKIM SSD Hosting SSL TLD Registration Transactional Email VPS hosting Web Hosting Web Hosting Guide website performance website security website speed whm WordPress SMTP WP Mail SMTP
    January 2026
    SMTWTFS
     123
    45678910
    11121314151617
    18192021222324
    25262728293031
    « Dec    
    Leaf Illustration

    © 2025 All Rights Reserved by Amar Host