Ubuntu14.04 build the LAMP environment and ubuntu14.04 build the lamp Environment

Source: Internet
Author: User

Ubuntu14.04 build the LAMP environment and ubuntu14.04 build the lamp Environment

Preface

I can't remember how many LAMP environments I have built, not only on windows, but also on linux. windows is good, and there are not many troubles, once I set up the LAMP, I will know how to configure it. But every time I set up the LAMP in linux, I always forget how the previous build was successful...

So I went to Google again and again to find a tutorial, and found that all the tutorials I found were mixed. There were a set of rules, which made people feel like there were n methods to build the environment in linux, but I don't know which one is the correct posture...

Today, we found that LAMP is now very easy in linux, basically simply by typing a few installation commands, and then changing the configuration will be done, and it will never be better.

Of course, I am in ubuntu14.04. It is estimated that different linux releases will have different pains...

Apache2

First of all, install apache2 and input sudo apt-get install apache2. After installation, the location is in/etc/apache2. The directory structure is as follows:

 

Note: Unlike apache in windows, most configurations are in the apache2.conf configuration file, apache2 in linux disperses different types of configurations into sub-configuration files. For example, if you want to change the access port, modify ports. conf

 

PHP5

Installing PHP is also a command: sudo apt-get install php5. After installation, it seems that I will automatically configure apache2. If it is unavailable after installation, then execute sudo apt-get install libapache2-mod-php5

 

MySQL

Run sudo apt-get install mysql-server.

You will be prompted to set the user and password during installation.

 

PhpMyAdmin

With MySQL, I don't think you would like to manage and view the database in the dark command line. According to my habits, the next step is to immediately install phpMyAdmin, which is also very simple to install, first, download the compressed package to the local device.

Wget https://files.phpmyadmin.net/phpMyAdmin/4.6.4/phpMyAdmin-4.6.4-all-languages.tar.gz (this address corresponds to the specific version of the official website compressed package address, self replacement)

Decompress the package to the web directory.

Sudo tar-xzvf phpMyAdmin-4.6.4-all-languages.tar.g./var/www/html

Modify the name, for example

Sudo mv phpMyAdmin-4.6.4-all-languages phpmyadmin

OK. Now open your localhost/phpmyadmin or www.yourdomain.com/phpmyadminyour data library! Is there a better interface?

 

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.