PHP/MySQL Dev. primer (1) Establish Env.
- Author: Liu Da-poechant
- Blog: blog.csdn.net/poechant
- Email: zhongchao.ustc@gmail.com
- Date: May 15Th, 2012
1 Install Web Server
Usually, people are willing to use Apache as the Web server of their sites. honstly, I have to say Apache is an excellent web server. however, you also have to concede nginx is superstar in this realm. perhaps you have heard nginx cocould perform better than Apache for dynamic pages.
Based on the high-performance of nginx, it is necessary to introduce how to set up nginx instead of Apache or any other web server software.
wget http://nginx.org/download/nginx-1.2.0.tar.gztar -zxvf nginx-1.2.0.tar.gzcd nginx-1.2.0./configuremakesudo make install
Then nginx has been install into/usr/local/nginx directory. What's next? Configuration. The following configuration is aimed at a PHP Web site.
//TODO
2 install Database
Ignored
3 install script Lang. Dev. Env.
Ignored
4 Integrated Installation Tools
Mamp: Mac Apache MySQL PHP. Eh, I'm fond of this one
Wamp: Windows Apache MySQL PHP
XAMPP: Windows/MacOSX/Linux/Solaris Apache MySQL PHP/perl/Python
5 basic configuration for the integrated Env.
Apache document root or nginx location
6 Hello world6.1 PHP
<!DOCTYPE html>
6.2 MySQL create database testdb;create table example ( id int, data varchar(100));insert into example values ( 1, 'Hello World, MySQL');select * from example;
-
Reprinted, please indicate the csdn blog from LIU Da: blog.csdn.net/poechant
-