- Amazon Linux AMI Install Linux, nginx, MySQL, PHP (LEMP)
- Amazon Linux AMI LEMP stack installation
- 1. Update your Amazon Linux AMI system
- 2. Install Nginx web server
- Open port TCP port 80
- Test it
- 3. Install MySQL database server
- How to Install Apache 2.4 & PHP 7.4 on Amazon Linux
- Step 1 – Initial Setup
- Step 2 – Install Apache 2.4
- Step 3 – Installing PHP
- Step 4 – Create A New Virtual Host
- Conclusion
- Related Posts
- How To Setup Apache, PHP & MongoDB in Ubuntu & Debian
- How To Install and Use PHP Composer on Debian 11
- How To Install PHP on Debian 11
- 11 Comments
Amazon Linux AMI Install Linux, nginx, MySQL, PHP (LEMP)
Amazon Linux AMI LEMP stack installation
The procedure is as follows:
- Update Amazon Linux AMI, run sudo yum update
- Install Nginx, execute: sudo yum install nginx
- Let us install MySQL database server, execute: sudo yum install mysql57-server
- Set up PHP version 7.3, execute:
- Open port 80 using iptables firewall
- Test your LEMP stack running on Amazon AMI Linux
Let us see all steps and examples in details.
1. Update your Amazon Linux AMI system
Check for the updates using the yum command and apply security updates on Amazon Linux AMI:
yum check-update
sudo yum update -y
Reboot the Linux system powered by Amazon Linux AMI if kernel update was installed:
sudo reboot
2. Install Nginx web server
Nginx is a web server and a reverse proxy server for HTTP/HTTPS and more. It is part of LEAP stack. Simply type the following yum command to install it on Amazon Linux AMI:
sudo yum search nginx
sudo yum info nginx
sudo yum install nginx
As usual, nginx web server does not start on Amazon Linux AMI. To start nginx server running, execute the following service command:
sudo service nginx start
Enable service at boot time using the chkconfig command sudo chkconfig nginx on
Verify that nginx service is running with help of pgrep command/ss command/netstat command commands:
sudo service nginx status
pgrep nginx
ss -tlpn | grep :80
Open port TCP port 80
Edit the file:
sudo vi /etc/sysconfig/iptables
Append the following line to open TCP port 80 before final DROP rule:
Save and close the file. Restart the firewall:
sudo service iptables restart
See “Set Up a Basic Iptables Firewall on Amazon Linux AMI” for more info about IPv4 and IPv6 firewall.
Test it
Fire a web browser and type your public IPv4 address such as:
http://1.2.3.4/
http://your-domain-mapped-to-public-ip-com/
http://202.1.2.3/
3. Install MySQL database server
The first step is to search for MySQL DB version, run:
yum list mysql*-server
Sample outputs:
Источник
How to Install Apache 2.4 & PHP 7.4 on Amazon Linux
This tutorial will help you for installing Apache/HTTPD 2.4 and PHP 7 on Amazon Linux system.
MySQL installation is not part of this tutorial. So if you also need MySQL server on your Amazon Linux, follow this tutorial.
Step 1 – Initial Setup
Log in to your Amazon Linux 2 system via SSH. Its good to keep pacakges up to date, so execute the following command to update yum packages to latest:
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 to Apache with mod_ssl on your system.
The httpd package will install Apache (HTTPD) and mod_ssl extension will provide cryptographic support to your Apache web server.
After installation set Apache to auto-start and also start once.
Apache has been installed on your Amazon Linux system. Access to the server in a web browser using IP address, This will show you the default Apache page.
Step 3 – Installing PHP
PHP latest versions are available under amazon-linux-extras repositories. Make sure you have installed extras repository on your system.
To install amazon-linux-extras package, type:
Once the extras repository is configured on your system. Search for the available PHP versions under the extras repository.
Next, enable the desired topic for PHP version. The following command will enable PHP 7.4 topic on your Amazon Linux 2 system. You can also choose another PHP version’s listed in above command:
Finally, install the required PHP packages along with the required PHP extensions.
PHP has been successfully installed on your Amazon Linux machine.
Type below command to check PHP version:
To check active version for Apache, create a PHP info file under default document root using the following command.
The access the info.php file in a web browser:
http://server-ip/info.php
Step 4 – Create A New Virtual Host
After installing packages create your first virtual host. To create virtual host for your domain example.com, edit the Apache configuration file and create virtual host like below:
After changing restart Apache service
Conclusion
In this tutorial, you have learned to install Apache 2.4 and PHP 7 on your Amazon Linux machine.
Related Posts
How To Setup Apache, PHP & MongoDB in Ubuntu & Debian
How To Install and Use PHP Composer on Debian 11
How To Install PHP on Debian 11
11 Comments
Thanks a bunch.worked liked magic
Thankss. The best.
Can we install / upgrade to php version 7.4.13 instead of default 7.4.11?
Hi Jamil,
Have you tried the installation? You may get the latest version as this article was written few months ago.
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
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
Источник