Ubuntu is easy to install LAMP

Source: Internet
Author: User
In Ubuntu, LAMP is not installed by default. The Server version will be installed by default. Of course, you can make full customization during the installation, so I don't like the built-in things when installing the system, and I have no idea what to install. A few days ago it was okay to switch to LAMP. Now paste the installation process. Make a record! Apache $ sudoapt-getinstallapache2 test http: // localhost in a browser

In Ubuntu, LAMP is not installed by default. The Server version will be installed by default. Of course, you can make full customization during the installation, so I don't like the built-in things when installing the system, and I have no idea what to install. A few days ago it was okay to switch to LAMP. Now paste the installation process. Make a record!

Apache

$ Sudo apt-get install apache2

Test http: // localhost in a browser

PHP

$ Sudo apt-get install php5 libapache2-mod-php5

Restart the Apache service

$ Sudo/etc/init. d/apache2 restart

Test installation

$ Sudo gedit/var/www/testphp. php

Add test statement

Save and exit.

Test http: // localhost/testphp. php In the browser

$ Sudo rm/var/www/testphp. php

MySQL

$ Sudo apt-get install mysql-server

By default, MySQL only allows access from the local machine. If you want to access from another host, www.linuxidc.com can edit the configuration file/etc/mysql/my. cnf.

$ Sudo gedit/etc/mysql/my. cnf

Comment out the line bind-address = 127.0.0.1, save, and exit.

$ Sudo/etc/init. d/mysql restart

MySQL Administrator

$ Sudo apt-get install mysql-admin

Applications-> System Tools-> MySQL Administrator

MySQL for Apache HTTP Server

$ Sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

PHP and MySQL collaboration

$ Sudo gedit/etc/php5/apache2/php. ini

Remove the; number comment in the line "; extension = mysql. so ".

Restart Apache

Sudo/etc/init. d/apache2 restart

Related Article

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.