(1)安装nginx
1.下载地址: http://nginx.org/en/download.html ,并解压到目录下
2.安装依赖包 yum -y install pcre* yum -y install openssl*
3.执行./configure --prefix=/usr/local/nginx
# mkdir vhost
# vim ./nginx.conf (在最后大括号前添加一行并保存退出: include vhost/*.conf; )
6. 可在vhost目录内新建虚拟主机配置文件,以.conf结尾,内容可参考nginx.conf中的server部分
(2)安装php:
1.下载地址:http://php.net/downloads.php
2.安装依赖包 :yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel
3. 由于centOS没有libmcrypt,所以要先下载第三方源
cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf
cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
修改www.conf 下面user=wwww,group=www
最后ps -aux | grep php-fpm就可以启动了
(3)安装composer
curl -sS https://getcomposer.org/installer | php
执行这个命令前要建立php的软连接,ln -s /usr/local/php/bin/php /usr/local/bin
mv composer.phar /usr/local/bin/composer
(4)安装redis
原文:http://www.cnblogs.com/maoaji/p/5855022.html