LinuxHow to Install LAMP(Apache, MySQL, PHP) Stack on Deepin

How to Install LAMP(Apache, MySQL, PHP) Stack on Deepin

This guide will introduce How to install LAMP Stack ( Apache Server, MySQL, PHP ) on Deepin Linux.

LAMP stack is a popular and very common technology stack used by software developers to develop web applications. LAMP is an acronym, this technology stack consists of four open-source software components, Linux Operating System (in this tutorial we use Deeping Linux), Apache HTTP Server, MySQL Relational Database Management System, and PHP programming language.

Note: As these commands are required to execute with root privileges, so it will ask for a user password to continue operations. After you enter the password, The APT will tell you which packages it will install and how much disk space they’ll take up. Press Y and hit ENTER to continue, and the installation will proceed.

Open the Deepin terminal (press ctrl+alt+t to open the terminal) and execute the following commands to install LAMP Stack.

Install LAMP Stack on Deepin

1. Update All Packages.

Updating all the packages is a good practice before installing any package. Type the following command and execute to make sure all repositories are up-to-date.

sudo apt-get update && sudo apt-get upgrade

2. Install Apache HTTP Server

Type the following command in your terminal to install the apache server.

sudo apt-get install apache2

4. Restart apache server

sudo service apache2 restart
Visit http://localhost or on your favorite web browser to check whether if Apache HTTP server is working fine.

4. Install MySQL Server (If not installed)

Follow this complete guide, How to Install MySQL Server 5.7 on Deepin Linux to install MySQL Server if it not installed on your computer.

5. Install PHP Modules

Install PHP 7.2 and commonly used PHP modules. (You have to install some additional packages and PHP modules for PHP to work with your applications.)

sudo apt-get install php7.2 php7.2-cli php7.2-common php7.2-opcache php7.2-curl php7.2-mbstring php7.2-mysql php7.2-zip php7.2-xml

Check the PHP version you have installed.

php -v
So you have installed LAMP Stack Successfully. Happy Coding!

Recent Articles

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here