Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      May 16, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      May 16, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      May 16, 2025

      How To Prevent WordPress SQL Injection Attacks

      May 16, 2025

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025

      Minecraft licensing robbed us of this controversial NFL schedule release video

      May 16, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      The power of generators

      May 16, 2025
      Recent

      The power of generators

      May 16, 2025

      Simplify Factory Associations with Laravel’s UseFactory Attribute

      May 16, 2025

      This Week in Laravel: React Native, PhpStorm Junie, and more

      May 16, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025
      Recent

      Microsoft has closed its “Experience Center” store in Sydney, Australia — as it ramps up a continued digital growth campaign

      May 16, 2025

      Bing Search APIs to be “decommissioned completely” as Microsoft urges developers to use its Azure agentic AI alternative

      May 16, 2025

      Microsoft might kill the Surface Laptop Studio as production is quietly halted

      May 16, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Development»How to Install PHP 8.4-7.4 on RHEL 9

    How to Install PHP 8.4-7.4 on RHEL 9

    December 11, 2024

    PHP is a popular programming language widely used by developers for creating dynamic and robust web applications. It is known for its simplicity, flexibility, and extensive support for modern frameworks and libraries. Most of the popular CMS applications (eg: WordPress, Drupal etc.) are still using PHP programming language. As of today, the latest PHP version is 8.4, recommended for use in production environments.

    REMI is an one of the most trusted RPM repository that provides PHP versions ranging from 7.4 to 8.4. Using this repository, you can easily manage and install multiple PHP versions on your system.

    This tutorial will guide you through the installation of PHP 8.4 or any previous version, including PHP 7.4, on a RHEL 9 system.

    Prerequisites

    Before starting, ensure you meet the following requirements:

    • A running RHEL 9 system
    • Shell access with a user that has sudo privileges

    Step 1: Update System Packages

    It is always a best practice to ensure your system packages are up-to-date. This helps avoid compatibility issues and ensures system security. The following command will update all existing packages to latest available version in repositories.

    sudo dnf update 
    

    Be careful on production servers to fulfill the compatibility of packages with the applications.

    Step 2: Enable RPM Repositories

    The RPM packages for php software are still maintained by the REMI repository. Also the REMI repository required the EPEL rpm repository to be configured on system. To install PHP from the REMI repository, you also need to enable the EPEL and REMI both repositories.

    • Use the following command to enable the EPEL repository:
      sudo dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm 
      
    • To Enable the REMI repository, type:
      sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm 
      

    Step 3: Install PHP 8.4

    The REMI repository provides the module for the multiple PHP versions. To install PHP 8.4, enable the corresponding REMI module and proceed with the installation:

    sudo dnf module enable php:remi-8.4
    

    This will enable the PHP 8.4 module and begin the PHP installation. If in case, PHP installation not begins, then type the following command to start PHP installation:

    sudo dnf install php
    

    Once the installation finished, verify the installation by checking the PHP version:

    php -v 
    

    The output should display the installed PHP version, confirming a successful installation:

    Step 4: Install Additional PHP Modules

    Generally applications relies on multiple additional PHP modules, which is required to be installed on your system. First you need to identify which modules is required for your application. Then search for the available modules using the following command:

    sudo dnf search php-* 
    

    For example, to install commonly used modules like GD, MySQL, XML, and SOAP, use:

    sudo dnf install php-gd php-mysqlnd php-xml php-soap 
    

    Step 5: Test PHP Installation

    To confirm the PHP installation is working, you can create a test script. Save the following code into a file named info.php in your web server’s root directory (e.g., /var/www/html):

    
    <?php phpinfo(); ?> 
     
    

    Access the file in a web browser by navigating to http://<your-server-ip>/info.php. If PHP is installed correctly, you will see the PHP information page.

    Conclusion

    This tutorial has provided step-by-step instructions to install PHP 8.4 on a RHEL 9 system, along with enabling repositories and installing additional PHP modules. You can now begin developing or deploying web applications using PHP.

    The post How to Install PHP 8.4-7.4 on RHEL 9 appeared first on TecAdmin.

    Source: Read More

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleCodeQL zero to hero part 4: Gradio framework case study
    Next Article Fluid Superscripts and Subscripts

    Related Posts

    Machine Learning

    Salesforce AI Releases BLIP3-o: A Fully Open-Source Unified Multimodal Model Built with CLIP Embeddings and Flow Matching for Image Understanding and Generation

    May 16, 2025
    Security

    Nmap 7.96 Launches with Lightning-Fast DNS and 612 Scripts

    May 16, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Is Elon Musk buying TikTok? ByteDance refutes recent rumor

    Operating Systems

    Lightning AI Studio Vulnerability Allowed RCE via Hidden URL Parameter

    Development

    Next.js Form Validation Using Server Actions by Zod

    Development

    Wearable Accelerometer Foundation Models for Health via Knowledge Distillation

    Machine Learning

    Highlights

    Linux

    Rilasciata BleachBit 5.0: la nuova versione del software open source per la pulizia di sistema su GNU/Linux

    May 7, 2025

    BleachBit è uno strumento open source per la pulizia di sistema, progettato per aiutare le…

    10-Step Guide to Closing Your Books at the End of the Year

    June 10, 2024

    5 BCDR Essentials for Effective Ransomware Defense

    May 15, 2025

    Gemini 2.5: Our most intelligent AI model

    March 25, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.