Ubuntu11.10 build a PHP server

Source: Internet
Author: User
Tags php server
I suddenly wanted to see how to build my own php server. I installed Ubuntu on the VMware Virtual Machine and tested it myself. The specific method is shown below. Ubuntu11.10 PHP server (Apache + PHP + MySQL): basic support environment. Zend optimization is not applied yet, so the installation of zendoptimizer is not involved here. In fact, the installation in ubuntu is far easier than setting in windows, and setting in a terminal is easier.

I suddenly wanted to see how to build my own php server. I installed Ubuntu on the VMware Virtual Machine and tested it myself. The specific method is shown below.

How to build a PHP server (Apache + PHP + MySQL) in Ubuntu 11.10:

Basic Support Environment. Zend optimization is not applied yet, so zend optimizer installation is not involved here. In fact, installation in ubuntu is far easier than setting in windows, and setting in a terminal is easier.
1. Install the Apache service
Sudo apt-get install apache2
Then, follow the prompts to install apahce. It can be opened here

Http: // 127.0.0.1

It works


2. Install php5
Sudo apt-get install php5
Sudo apt-get install libapache2-mod-php5
Sudo/etc/init. d/apache2 restart
After OK, let's see if it takes effect.
Gksudo gedit/var/www/testphp. php
Inbound Probe
Save run

Http: // 127.0.0.1/testphp. php

3. Install mysql
Sudo apt-get install mysql-server
After installation is complete, follow the prompts to set the root password
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
Now The apache2 + php 5.2.4.2 + mysql5.0.51 environment is complete.

For more information, see test the wordpress program in the local environment.

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.