Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Linux Distributions»Amazon Linux»How to Install Apache 2.4 & PHP 7.4 on Amazon Linux

    How to Install Apache 2.4 & PHP 7.4 on Amazon Linux

    By RahulAugust 18, 20223 Mins Read

    Did you know that Amazon Linux is a freely-available and supported operating system that is tailor-made for AWS? It’s true! Amazon has launched a new version of its Linux distribution — Amazon Linux version 2 (Amazon Linux v2), which comes with some really interesting features and enhancements. This blog post introduces you to the new version of Amazon Linux, covers its key features, and teaches you how to install Apache & PHP on Amazon Linux 2. Let’s get started!

    Advertisement

    Step 1 – Initial Setup

    Log in to your Amazon Linux 2 system via SSH. Its good to keep packages up to date, so execute the following command to update yum packages to the latest:

    sudo yum update 
    

    Step 2 – Install Apache 2.4

    The Apache (httpd) packages are available under the default yum repositories on Amazon Linux 2 systems. Execute the following command on the terminal to install Apache with mod_ssl:

    sudo yum install httpd httpd-tools mod_ssl 
    

    The httpd package will install Apache (HTTPD) web server and the mod_ssl added the extension, that will provide cryptographic support to the web server.

    Once the installation is finished, You need to enable httpd service to auto-start on system boot. Also, start the service once.

    sudo systemctl enable httpd 
    sudo systemctl start httpd 
    

    Apache has been installed on your Amazon Linux system. Access to the server in a web browser using an IP address, This will show you the default Apache page.

    Installing Apache on Amazon Linux
    Apache default home page

    Step 3 – Installing PHP

    PHP’s latest versions are available under amazon-linux-extras repositories. The latest Amazon Linux systems install this package by default. To install or upgrade this package, run the following command:

    sudo yum install amazon-linux-extras -y
    

    Once the extras repository is configured on your system. Search for the available PHP versions under the extras repository.

    sudo amazon-linux-extras | grep php 
    
    PHP Repository for Amazon Linux
    PHP Repository for Amazon Linux

    Next, enable the desired topic for the PHP version. The following command will enable PHP 7.4 topic on your Amazon Linux 2 system. You can also choose another PHP version listed in the above command:

    sudo amazon-linux-extras enable php7.4 
    

    Finally, install the required PHP packages along with the required PHP extensions.

    sudo yum clean metadata 
    sudo yum install php php-common php-pear 
    sudo yum install php-{cgi,curl,mbstring,gd,mysqlnd,gettext,json,xml,fpm,intl,zip}  
    

    PHP has been successfully installed on your Amazon Linux machine.

    Type the below command to check the PHP version:

    php -v 
    
    PHP 7.4.30 (cli) (built: Jun 23 2022 20:19:00) ( NTS )
    Copyright (c) The PHP Group
    Zend Engine v3.4.0, Copyright (c) Zend Technologies
    

    To check the active version for Apache, create a PHP info file under the default document root using the following command.

    echo "<?php phpinfo(); ?>" > /var/www/html/info.php 
    

    Access the info.php file in a web browser:

    http://server-ip/info.php

    Installing PHP 7 on Amazon Linux

    Step 4 – Create A New Virtual Host

    After installing packages create your first virtual host. To create a virtual host for your domain example.com, edit the Apache configuration file and create a virtual host like the below:

    vi /etc/httpd/conf.d/example.com.conf 
    

    1
    2
    3
    4
    5
    6
    7
    8
    9
    <VirtualHost *:80>
        ServerAdmin webmaster@example.com
        ServerName example.com
        ServerAlias www.example.com
        DocumentRoot /var/www/example.com
     
        ErrorLog /var/log/httpd/example.com-error_log
        CustomLog /var/log/httpd/example.com-access_log combined
    </VirtualHost>

    After changing restart of the Apache service

    sudo systemctl restart httpd 
    

    Conclusion

    In this tutorial, you have learned to install Apache 2.4 and PHP 7.4 on your Amazon Linux machine.

    MySQL installation is not part of this tutorial. So if you also need MySQL server on your Amazon Linux, follow this tutorial.

    Amazon Linux Apache2.4 PHP PHP7
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    Installing PHP on Pop!_OS

    How to Install PHP 8.x on Pop!_OS

    Managing Dependencies with Composer: A Beginner’s Guide

    10 Simple Ways to Speed Up Your WordPress Website

    10 Simple Ways to Speed Up Your WordPress Website

    View 13 Comments

    13 Comments

    1. aniket y patil on April 29, 2022 5:44 am

      *********************** Change PHP version *****************************
      step.1
      sudo yum-config-manager –enable epel

      yum install dnf -y

      step.2
      yum install epel-release yum-utils -y

      step.3
      yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm

      step.4
      dnf install php74.x86_64

      step.5
      dnf clean metadata

      step.6
      dnf install php-cli php-pdo php-fpm php-json php-mysqlnd

      step.7
      dnf list installed php-cli php-pdo php-fpm php-json php-mysqlnd

      step.8
      which php

      step.9
      php -v

      step.10
      yum update

      step.11
      sudo systemctl restart httpd

      Reply
    2. Kapil on February 4, 2022 7:14 am

      It worked like a charm!!!

      Reply
    3. Fraganya on August 13, 2021 8:15 am

      Thanks a bunch.worked liked magic

      Reply
    4. Jordani da Silva da Cruz on June 17, 2021 4:30 am

      Thankss!!!!!!!!!!!!!!!!!!!!!!!! The best!!!

      Reply
    5. Jamil on December 7, 2020 5:40 pm

      Can we install / upgrade to php version 7.4.13 instead of default 7.4.11?

      Reply
      • Rahul on December 7, 2020 6:41 pm

        Hi Jamil,
        Have you tried the installation? You may get the latest version as this article was written few months ago.

        Reply
    6. Lucas Selbach on November 25, 2020 1:18 am

      I just can´t upgrade from 7.2.34 to 7.4
      it gives me
      refuse because php7.4 could cause an invalid combination

      And also the services for wordpress work
      dom, mbstring, imagick, gd

      Just don´t install using the above command, give me a long error list

      Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
      Package matching php-cli-7.2.24-1.amzn2.0.1.x86_64 already installed. Checking for update.
      Package matching php-common-7.2.24-1.amzn2.0.1.x86_64 already installed. Checking for update.
      Package matching php-mysqlnd-7.2.24-1.amzn2.0.1.x86_64 already installed. Checking for update.
      Package matching php-common-7.2.24-1.amzn2.0.1.x86_64 already installed. Checking for update.
      Package matching php-json-7.2.24-1.amzn2.0.1.x86_64 already installed. Checking for update.
      Package matching php-fpm-7.2.24-1.amzn2.0.1.x86_64 already installed. Checking for update.
      Resolving Dependencies
      –> Running transaction check
      —> Package php-gd.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-gd-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libX11.so.6()(64bit) for package: php-gd-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-intl.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-intl-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-mbstring.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-mbstring-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libonig.so.2()(64bit) for package: php-mbstring-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-pecl-zip.x86_64 0:1.15.2-3.amzn2.0.1 will be installed
      —> Package php-xml.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Running transaction check
      —> Package libX11.x86_64 0:1.6.7-2.amzn2 will be installed
      –> Processing Dependency: libX11-common >= 1.6.7-2.amzn2 for package: libX11-1.6.7-2.amzn2.x86_64
      –> Processing Dependency: libxcb.so.1()(64bit) for package: libX11-1.6.7-2.amzn2.x86_64
      —> Package libXpm.x86_64 0:3.5.12-1.amzn2.0.2 will be installed
      —> Package libxslt.x86_64 0:1.1.28-6.amzn2 will be installed
      —> Package oniguruma.x86_64 0:5.9.6-1.amzn2.0.4 will be installed
      —> Package php-gd.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-gd-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-intl.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-intl-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-mbstring.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-mbstring-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-xml.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Running transaction check
      —> Package libX11-common.noarch 0:1.6.7-2.amzn2 will be installed
      —> Package libxcb.x86_64 0:1.12-1.amzn2.0.2 will be installed
      –> Processing Dependency: libXau.so.6()(64bit) for package: libxcb-1.12-1.amzn2.0.2.x86_64
      —> Package php-gd.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-gd-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-intl.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-intl-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-mbstring.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-mbstring-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-xml.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Running transaction check
      —> Package libXau.x86_64 0:1.0.8-2.1.amzn2.0.2 will be installed
      —> Package php-gd.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-gd-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-intl.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-intl-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-mbstring.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-mbstring-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-xml.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-xml-7.2.24-1.amzn2.0.1.x86_64
      Removing php-pecl-zip.x86_64 0:1.15.2-3.amzn2.0.1 – u due to obsoletes from installed php-common-7.2.34-1.amzn2.x86_64
      –> Restarting Dependency Resolution with new changes.
      –> Running transaction check
      —> Package php-gd.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-gd-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-intl.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-intl-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-mbstring.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-mbstring-7.2.24-1.amzn2.0.1.x86_64
      —> Package php-pecl-zip.x86_64 0:1.15.2-3.amzn2.0.1 will be installed
      —> Package php-xml.x86_64 0:7.2.24-1.amzn2.0.1 will be installed
      –> Processing Dependency: php-common(x86-64) = 7.2.24-1.amzn2.0.1 for package:php-xml-7.2.24-1.amzn2.0.1.x86_64
      –> Finished Dependency Resolution
      Error: Package: php-mbstring-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      Requires: php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Installed: php-common-7.2.34-1.amzn2.x86_64 (@amzn2extra-php7.2)
      php-common(x86-64) = 7.2.34-1.amzn2
      Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2
      Available: php-common-5.4.16-43.amzn2.0.1.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.1
      Available: php-common-5.4.16-43.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.2
      Available: php-common-5.4.16-43.amzn2.0.3.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.3
      Available: php-common-5.4.16-43.amzn2.0.4.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.4
      Available: php-common-5.4.16-45.amzn2.0.5.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.5
      Available: php-common-5.4.16-45.amzn2.0.6.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.6
      Available: php-common-5.4.16-46.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-46.amzn2.0.2
      Available: php-common-7.2.0-3.amzn2.0.1.x86_64 (amzn2extra-lamp-maria db10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.0.1
      Available: php-common-7.2.0-3.amzn2.1.x86_64 (amzn2extra-lamp-mariadb 10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.1
      Available: php-common-7.2.4-3.amzn2.0.1.x86_64 (amzn2extra-lamp-maria db10.2-php7.2)
      php-common(x86-64) = 7.2.4-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.1.x86_64 (amzn2extra-lamp-maria db10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.2.x86_64 (amzn2extra-lamp-maria db10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.2.x86_64 (amzn2extra-lamp-maria db10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.3.x86_64 (amzn2extra-lamp-maria db10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.3
      Available: php-common-7.2.11-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.11-1.amzn2.0.1
      Available: php-common-7.2.13-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.13-1.amzn2.0.1
      Available: php-common-7.2.14-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.14-1.amzn2.0.1
      Available: php-common-7.2.16-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.16-1.amzn2.0.1
      Available: php-common-7.2.17-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.17-1.amzn2.0.1
      Available: php-common-7.2.19-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.19-1.amzn2.0.1
      Available: php-common-7.2.21-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.21-1.amzn2.0.1
      Available: php-common-7.2.22-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.22-1.amzn2.0.1
      Available: php-common-7.2.23-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.23-1.amzn2.0.1
      Available: php-common-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mari adb10.2-php7.2)
      php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Error: Package: php-intl-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2- php7.2)
      Requires: php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Installed: php-common-7.2.34-1.amzn2.x86_64 (@amzn2extra-php7.2)
      php-common(x86-64) = 7.2.34-1.amzn2
      Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2
      Available: php-common-5.4.16-43.amzn2.0.1.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.1
      Available: php-common-5.4.16-43.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.2
      Available: php-common-5.4.16-43.amzn2.0.3.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.3
      Available: php-common-5.4.16-43.amzn2.0.4.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.4
      Available: php-common-5.4.16-45.amzn2.0.5.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.5
      Available: php-common-5.4.16-45.amzn2.0.6.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.6
      Available: php-common-5.4.16-46.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-46.amzn2.0.2
      Available: php-common-7.2.0-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.0.1
      Available: php-common-7.2.0-3.amzn2.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.1
      Available: php-common-7.2.4-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.4-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.2.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.2.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.3.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.3
      Available: php-common-7.2.11-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.11-1.amzn2.0.1
      Available: php-common-7.2.13-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.13-1.amzn2.0.1
      Available: php-common-7.2.14-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.14-1.amzn2.0.1
      Available: php-common-7.2.16-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.16-1.amzn2.0.1
      Available: php-common-7.2.17-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.17-1.amzn2.0.1
      Available: php-common-7.2.19-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.19-1.amzn2.0.1
      Available: php-common-7.2.21-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.21-1.amzn2.0.1
      Available: php-common-7.2.22-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.22-1.amzn2.0.1
      Available: php-common-7.2.23-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.23-1.amzn2.0.1
      Available: php-common-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Error: Package: php-xml-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      Requires: php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Installed: php-common-7.2.34-1.amzn2.x86_64 (@amzn2extra-php7.2)
      php-common(x86-64) = 7.2.34-1.amzn2
      Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2
      Available: php-common-5.4.16-43.amzn2.0.1.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.1
      Available: php-common-5.4.16-43.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.2
      Available: php-common-5.4.16-43.amzn2.0.3.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.3
      Available: php-common-5.4.16-43.amzn2.0.4.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.4
      Available: php-common-5.4.16-45.amzn2.0.5.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.5
      Available: php-common-5.4.16-45.amzn2.0.6.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.6
      Available: php-common-5.4.16-46.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-46.amzn2.0.2
      Available: php-common-7.2.0-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.0.1
      Available: php-common-7.2.0-3.amzn2.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.1
      Available: php-common-7.2.4-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.4-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.2.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.2.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.3.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.3
      Available: php-common-7.2.11-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.11-1.amzn2.0.1
      Available: php-common-7.2.13-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.13-1.amzn2.0.1
      Available: php-common-7.2.14-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.14-1.amzn2.0.1
      Available: php-common-7.2.16-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.16-1.amzn2.0.1
      Available: php-common-7.2.17-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.17-1.amzn2.0.1
      Available: php-common-7.2.19-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.19-1.amzn2.0.1
      Available: php-common-7.2.21-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.21-1.amzn2.0.1
      Available: php-common-7.2.22-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.22-1.amzn2.0.1
      Available: php-common-7.2.23-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.23-1.amzn2.0.1
      Available: php-common-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Error: Package: php-gd-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      Requires: php-common(x86-64) = 7.2.24-1.amzn2.0.1
      Installed: php-common-7.2.34-1.amzn2.x86_64 (@amzn2extra-php7.2)
      php-common(x86-64) = 7.2.34-1.amzn2
      Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2
      Available: php-common-5.4.16-43.amzn2.0.1.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.1
      Available: php-common-5.4.16-43.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.2
      Available: php-common-5.4.16-43.amzn2.0.3.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.3
      Available: php-common-5.4.16-43.amzn2.0.4.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-43.amzn2.0.4
      Available: php-common-5.4.16-45.amzn2.0.5.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.5
      Available: php-common-5.4.16-45.amzn2.0.6.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-45.amzn2.0.6
      Available: php-common-5.4.16-46.amzn2.0.2.x86_64 (amzn2-core)
      php-common(x86-64) = 5.4.16-46.amzn2.0.2
      Available: php-common-7.2.0-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.0.1
      Available: php-common-7.2.0-3.amzn2.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.0-3.amzn2.1
      Available: php-common-7.2.4-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.4-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.1
      Available: php-common-7.2.5-3.amzn2.0.2.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.5-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.2.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.2
      Available: php-common-7.2.8-3.amzn2.0.3.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.8-3.amzn2.0.3
      Available: php-common-7.2.11-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.11-1.amzn2.0.1
      Available: php-common-7.2.13-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.13-1.amzn2.0.1
      Available: php-common-7.2.14-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.14-1.amzn2.0.1
      Available: php-common-7.2.16-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.16-1.amzn2.0.1
      Available: php-common-7.2.17-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.17-1.amzn2.0.1
      Available: php-common-7.2.19-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.19-1.amzn2.0.1
      Available: php-common-7.2.21-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.21-1.amzn2.0.1
      Available: php-common-7.2.22-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.22-1.amzn2.0.1
      Available: php-common-7.2.23-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.23-1.amzn2.0.1
      Available: php-common-7.2.24-1.amzn2.0.1.x86_64 (amzn2extra-lamp-mariadb10.2-php7.2)
      php-common(x86-64) = 7.2.24-1.amzn2.0.1
      You could try using –skip-broken to work around the problem
      You could try running: rpm -Va –nofiles –nodigest

      Reply
    7. Jeff on October 30, 2020 10:08 pm

      I agree with Gareth, somethings missing or changed (maybe a repo?). I just tried to install httpd24 via the commands in this article and here’s what I got:

      # yum install -y httpd24 httpd24-tools mod24_ssl
      Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
      amzn2-core | 3.7 kB 00:00:00
      No package httpd24 available.
      No package httpd24-tools available.
      No package mod24_ssl available.
      Error: Nothing to do

      Reply
    8. Chris Willett on January 30, 2020 1:19 am

      Makes sense to me. At this point, everyone should be using Amazon Linux 2 anyways. That’s what I was looking for when I found this post (how to install with AL2).

      Reply
      • Chris on January 30, 2020 1:20 am

        This was meant as a reply to GARETH’s comment.

        Reply
    9. Jason on November 6, 2019 4:09 pm

      either install using the remirepo for php or use amazon’s own repo
      sudo amazon-linux-extras install php7.3

      Reply
    10. John on October 1, 2019 12:07 am

      Great work. But it is missing how to uninstall for babies.

      Also, how to resolve this

      Error: php73-common conflicts with php-common-5.3.29-1.8.amzn1.x86_64
      Error: php73-cli conflicts with php-cli-5.3.29-1.8.amzn1.x86_64
      You could try using –skip-broken to work around the problem
      You could try running: rpm -Va –nofiles –nodigest

      Reply
    11. Gareth on August 19, 2019 3:49 pm

      I think something must have changed, from an AMI2 none of those packages are not available through yum

      Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • Split Command in Linux With Examples (Split Large Files)
    • Test Your Internet Speed from the Linux Terminal
    • 11 Practical Example of cat Command in Linux
    • sleep Command in Linux with Examples
    • 20 Basic Linux Commands for the Beginners (Recommended)
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

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