1:查看环境:
[[email protected] html]# cat /etc/redhat-release
CentOS release 6.5 (Final)
2:关掉防火墙
[[email protected] html]# chkconfig iptables
off
3:配置CentOS 6.0 第三方yum源(CentOS默认的标准源里没有nginx软件包)
#wget http://www.atomicorp.com/installers/atomic
#sh ./atomic
#yum
check
-
update
4:安装开发包和库文件
1 2 3 4 |
|
5:卸载已安装的apache、mysql、php
1 2 3 |
|
6:安装nginx
1 2 3 4 |
|
7:安装mysql
1 2 3 |
|
1 2 3 4 5 6 7 8 |
|
8:安装php
1 2 |
|
//安装php和所需组件使PHP支持MySQL、FastCGI模式
1 |
|
1 2 |
|
9:配置nginx支持php
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
10:配置php
1 2 |
|
11:重启nginx php-fpm
1 2 |
|
12:建立info.php文件
1 2 3 4 |
|
13:测试nginx是否解析php
1 2 |
|