Comments on How to install Apache, PHP 7.2 and MySQL on CentOS 7.4 (LAMP)

This tutorial shows how to install an Apache web server on a CentOS 7 server with PHP (mod_php with PHP 5.4, 7.0, 7.1, or 7.2) and MySQL support. This setup is often referred to as LAMP which stands for Linux - Apache - MySQL - PHP.

32 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: Tristan

thank you so much work directly :-)

By: Coeus

 Very useful! Thank you so much!

By: Dev

Hi,

Can you please tell how can we install specific version of MySQL. I need to install MySQL 5.6.23 on CentOS Linux 7.4.1708.

Thanks

By: vagg

Why are you changing phpmyadmin from cookie authentication to http authentication?

By: Ron Christie

Hmmm... Unless I missed it somehow, it seems you're short of the instructions on how to configure httpd to load and make use of libphpX.so...

Cheers,

R.

By: till

There is nothing missing, just follow the tutorial and you will see that it works.

By: Luiz De Paula

Boa noite à todos!

Esse é um dos melhores tutoriais que encontrei. Simples, direto e didático.

Obrigado, obrigado, obrigado!

Um abraço do Brasil!

"Good evening everyone!

This is one of the best tutorials I have found. Simple, straightforward and didactic.

Thank you, thank you, thank you!

A hug from Brazil!"PS: Forgive me the translation via Google! ;O)

By: trust sibanda

Thanks worked as expected

By: rockanguro

Thanks so much

By: Aneesh

After the installation I tried to upgrade plugins from wordpress admin, getting permission denied.  The permission and ownership is of all files and folders are correct. (I am not suing FTP or vSFTP)

How to fix this?

By: Anand

very nice & helpful article, thanks

By: Amaton

qué va gracias 

By: Jim

 Thanks, terrific help.

By: John Leger

Excellent and accurate walkthough!  Thank you.

By: Jose Antony

 

Thanks for the tutorial, it has been a great help, greetings from Peru

By: Udi Burg

Great tutorial!!!

Thanks a lot!

By: Marcos

PHP 7 listen to port number 9000. Didn´t work for me until i´ve added this line to configuration file

ProxyPassMatch ^/(.*\.php(/.*)?)$ fcgi://127.0.0.1:9000/var/www/html/example.com/$1There´s an workaround to this method?Thanks!

By: till

This tutorial installs and uses the apache mod_php module. You seem to use php-fpm, that's a completely different kind of setup that you use and not related to the setup described in this tutorial. For the tutorial above, the line you described is neither useful nor required.

By: Aimen

Step 4.4, installs 7.3 not 7.2. is there a fix for that cause 7.3 has some issues with other dependencies

By: till

The PHP version is selected by the yum-config-manager command that you run before you install PHP. Are you sure that you've run "yum-config-manager --enable remi-php72" and not "yum-config-manager --enable remi-php73" ?

By: chaiwat

Your tutorial save my life. Thanks brother.

By: Steve T

Thank you

By: jerome

This tutorial is perfect for settings up everything you need for a development server. Thank you for the great article.

Regards Jerome

By: jeroenvip

This is working like a charm. Thanks for the effert !

 

Regards Jerome

By: ryan

Hey! Great tuttorial, however when i get to testing the index.php i get a "Error establishing a database connection" error. I do run MySQL instead of MariaDB however. Any clue of what that would cause?I did: "yum -y install php-mysqlnd php-pdo"and: yum -y install php-gd php-ldap php-odbc php-pear php-xml php-xmlrpc php-mbstring php-soap curl curl-devel" and restarted httpd (after also the whole server machine). Many thanks!

By: Randeer

Amazing stuff, way u are describing it much easy to understand.

Very useful!; thank you so much work directly

By: moses

thank you so much it's work directly

By: faruk yetkin

add to optional http2/mod_http2 installation proccess/steps,

i'm tryed

"yum install httpd2" -> getting error: No package httpd2 available.

"yum install mod_http2" -> getting error: No package mod_http2 available.

any solution ?

By: Guillermo Macias

All was cute; but when trying to start phpmyadmin it does not functions

By: Rjeibi Omar

Thank you very much Brehm

By: Raghav

In general, I always browse the net with ads blocked on my browser. But, not on howtoforge! Quality work needs to be apreciated and disabling ad blocker for this site is the least we can do to apreciate this high quality work!

Keep it up Till! Great Job!

By: till

Thank you very much. I really appreciate that! I would not be able to get howtoforge going without the earnings from ads and subscriptions.