来源:自学PHP网 时间:2015-04-14 11:51 作者: 阅读:次
[导读] CentOS-5 yum安装nginx php53 mysql55 lnmp环境对于lnmp的使用,www.centos.bz已经提供有lnmp安装包,但如果想快速配置环境,则推荐yum安装了。1、导入外部软件库centos-5 32位:rpm -Uvh http://dl.iusc......
CentOS-5 yum安装nginx php53 mysql55 lnmp环境
对于lnmp的使用,已经提供有lnmp安装包,但如果想快速配置环境,则推荐yum安装了。
1、导入外部软件库
centos-5 32位:
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/epel-release-5-4.noarch.rpm
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/i386/ius-release-1.0-10.ius.el5.noarch.rpm
rpm -Uvh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm
centos-5 64位:
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/epel-release-5-4.noarch.rpm
rpm -Uvh http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/x86_64/ius-release-1.0-10.ius.el5.noarch.rpm
rpm -Uvh http://nginx.org/packages/centos/5/noarch/RPMS/nginx-release-centos-5-0.el5.ngx.noarch.rpm
编辑/etc/yum.repos.d/ius.repo,注释以下行:
mirrorlist=http://dmirr.iuscommunity.org/mirrorlist?repo=ius-el5&arch=$basearch
删除注释以下行:
#baseurl=http://dl.iuscommunity.org/pub/ius/stable/Redhat/5/$basearch
2、yum安装lnmp
yum install mysql55-server mysql55 php53u-fpm php53u-mysql nginx
3、配置lnmp
vi /etc/nginx/conf.d/default.conf
修改为:
location ~ \.php$ {
root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$fastcgi_script_name;
include fastcgi_params;
}
4、启动lnmp
chkconfig php-fpm on
chkconfig nginx on
chkconfig mysqld on
service php-fpm start
service nginx start
service mysqld start
本文来自于CentOS Linux教程网
|
自学PHP网专注网站建设学习,PHP程序学习,平面设计学习,以及操作系统学习
京ICP备14009008号-1@版权所有www.zixuephp.com
网站声明:本站所有视频,教程都由网友上传,站长收集和分享给大家学习使用,如由牵扯版权问题请联系站长邮箱904561283@qq.com