{"id":4109,"date":"2021-03-13T12:46:59","date_gmt":"2021-03-13T12:46:59","guid":{"rendered":"https:\/\/www.how2shout.com\/linux\/?p=4109"},"modified":"2024-11-19T16:29:02","modified_gmt":"2024-11-19T16:29:02","slug":"how-to-install-apache-mysql-and-php-on-almalinux-8","status":"publish","type":"post","link":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/","title":{"rendered":"How to install Apache, MySQL and PHP on AlmaLinux 8"},"content":{"rendered":"\n<p><em><strong>LAMP<\/strong> is a stack of open-source software <span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\"><em>that provides a fully functional web server environment for various PHP and other web applications.\u00a0<strong>LAMP<\/strong>\u00a0stands for<strong>\u00a0Linux, Apache, MySQL, PHP\/Perl\/Python,<\/strong>\u00a0and here we learn how to install them on\u00a0<strong>the\u00a0<\/strong><\/em><\/span><strong>CentOS<\/strong> alternative <strong>AmlaLinux 8<\/strong>.x server.<\/em><\/p>\n\n\n\n<p>The primary function of a web server is to deliver HTML and image content via the HTTP or HTTPS protocol. Whenever we type some web address in our browser, it requests the webserver for the delivery of the called web page available on the Web server using either port 80 (&#8220;HTTP: \/\/&#8221;) or port 443 (&#8220;HTTPS: \/\/&#8221;).<\/p>\n\n\n\n<p>The Apache HTTP server is one of the most widely used web servers. It has been around for 20 years and powers millions of web servers. However, there are a couple of good alternatives, such as the Nginx Web server, which uses PC resources more sparingly and is often better suited for less powerful hardware and servers with many accesses. Combining Apache with Nginx as a reverse proxy can be helpful in some cases.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-steps-to-install-lamp-server-on-almalinux-8\">Steps to Install LAMP Server on AlmaLinux 8<\/h2>\n\n\n\n<p>The steps are given here to install and set up a Lamp server on AlmaLinux 8. It can also be used for CentOS 8 Stream and RHEL 8 Linux servers or desktop systems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-1-run-system-update\">1. Run system update<\/h3>\n\n\n\n<p>Most of the time, before starting any tutorial, I recommend readers run a system update command. This will not only make sure all the installed packages are in their latest state but also rebuild the system repository cache. This helps make any software or service installation run smoothly.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf update<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-2-install-apache-web-server-on-almalinux-8\">2. Install Apache web server on AlmaLinux 8<\/h3>\n\n\n\n<p>The next step is to install the Apache webserver on AlmaLinux along with some other tools to run <code>httpd<\/code> on this free RHEL is based on the Linux operating system. Run the below command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&nbsp;sudo dnf install httpd httpd-tools<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Install-Apache-web-server-on-AlmaLinux-8.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"441\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Install-Apache-web-server-on-AlmaLinux-8.jpg\" alt=\"Install Apache web server on AlmaLinux 8\" class=\"wp-image-4114\"\/><\/a><figcaption class=\"wp-element-caption\">Command to install Apache on AlmaLinux 8<\/figcaption><\/figure>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-3-enable-and-start-apache\">3. Enable and start Apache<\/h3>\n\n\n\n<p>Once the webserver is installed, let&#8217;s start its service and make it automatically fire up with the system boot. This will ensure that whenever you boot AlmaLinux, you won&#8217;t need to start Apache manually.<\/p>\n\n\n\n<p><strong>Start it:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start httpd<\/pre>\n\n\n\n<p><strong>Enable it:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl enable httpd<\/pre>\n\n\n\n<p><strong>Check the status<\/strong> of the web Server service to ensure everything is running without any error.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl status httpd<\/pre>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Enable-and-start-Apache.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"441\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Enable-and-start-Apache.jpg\" alt=\"Enable and start Apache\" class=\"wp-image-4115\" title=\"Enable and start Apache\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-4-update-firewall-rules\">4. Update FireWall rules<\/h3>\n\n\n\n<p>If you want to access the Apache webserver outside your local machine using some browser, then first, we have to open ports 80 and 443 on our AlmaLinux server.<\/p>\n\n\n\n<p><strong>To open port 80 or HTTP:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo firewall-cmd --permanent --zone=public --add-service=http<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p><strong>For allowing port 443 or HTTPS:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo firewall-cmd --permanent --zone=public --add-service=https<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p><strong>Reload firewall to make changes into effect<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo firewall-cmd --reload<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p>Now, we can connect to our AlmaLinux Apache web server by calling it in the browser. To do so, open your browser and type the IP address of the server where you have installed the Apache.<\/p>\n\n\n\n<p><em><code>http:\/\/your-server-ipadress<\/code><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"1284\" height=\"520\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg\" alt=\"Apache HTTP server test on AlmaLinux\" class=\"wp-image-4117\"\/><\/a><figcaption class=\"wp-element-caption\">Apache HTTP server test on AlmaLinux<\/figcaption><\/figure>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-5-install-mysql-or-mariadb-on-almalinux8\">5. Install MySQL or MariaDB on AlmaLinux8<\/h3>\n\n\n\n<p>MySQL is an open-source database developed by Oracle<span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">, whereas MariaDB is a fork that works similarly and uses the same command line as MySQL.\u00a0<strong>You can install either of them,<\/strong><\/span> but <strong>don&#8217;t install both.<\/strong><\/p>\n\n\n\n<p><strong>Command for MySQL<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf install mysql-server mysql<\/pre>\n\n\n\n<p>or<\/p>\n\n\n\n<p><strong>For MariaDB<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf install mariadb-server mariadb -y<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/MySQL-installation-on-AlmaLinux.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"774\" height=\"403\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/MySQL-installation-on-AlmaLinux.jpg\" alt=\"MySQL installation on AlmaLinux\" class=\"wp-image-4118\"\/><\/a><figcaption class=\"wp-element-caption\">MySQL installation on AlmaLinux 8<\/figcaption><\/figure>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/MariaDB-install-on-AlmaLinux-8.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"441\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/MariaDB-install-on-AlmaLinux-8.jpg\" alt=\"MySQL installation on AlmaLinux\" class=\"wp-image-4119\"\/><\/a><figcaption class=\"wp-element-caption\">MariaDB installation on AlmaLinux8.x<\/figcaption><\/figure>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p><strong>Command to Start &amp; Enable MySQL and MariaDB services<\/strong><\/p>\n\n\n\n<p><strong>For MySQL:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start mysqld\n\nsudo systemctl enable mysqld<\/pre>\n\n\n\n<p>To check status:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl status mysqld<\/pre>\n\n\n\n<p><strong>For MariaDB<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start mariadb\n\nsudo systemctl enable mariadb<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl status mariadb<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Check-Mysql-service-status.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"441\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Check-Mysql-service-status.jpg\" alt=\"Check Mysql service status\" class=\"wp-image-4122\"\/><\/a><figcaption class=\"wp-element-caption\">Check Mysql service status.<\/figcaption><\/figure>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-6-secure-mysql-installation\">6. Secure MySQL installation<\/h3>\n\n\n\n<p>This step will be the same whether you are using MySQL or MariaDB. It will give you some options to follow and set some settings so that you can secure your Database from any common future threats.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mysql_secure_installation<\/pre>\n\n\n\n<p>You can set a root password for MySQL or MariaDB, remove empty databases, restrict remote access except for localhost, remove anonymous users, and more.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Secure-MySQL-installation-.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"799\" height=\"515\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Secure-MySQL-installation-.jpg\" alt=\"Secure MySQL installation\" class=\"wp-image-4123\" title=\"Secure MySQL installation\"\/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-7-install-php-7-2-7-3-7-4-or-8-0-on-almalinux-8\">7. Install PHP 7.2\/7.3\/7.4 or 8.0 on AlmaLinux 8<\/h3>\n\n\n\n<p>PHP is a popular scripting language that powers the dynamic content of millions of websites and apps. Therefore, if you are planning to install a web CMS like WordPress, you have to set up PHP on your AlmaLinux server.<\/p>\n\n\n\n<p>First, check what PHP versions are available to install:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf module list php<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Search-PHP-module-or-versions-to-install-on-AlmaLinux-8.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"220\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Search-PHP-module-or-versions-to-install-on-AlmaLinux-8.jpg\" alt=\"Search PHP modules or versions to install on AlmaLinux 8\" class=\"wp-image-4124\"\/><\/a><figcaption class=\"wp-element-caption\">Search PHP modules or versions available to install on AlmaLinux 8<\/figcaption><\/figure>\n\n\n\n<p>As you can see while writing the article, the latest version of PHP in the default system&#8217;s AppStream repo was 7.4, although PHP 8 is already there. However, lots of web applications still support PHP 7. Thus, to provide wide compatibility and stability, one can go for PHP 7.4.<\/p>\n\n\n\n<p>Also by default, it will install PHP 7.2, to change that we need to configure and set 7.4 as the default\/enable in the repo. For that run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf module reset php<\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf module enable php:7.4<\/pre>\n\n\n\n<p>The above command changes the default version on the system repo for installation.<\/p>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Change-Default-PHP-version-in-repo-of-AlmaLinux-to-install.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"849\" height=\"322\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Change-Default-PHP-version-in-repo-of-AlmaLinux-to-install.jpg\" alt=\"Change Default PHP version in repo of AlmaLinux to install\" class=\"wp-image-4125\"\/><\/a><figcaption class=\"wp-element-caption\">Change the Default PHP version in the repo of AlmaLinux to install<\/figcaption><\/figure>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/p>\n\n\n\n<p><strong>(Optional Step): <\/strong>Those who want the <strong>latest PHP 8.0 or any other version on their AlamLinux 8,<\/strong> can follow these steps:<\/p>\n\n\n\n<p><strong>1. Add Remi Repository&nbsp;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf install http:\/\/rpms.remirepo.net\/enterprise\/remi-release-8.rpm<\/pre>\n\n\n\n<p><strong>2. Run system update<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf update<\/pre>\n\n\n\n<p><strong>3. Check available Latest PHP versions<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf module list php<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/PHP-8-on-AlmaLinux.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"480\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/PHP-8-on-AlmaLinux.jpg\" alt=\"PHP 8 on AlmaLinux\" class=\"wp-image-4127\"\/><\/a><figcaption class=\"wp-element-caption\">PHP 8 on AlmaLinux<\/figcaption><\/figure>\n\n\n\n<p>To install it, first you have to set Remi&#8217;s PHP 8.0 as the default version to install on AlmaLinux 8, for that run:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf module reset php\nsudo dnf module enable php:remi-8.0<\/pre>\n\n\n\n<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/p>\n\n\n\n<p>Finally, run the command to install PHP and common extensions we require to use it with Apache and Mysql on our system:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo dnf install php php-common php-opcache php-cli php-gd php-curl php-mysqlnd<\/pre>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Install-latest-version-of-PHP-on-AlmaLinux-8.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"960\" height=\"516\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Install-latest-version-of-PHP-on-AlmaLinux-8.jpg\" alt=\"Install latest version of PHP on AlmaLinux 8\" class=\"wp-image-4128\"\/><\/a><figcaption class=\"wp-element-caption\">Install the latest version of PHP on AlmaLinux 8<\/figcaption><\/figure>\n\n\n\n<p>To get better performance for various applications using PHP, we can start (if not already) and enable PHP-FPM (FastCGI Process Manager) using the below commands:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo systemctl start php-fpm\nsudo systemctl enable php-fpm<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-8-test-php\">8. Test PHP<\/h3>\n\n\n\n<p>We have already installed Apache, MySQL, and PHP on our system. Let&#8217;s check whether PHP is working absolutely fine by calling its configuration detail in the browser.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo nano \/var\/www\/html\/info.php<\/pre>\n\n\n\n<p>If you don&#8217;t have a nano text editor, then use vi, and the above command will be: <code>sudo vi \/var\/www\/html\/info.php<\/code><\/p>\n\n\n\n<p>Add the following line in the <strong>info.php<\/strong> file we have created using the above command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">&lt;?php\nphpinfo ();\n?&gt;<\/pre>\n\n\n\n<p>To save the file, type Ctrl+X, press the Y key, and then Enter.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p><strong>Whereas<\/strong>, the users using <strong>VI<\/strong> editor- first to copy-past the above line they have to press <code>Insert<\/code> button and then <code>Esc<\/code> once editing is done followed by <code>:qw<\/code> to save and exit it.<\/p>\n<\/blockquote>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p>Now, open your browser and type your server IP address along with file name info.php, we have created above:<\/p>\n\n\n\n<p><code><em>http:\/\/your-server-ipaddress\/info.php<\/em><\/code><\/p>\n\n\n\n<figure class=\"wp-block-image alignnone\"><a href=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Check-PHP-configuration-details.jpg\"><img loading=\"lazy\" loading=\"lazy\" decoding=\"async\" width=\"1011\" height=\"587\" src=\"https:\/\/www.how2shout.com\/linux\/wp-content\/uploads\/2021\/03\/Check-PHP-configuration-details.jpg\" alt=\"Check PHP configuration details\" class=\"wp-image-4130\"\/><\/a><figcaption class=\"wp-element-caption\">Check PHP configuration details<\/figcaption><\/figure>\n\n\n\n<p><strong>To remove this file type:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">sudo rm \/var\/www\/html\/info.php<\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-9-install-phpmyadmin\">9. Install phpMyAdmin<\/h3>\n\n\n\n<p>If you also want to manage your MySQL or MariaDB database using web graphical user interface, then see our article: <a href=\"https:\/\/www.how2shout.com\/linux\/install-phpmyadmin-on-almalinux-8-with-apache\/\" target=\"_blank\" rel=\"noopener\">Install phpMyAdmin\u00a0on AlmaLinux 8 with Apache<\/a><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-nbsp-conclusion\">&nbsp;Conclusion:<\/h3>\n\n\n\n<p><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">These were some simple but detailed steps for installing and configuring\u00a0<strong>Apache, MySQL, and PHP on AlamLinux 8 Server<\/strong>. In case you want to know something else related to this Linux or topic, the comment section is all yours.<\/span><\/p>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>LAMP is a stack of open-source software that provides a fully functional web server environment for various PHP and other web applications.\u00a0LAMP\u00a0stands for\u00a0Linux, Apache, MySQL, PHP\/Perl\/Python,\u00a0and here we learn how to install them on\u00a0the\u00a0CentOS alternative AmlaLinux 8.x server. The primary function of a web server is to deliver HTML and image content via the HTTP [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4117,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","_mbp_gutenberg_autopost":false,"footnotes":""},"categories":[3112],"tags":[3113,2539,979,3100,2922],"class_list":{"0":"post-4109","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-almalinux","8":"tag-almalinux","9":"tag-apache","10":"tag-mysql","11":"tag-php","12":"tag-web-server"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v22.9 (Yoast SEO v27.5) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>How to install Apache, MySQL and PHP on AlmaLinux 8 - LinuxShout<\/title>\n<meta name=\"description\" content=\"Start your own web server by installing LAMP- Apache, MySQL or MariaDB and PHP 8 on AlmaLinux 8 server using command terminal\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to install Apache, MySQL and PHP on AlmaLinux 8\" \/>\n<meta property=\"og:description\" content=\"Start your own web server by installing LAMP- Apache, MySQL or MariaDB and PHP 8 on AlmaLinux 8 server using command terminal\" \/>\n<meta property=\"og:url\" content=\"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/\" \/>\n<meta property=\"og:site_name\" content=\"LinuxShout\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/how2shout\" \/>\n<meta property=\"article:published_time\" content=\"2021-03-13T12:46:59+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-19T16:29:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1284\" \/>\n\t<meta property=\"og:image:height\" content=\"520\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Heyan Maurya\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@h2smedia\" \/>\n<meta name=\"twitter:site\" content=\"@h2smedia\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Heyan Maurya\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"TechArticle\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/\"},\"author\":{\"name\":\"Heyan Maurya\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#\\\/schema\\\/person\\\/102d73e20384ea409022d5bafddc0f72\"},\"headline\":\"How to install Apache, MySQL and PHP on AlmaLinux 8\",\"datePublished\":\"2021-03-13T12:46:59+00:00\",\"dateModified\":\"2024-11-19T16:29:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/\"},\"wordCount\":1098,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linux.how2shout.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Apache-HTTP-server-test-on-AlmaLinux.jpg\",\"keywords\":[\"almalinux\",\"apache\",\"mysql\",\"php\",\"web server\"],\"articleSection\":[\"AlmaLinux\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#respond\"]}],\"copyrightYear\":\"2021\",\"copyrightHolder\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/\",\"url\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/\",\"name\":\"How to install Apache, MySQL and PHP on AlmaLinux 8 - LinuxShout\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/linux.how2shout.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Apache-HTTP-server-test-on-AlmaLinux.jpg\",\"datePublished\":\"2021-03-13T12:46:59+00:00\",\"dateModified\":\"2024-11-19T16:29:02+00:00\",\"description\":\"Start your own web server by installing LAMP- Apache, MySQL or MariaDB and PHP 8 on AlmaLinux 8 server using command terminal\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#primaryimage\",\"url\":\"https:\\\/\\\/linux.how2shout.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Apache-HTTP-server-test-on-AlmaLinux.jpg\",\"contentUrl\":\"https:\\\/\\\/linux.how2shout.com\\\/wp-content\\\/uploads\\\/2021\\\/03\\\/Apache-HTTP-server-test-on-AlmaLinux.jpg\",\"width\":1284,\"height\":520,\"caption\":\"Apache HTTP server test on AlmaLinux\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/how-to-install-apache-mysql-and-php-on-almalinux-8\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/linux.how2shout.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to install Apache, MySQL and PHP on AlmaLinux 8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#website\",\"url\":\"https:\\\/\\\/linux.how2shout.com\\\/\",\"name\":\"LinuxShout\",\"description\":\"Find the open source solutions\",\"publisher\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#organization\"},\"alternateName\":\"Linux how2shout\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/linux.how2shout.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#organization\",\"name\":\"LinuxShout\",\"url\":\"https:\\\/\\\/linux.how2shout.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/linux.how2shout.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Linux-Shout-Logo.png\",\"contentUrl\":\"https:\\\/\\\/linux.how2shout.com\\\/wp-content\\\/uploads\\\/2020\\\/06\\\/Linux-Shout-Logo.png\",\"width\":503,\"height\":349,\"caption\":\"LinuxShout\"},\"image\":{\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/how2shout\",\"https:\\\/\\\/x.com\\\/h2smedia\",\"https:\\\/\\\/instagram.com\\\/h2smedia\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/h2smedia\\\/\",\"https:\\\/\\\/www.pinterest.com\\\/how2shout\",\"https:\\\/\\\/youtube.com\\\/h2smedia\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/linux.how2shout.com\\\/#\\\/schema\\\/person\\\/102d73e20384ea409022d5bafddc0f72\",\"name\":\"Heyan Maurya\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b07b375c19891b0589da722cb1e3dff333ec63dd8467afc114611044e87cfe9a?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b07b375c19891b0589da722cb1e3dff333ec63dd8467afc114611044e87cfe9a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/b07b375c19891b0589da722cb1e3dff333ec63dd8467afc114611044e87cfe9a?s=96&d=mm&r=g\",\"caption\":\"Heyan Maurya\"},\"description\":\"I have a keen interest in all kinds of technologies, from consumer-tech to enterprise solutions. However, I am still trying to learn Linux and whatever the problems I face, trying to give solutions for the same, here...\",\"sameAs\":[\"https:\\\/\\\/www.how2shout.com\\\/\"],\"url\":\"https:\\\/\\\/linux.how2shout.com\\\/author\\\/heyan\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to install Apache, MySQL and PHP on AlmaLinux 8 - LinuxShout","description":"Start your own web server by installing LAMP- Apache, MySQL or MariaDB and PHP 8 on AlmaLinux 8 server using command terminal","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/","og_locale":"en_US","og_type":"article","og_title":"How to install Apache, MySQL and PHP on AlmaLinux 8","og_description":"Start your own web server by installing LAMP- Apache, MySQL or MariaDB and PHP 8 on AlmaLinux 8 server using command terminal","og_url":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/","og_site_name":"LinuxShout","article_publisher":"https:\/\/www.facebook.com\/how2shout","article_published_time":"2021-03-13T12:46:59+00:00","article_modified_time":"2024-11-19T16:29:02+00:00","og_image":[{"width":1284,"height":520,"url":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg","type":"image\/jpeg"}],"author":"Heyan Maurya","twitter_card":"summary_large_image","twitter_creator":"@h2smedia","twitter_site":"@h2smedia","twitter_misc":{"Written by":"Heyan Maurya","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"TechArticle","@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#article","isPartOf":{"@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/"},"author":{"name":"Heyan Maurya","@id":"https:\/\/linux.how2shout.com\/#\/schema\/person\/102d73e20384ea409022d5bafddc0f72"},"headline":"How to install Apache, MySQL and PHP on AlmaLinux 8","datePublished":"2021-03-13T12:46:59+00:00","dateModified":"2024-11-19T16:29:02+00:00","mainEntityOfPage":{"@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/"},"wordCount":1098,"commentCount":1,"publisher":{"@id":"https:\/\/linux.how2shout.com\/#organization"},"image":{"@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#primaryimage"},"thumbnailUrl":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg","keywords":["almalinux","apache","mysql","php","web server"],"articleSection":["AlmaLinux"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#respond"]}],"copyrightYear":"2021","copyrightHolder":{"@id":"https:\/\/linux.how2shout.com\/#organization"}},{"@type":"WebPage","@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/","url":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/","name":"How to install Apache, MySQL and PHP on AlmaLinux 8 - LinuxShout","isPartOf":{"@id":"https:\/\/linux.how2shout.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#primaryimage"},"image":{"@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#primaryimage"},"thumbnailUrl":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg","datePublished":"2021-03-13T12:46:59+00:00","dateModified":"2024-11-19T16:29:02+00:00","description":"Start your own web server by installing LAMP- Apache, MySQL or MariaDB and PHP 8 on AlmaLinux 8 server using command terminal","breadcrumb":{"@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#primaryimage","url":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg","contentUrl":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2021\/03\/Apache-HTTP-server-test-on-AlmaLinux.jpg","width":1284,"height":520,"caption":"Apache HTTP server test on AlmaLinux"},{"@type":"BreadcrumbList","@id":"https:\/\/linux.how2shout.com\/how-to-install-apache-mysql-and-php-on-almalinux-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/linux.how2shout.com\/"},{"@type":"ListItem","position":2,"name":"How to install Apache, MySQL and PHP on AlmaLinux 8"}]},{"@type":"WebSite","@id":"https:\/\/linux.how2shout.com\/#website","url":"https:\/\/linux.how2shout.com\/","name":"LinuxShout","description":"Find the open source solutions","publisher":{"@id":"https:\/\/linux.how2shout.com\/#organization"},"alternateName":"Linux how2shout","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/linux.how2shout.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/linux.how2shout.com\/#organization","name":"LinuxShout","url":"https:\/\/linux.how2shout.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/linux.how2shout.com\/#\/schema\/logo\/image\/","url":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2020\/06\/Linux-Shout-Logo.png","contentUrl":"https:\/\/linux.how2shout.com\/wp-content\/uploads\/2020\/06\/Linux-Shout-Logo.png","width":503,"height":349,"caption":"LinuxShout"},"image":{"@id":"https:\/\/linux.how2shout.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/how2shout","https:\/\/x.com\/h2smedia","https:\/\/instagram.com\/h2smedia","https:\/\/www.linkedin.com\/company\/h2smedia\/","https:\/\/www.pinterest.com\/how2shout","https:\/\/youtube.com\/h2smedia"]},{"@type":"Person","@id":"https:\/\/linux.how2shout.com\/#\/schema\/person\/102d73e20384ea409022d5bafddc0f72","name":"Heyan Maurya","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/b07b375c19891b0589da722cb1e3dff333ec63dd8467afc114611044e87cfe9a?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/b07b375c19891b0589da722cb1e3dff333ec63dd8467afc114611044e87cfe9a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b07b375c19891b0589da722cb1e3dff333ec63dd8467afc114611044e87cfe9a?s=96&d=mm&r=g","caption":"Heyan Maurya"},"description":"I have a keen interest in all kinds of technologies, from consumer-tech to enterprise solutions. However, I am still trying to learn Linux and whatever the problems I face, trying to give solutions for the same, here...","sameAs":["https:\/\/www.how2shout.com\/"],"url":"https:\/\/linux.how2shout.com\/author\/heyan\/"}]}},"_links":{"self":[{"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/posts\/4109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/comments?post=4109"}],"version-history":[{"count":15,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/posts\/4109\/revisions"}],"predecessor-version":[{"id":25686,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/posts\/4109\/revisions\/25686"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/media\/4117"}],"wp:attachment":[{"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/media?parent=4109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/categories?post=4109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.how2shout.com\/wp-json\/wp\/v2\/tags?post=4109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}