Install mysql + php + apache + phpmyadmin in ubuntu

Source: Internet
Author: User


Recently, because the project needs to configure the mysql + php + apache environment, the steps are relatively simple and listed as follows:

1. Installation Command: apt-get install apache2

After changing the configuration, restart:/etc/init. d/apache2 restart

2. Install php:

Apt-get install libapache2-mod-php5

Apt-get install php5

Note: If you want to support graphics plus php5-gd, if you want to support Mysql plus php5-mysql, the reason here to list libapache2-mod-php5 separately, mainly because the php5 dependency is not well done, it is possible to install the package on the libapache-mod-php4, so to avoid unnecessary trouble, it is better to simply specify it separately. If a friend still has a problem, find the libapache-mod-php4 package in the new, and delete it if installed.

3. Install mysql

Apt-get install mysql-server

4. Install phpmyadmin

In fact, this is the easiest thing to do, but I don't know what's going on. I 've been confused during installation for a long time. In fact, phpmyadmin can regard it as a php program, so you only need to go down the Internet, modify the apache files, and create an alias for him.

Uninstall command

Mysql uninstall with sudo aptitude purge mysql-server mysql-server-5.0

Sudo aptitude purge php5

It's done.

Apache2 uninstall: 1. sudo apt-get remove apache2

2. sudo apt-get remove apache2.2-common

3. sudo apt-get autoremove (this command will automatically uninstall PHP)

Important File Directory:

/Etc/apache2: apache2 server settings,

/Etc/php5/apache2/php. ini

/Etc/mysql/my. cnf

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.