Comments on Ubuntu 18.04 (LTS) LAMP server tutorial with Apache, PHP 7.2, and MySQL
LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache 2.4 web server on an Ubuntu 18.04 (Bionic Beaver) server with PHP 7.2 support (mod_php) and MySQL / MariaDB and how to setup an SSL certificate with Let's encrypt. Additionally, I will install PHPMyAdmin to make MySQL administration easier. A LAMP setup is a perfect basis for CMS systems like Joomla, Wordpress or Drupal.
28 Comment(s)
Comments
This page is very usefull. Thank you for your effort but when I tried to install mysql I was not prompted for root password as with previous versions of ubuntu and I am still stuck there any suggestions?...
Maybe it was already installed or your server is using other non-standard apt settings which hide that dialog. Try to use the mysql_secure_installation command to set a password and enter no password when it asks for the old password.
Awesome!
Works perfectly, thanks!
How can i disable mysql on ubuntu 18.04?
Enable mysql on ubuntu 18.04, Have you tried to:
sudo -H gedit /etc/apache2/apache2.confThen add the following line to the end of the file:
Include /etc/phpmyadmin/apache.confThen restart apache:
/etc/init.d/apache2 restartGreat tutorial!
The only bit I could not get working was the SSL, but as this is only on my local laptop for dev purposes, I'm not too worried - although I will try again, just for completeness!
Let's encrypt requires it that the domain that you like to get the SSL cert for exists in DNS and is publicly reachable. That's probably not the case on a dev system on your laptop. But you should be able to use a self-signed SSL cert as described in chapter 7, just leave out chapter 8 on your local dev system.
Great work guys. Thanks.
Hector
where is the Virtual machine image you are mintiend how i could download it ??
See big red download icon in the menu on the right side of the page, below that icon you can find the download link.
Thats a fantastic guide. Many thanks for the good job. :)
Thanks my brother! I am from Brazil. nothing find in portuguese for help me.
Works perfectly, thanks!
Great tutorial, super useful and very tight. Thank you!
Well done.
this is missing how to open ports, i guess it assumes you are working from the same computer
Thank you Mr. Brehm. I always were forgetting some of the steps in this process of installation. Now, I can rely on this post and easily set up the server. Added to my bookmarks!
Great tutorial and easy to follow.
Thank you, everything worked!
Thank you for the job, works perfectly :-)
After installing phpMyAdmin and following all the steps, I cannot access phpMyAdmin. All I get is a 404 error page.
This means that you did not select 'Apacahe2' during phpMyAdmin installation. Run 'dpkg-reconfigure phpmyadmin' and select it this time. Please note, an option in apt is selected with the space bar of your keyboard after you navigated to it using the tab keys.
I have the same problem like Allie but after running 'dpkg-reconfigure phpmyadmin'and choose apache2 server, the problem still remains
nano /etc/apache2/apache2.conf
at the end of file add this:
Include /etc/phpmyadmin/apache.conf
Restart apache
Thanks but on Ubuntu 18.04 fresh install, The MariaDB step killed MySQL, leaving my machine useless. Now the root pass I set first in MySQL doesn't work - and the MariaDB cannot progress with enter key. I came here to avoid doing what I did before. Guess I followed this twice, fool me that many times.
Hiu,
Many Thx for this Tutorial, it was a little bit complicate for me, my English is'nt perfect, now i can use phpmyadmin, there was no way before i've read your Tut. One Question have i, to create a User , and give the the Privileges , must i write " GRANT ALL PRIVILEGES" or can ist write "grant all privileges" too??
Now is it a little bit easier for me to say byebye to Windows;))
greetings
Ezry
Thank you so much for posting!
Thank you for this! Excellent step by step instructions were very useful to me.