Installation notes for Apache + MySQL + PHP in Ubuntu

Source: Internet
Author: User

1. install Apache
$ Sudo apt-Get install apache2
Test:
Enter http: // 192.168.21.20./ in the browser/
192.168.21.20.for Ubuntu IP

2. install PHP
$ Sudo apt-Get install PhP5
$ Sudo apt-Get install libapache2-mod-php5
$ Sudo/etc/init. d/apache2 restart

Test: sudo Vim/var/www/test. php
Vim input:

Enter http: // 192.168.21.20./ test. php in the browser.

Output Hello world in the browser, indicating that the installation is correct

3. Install MySQL

$ Sudo apt-Get install mysql-Server
Enable external access permissions
$ Grant all privileges on *. * to root @ "%" identified by "123456 ";

$ Sudo VI/etc/MySQL/My. CNF

Bind-address = 127.0.0.1 => bind-address = IP address of your machine
Or comment the bind-address = 127.0.0.1 line.
This allows other machines to access MySQL.

Reference: http://wiki.ubuntu.org.cn/MySQL%E5% AE %89%E8%A3%85%E6%8C%87%E5%8D%97

4. Make Apache and PHP support MySQL
$ Sudo apt-Get install libapache2-mod-auth-mysql
$ Sudo apt-Get install php5-mysql
$ Sudo/etc/init. d/apache2 restart

5. Install phpMyAdmin
$ Sudo apt-Get install phpMyAdmin
$ Sudo ln-S/usr/share/PHPmyAdmin/var/www/
Use: http: // localhost/PHPmyAdmin/for access

Reference: http://www.linuxidc.com/Linux/2010-07/27230.htm

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.