Ubuntu 18.04 LTS Build LAMP Environment

Source: Internet
Author: User
Tags phpmyadmin

This time we'll look at how Ubuntu builds the lamp environment.

We just installed the virtual machine last time.

So first we need to change the source of the software. (The official source is really too slow.) )

Ubuntu Configuration Source

On this website.

Download the source you need.

I will download it first openssh-server and then ssh log in to the operation. The computer is too jammed.

Once connected, we first change the mirror source.

sources.listPut it in the /etc/apt/ table of contents

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiversedeb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiversedeb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse

And then update it. sudo apt-get update

Next we build the lamp environment

First to installapache2

sudo apt-get install apache2 -y

When the installation is complete, access the virtual machine IP to see the following interface:

Then installphp

sudo apt-get install php7.2 -y

Installing php related components

sudo apt-get install libapache2-mod-php7.2

Installation mysql Services

sudo apt-get install mysql-server -y

Installing php-mysql related components

sudo apt-get install php7.2-mysql

Here the lamp environment has actually been built. The following options are available.

Installation phpmyadmin (optional)

PhpMyAdmin is a PHP-based, web-base-style database management tool that is architected on a Web site host for MySQL.

sudo apt-get install phpmyadmin -y

Choose hereapache2

sudo ln -s /usr/share/phpmyadmin /var/www/html/phpmyadmin

Access to the virtual machine ip/phpmyadmin can see the following interface

Restart mysql , apache2 service

sudo service mysql restart
sudo service apache2 restart

Ubuntu 18.04 LTS Build LAMP Environment

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.