Install mysql ubuntu 18.04 lts ※ Download: http://plitowaqun.slimkor.ru/?dl&keyword=install+mysql+ubuntu+18.04+lts&source=bitbin.it2 Restart MySQL and Apache service to reload any changes done manually. The latest version is currently MySQL 5. Pick the ones you need and install them like this: apt-get -y install php7. Additionally, I will install PHPMyAdmin to make MySQL administration easier. There are few changes that make it incompatible with 5. Install Prometheus By default, Prometheus is not available in the Ubuntu 18. This brief tutorial shows caballeros and new users how to install phpMyAdmin with Apache2, MySQL and PHP support on Ubuntu 18. So there is nothing more to do here. If you are an advanced database administrator and know that you want to perform this configuration manually, or if your database has already been met and configured, you should refuse this option. To do that, run the commands below sudo apt-get install phpmyadmin php-gettext When prompted to choose the webserver, selecat apache2 and continue. This can be optionally handled with dbconfig-common. Ubuntu 18.04 (LTS) LAMP server tutorial with Apache, PHP 7.2, and MySQL - By default, MySQL comes with a database named 'test' that anyone can access. I have tried solution from lots of links... This tutorial shows how you can install an Apache web server on an Ubuntu 18. Additionally, I will install PHPMyAdmin to make MySQL administration easier. A LAMP setup is a perfect basis for popular CMS systems like Joomla, Wordpress or Drupal. Preliminary Note In this tutorial, I will use the hostname server1. These settings might differ for you, so you have to replace them where appropriate. I recommend to use a minimal Ubuntu server setup as basis for the tutorial, that can be a virtual- or root server image with an Ubuntu 18. I'm running all the steps in this tutorial with root privileges, so make sure you're logged in as root: sudo -s 1. I will show you how to install both alternatives below. Just follow either chapter 1. I will use MySQL 5. The latest version is currently MySQL 5. We have set the root password for MySQL already during installation, but I would like to remove the anonymous user and test database for security reasons. It checks the strength of password and allows the users to set only those passwords which are secure enough. Would you like to setup VALIDATE PASSWORD plugin? Press y Y for Yes, any other key for No: Using existing password for root. Change the password for root? By default, a MySQL installation has an anonymous user, allowing anyone to log into MySQL without having to have a user account created for them. This is intended only for testing, and to make the installation go a bit smoother. You should remove them before moving into a production environment. Normally, root should only be allowed to connect from 'localhost'. This ensures that someone cannot guess at the root password from the network. Disallow root login remotely? By default, MySQL comes with a database named 'test' that anyone can access. This is also intended only for testing, and should be removed before moving into a production environment. Remove test database and access to it? Reloading the privilege tables will ensure that all changes made so far will take effect immediately. Reload privilege tables now? The MySQL setup has been secured now. We will now create a small PHP file info. The file will display lots of useful details about our PHP installation, such as the installed PHP version. If you scroll further down, you will see all modules that are already enabled in PHP. It's a good idea to install some other PHP modules as well as you might need them for your applications. You can search for available PHP modules like this: apt-cache search php7. Pick the ones you need and install them like this: apt-get -y install php7. Install the Opcache + APCu PHP cache to speed up PHP PHP 7 ships with a built-in opcode cacher for caching and optimizing PHP intermediate code, it has the name 'opcache' and is available in the package php7. It is strongly recommended to have an Opcache installed to speed up your PHP page. Besides opcache, I will install APCu which is a compatibility wrapper for opcache to provide the functions of the APC cache, an often used caching system in PHP 5. Opcache and APCu can be installed as follows: apt-get -y install php7. You should now find lots of new modules there: Please don't forget to delete the info. Run the following command to delete the file. Most web browsers start to show sites as insecure today when the connection between the server and the web browser is not encrypted with SSL. In this chapter, I will show you how to secure your website with SSL. Then restart apache to enable the new configuration: systemctl restart apache2 Now test the SSL connection by opening in a web browser. After accepting the warning, you will see the apache default page. Get a free SSL Certificate from Let's Encrypt The first step to secure the website with a Let's Encrypt SSL Certificate is to install the python3-certbot-apache package. Run the following command: apt-get -y install python3-certbot-apache In the next step, we will request an SSL cert from Let's Encrypt by using the certbot client program, during this process, the Let's Encrypt server tries to connect to your server through the domain name that you provide to the certbot command. It is important that this domain name points to your server in DNS already so that the website is reachable by its domain name on port 80 http already. If the website is not reachable from the internet, then the creation of the Let's Encrypt SSL certificate will fail. Before we can start to create the SSL cert, set the domain name in the vhost configuration file. Then create the SSL Certificate with this command: certbot --apache -d example. The command will start a wizard that asks you several questions. Enter the email address where the administrator who is responsible for this website can be reached. Accept the terms and conditions of the Let's Encrypt SSL authority. Certbot will ask you now if you like to share your email address with the Electronic Frontier Foundation. Choose here whatever you prefer. The SSL certificate has been issued successfully. When you access the website now with a browser, you will get redirected automatically to SSL and the green padlock in front of the URL bar in the browser shows that we are using a trusted SSL certificate now. Therefore a cronjob to auto-renew the SSL certificates is necessary that runs the certbot --renew command. So there is nothing more to do here. Renewal will only occur if expiration is within 30 days. Install phpMyAdmin is a web interface through which you can manage your MySQL databases. It's a good idea to install it: apt-get -y install phpmyadmin IMPORTANT: The apt installer will ask you several questions now, one of them is to select the web server type. A common mistake is that the web server type is just highlighted but not selected. To select an item in an apt menu you have to press the space bar on the keyboard after you navigated to the item with tab or cursor keys. Just highlighting it is not enough! MySQL Login Username: root Password: howtoforge The IP of the VM is 192. Please change all the above passwords to secure the virtual machine. Till Brehm is the founder and lead developer of the ISPConfig Hosting Control Panel software since 2000 and he founded HowtoForge in 2005 as a place to share Linux knowledge with other Linux enthusiasts. 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.