The blog reposted from Zhike-zxdker recently changed my main operating system to Ubuntu. I feel that Linux can better support php than windows, and install and test wordpress templates and plug-ins locally, it is much more convenient than remote virtual hosts. I recently used my winter vacation time to study php. As a pseudo-tech man studying science, I usually don't have much time to spend. It is good to take a long vacation. Let's talk about how to set up the LAMP php development environment (Linux-Apache-MySQL-PHP. First
Reprinted fromZhike-zxdkerBlog
Recently, my main operating system has changed to Ubuntu. I feel that Linux supports php BETTER THAN windows. Installing and testing wordpress templates and plug-ins locally is much easier than remote virtual hosts. I recently used my winter vacation time to study php. As a pseudo-tech man studying science, I usually don't have much time to spend. It is good to take a long vacation. Let's talk about how to set up the LAMP php development environment (Linux-Apache-MySQL-PHP.
First, install the LAMP kit, set the settings correctly, and finally install the php IDE.
1. Install the LAMP package in Ubuntu.
There are many ways to solve the same problem in Ubuntu. I am a cainiao, so I chose the simplest method.
Enter
Sudo tasksel
Then a software package interface will appear, move the cursor to the LAMP server, press the space, and then select this item. Other items can be deselected, and click OK. Next, you will be asked to enter the password of the root user of MySQL. Remember to use it later when installing the php program. Then install LAMP, which is simple. Enter http: // 127.0.0.1 in the browser and test apache2.
It works!
This is the default web page for this server.
The web server software is running but no content has been added, yet.
It indicates that apache2 has been installed. You can also test MySQL and PHP5. I will not explain how to test it here. Generally, the webpage root directory is under/var/www. Some friends may encounter a situation where they cannot parse php correctly. when they enter the home page, they will prompt whether to download and save the php file. In this way, you can restart apache first.
Sudo/etc/init. d/apache2 restart
Use
Sudo apt-get install libapache2-mod-php5
Sudo/etc/init. d/apache2 restart
Sudo a2enmod php5
It is used to install this module and restart apache to solve the problem.