Focus on cloud service provider activities
Notes on website operation and maintenance

Several steps to implement LAMP (Apache, MySQL, PHP) of Ubuntu 20.04 installation tutorial

Building PHP, MySQL and Apache environments on Ubuntu 20.04 is a common combination for running dynamic websites and Web applications. The following is a simple tutorial on how to deploy PHP, MySQL and Apache on Ubuntu 20.04.

 Several steps to implement LAMP (Apache, MySQL, PHP) of Ubuntu 20.04 installation tutorial

Update the software package list First, before starting, update the software package list of the system to ensure that the latest software package information is obtained. Open the terminal and execute the following command:

 sudo apt update

Install the Apache HTTP server on Ubuntu 20.04. You can use the apt package manager to install the Apache HTTP server. Run the following command in the terminal:

 sudo apt install apache2

During installation, you may be asked to enter a password to confirm the installation.

After verifying the installation of Apache, you can verify whether Apache is successfully installed by accessing the local IP address or domain name. Enter the following address in the browser:

 http://localhost/

If Apache's default welcome page appears, Apache has been successfully installed.

Install MySQL database Next, we will install MySQL database server. Run the following command in the terminal:

 sudo apt install mysql-server

During installation, you will be asked to set the root password of MySQL. Please remember this password, which will be used for subsequent MySQL login.

After the MySQL installation is completed, you can verify whether MySQL is successfully installed. Run the following command in the terminal to log in to the MySQL server:

 sudo mysql -u root -p

Then enter the root password you set. If you log in successfully, MySQL has been successfully installed.

Install PHP Finally, we will install PHP and its common extensions. Run the following command in the terminal:

 sudo apt install php libapache2-mod-php php-mysql

This will install PHP extensions for PHP and MySQL.

After the PHP installation is verified, you can verify whether PHP is successfully installed. Create a file named info.php and copy the following code into the file:

 <? php phpinfo(); ?>

Place the file in the Apache default document root directory (/var/www/html/). Then access the following address in the browser:

 http://localhost/info.php

If the PHP information page appears, PHP has been successfully installed.

In this way, we have successfully deployed PHP, MySQL and Apache environments on Ubuntu 20.04.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Several steps to implement LAMP (Apache, MySQL, PHP) of Ubuntu 20.04 installation tutorial


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge