安装mysql

解压到指定文件夹

[[email protected] ~]# tar -zxvf mysql-5.5.15-linux2.6-i686.tar.gz -C /usr/local/

切换到解压目录查看安装说明文件

lnmp×××

lnmp×××

lnmp×××

到此mysql安装完成

lnmp×××

安装nginx

lnmp×××

lnmp×××

lnmp×××

make

make install

执行下面语句并编辑将库文件指定到标准路径

[[email protected] nginx-1.0.11]# vim /etc/ld.so.conf.d/libevent.conf

lnmp×××

安装nginx

现将其解压到指定目录

[[email protected] ~]# tar -zxvf nginx-1.0.11.tar.gz -C /usr/local/src/

lnmp×××

给nginx增加组合用户

./config

执行的时候提示需要下面文件库 去把它安装了

lnmp×××

lnmp×××

下面就可以执行了

lnmp×××

make make install

可为nginx开机启动给编辑一个文件。便于以后启动该服务,网上有脚本

lnmp×××

启动并查端口号 可见已经启动成功

lnmp×××

下面安装php

解压:

[[email protected] ~]# tar -jxvf php-5.3.7.tar.bz2 -C /usr/local/src/

切换到解压目录

lnmp×××

检测编译环境:

并把mysql连接起来

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-openssl --enable-fpm --with-libevent-dir=/usr/local --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --with-iconv-dir=/usr/local

Make

lnmp×××

Make install

将配置文件拷到主配置目录

lnmp×××

编辑下面文件

lnmp×××

将下面的注释去掉。分号去掉

lnmp×××

 

lnmp×××

lnmp×××

启动php

lnmp×××

设置开机启动

lnmp×××

修改nginx配置文件

[[email protected] nginx]# vim /etc/nginx/nginx.conf

lnmp×××

lnmp×××

重启服务 建立测试文件

lnmp×××

测试结果:

lnmp×××

lnmp×××