Collocation of the lamp environment under Linux

Source: Internet
Author: User

Before the computer changed the ubuntu16.04, the local need to reconfigure, but forget all, so reconfigure a bit, and then this record.

Install Apache:

sudo apt-get install apache2

To restart Apache:

Sudo/etc/init.d/apache2 restart

----------------------------------------------------------------Split Line------------------------------------------------------ -----------------

Install MySQL:

1, sudo apt-get install Mysql-server

2, sudo apt-get install mysql-client

3, sudo apt-get install Libmysqlclient-dev

The user will set the MySQL password at the time of installation

Check that the module is installed successfully: sudo netstal-tap | grep MySQL

If a MySQL socket is in the listen state to indicate a successful installation

Login Mysql:mysql-u Root-p

----------------------------------------------------------Split Line------------------------------------------------------------ ---------------

Install PHP:

sudo apt-get install PHP

------------------------------------------------------------Split Line---------------------------------------------------------- ------------------

Installation of other modules

1,sudo Apt-get Install libapache2-mod-php

2, sudo apt-get install PHP-GD

3, sudo apt-get install Php-mysql

------------------------------------------------------------Split Line---------------------------------------------------------- ------------------

By this, Php+mysql+apache has been configured.

MySQL configuration file:/etc/mysql/my.cnf

Configuration file for Apache2:/etc/apache2/apache2.cnf

PHP configuration file:/etc/php/7.0/apache2/php.ini

Then the graphical interface of the database I used on Linux was phpMyAdmin

Installing Phpmyadmin:sudo apt-get Install phpMyAdmin

During installation, you are prompted to select Web server: You can choose Apach2 or lighttpd, I chose Apache2, and I installed it directly.

The process also has the following tips, I chose no

Connect phpMyAdmin with apache2, www directory in/var/www,phpmyadmin in/usr/share/phpmyadmin directory, so just use the command:

sudo ln-s/usr/share/phpmyadmin/var/www/html to establish a connection. Important

3, sudo/etc/init.d/apache2 Restart restart the apache2 server

4. Phpadmin Test in the browser: Open Http://localhost/phpmyadmin in the browser address bar

Collocation of the lamp environment under Linux

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.