centos6.3 搭建lnpp + memcached
[文章作者:磨延城 转载请注明原文出处: https://mo2g.com/view/20/ ]
lnpp为linux,postgresql,php的简称
l:linux(操作系统)
n:nginx,(web服务器)
p:postgresql(数据库)
p:php(服务器端动态语言)
一)安装nginx
rpm -Uvh http://nginx.org/packages/centos/6/noarch/RPMS/nginx-release-centos-6-0.el6.ngx.noarch.rpm yum install nginx 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 /scripts$fastcgi_script_name; # include fastcgi_params; #}
把#去掉
/scripts改成网站所在目录
二)安装php
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm --nodeps yum --enablerepo=remi install php php-fpm
三)安装postgresql
yum install --enablerepo=remi postgresql-server php-pgsql service postgresql initdb
postgresql配置请看这里
四)安装memcached
yum install --enablerepo=remi memcached php-pecl-memcached
五)设定开机启用
chkconfig --level 345 php-fpm on chkconfig --level 345 postgresql on chkconfig --level 345 nginx on chkconfig --level 345 memcached on /etc/init.d/nginx start /etc/init.d/postgresql start /etc/init.d/php-fpm start /etc/init.d/memcached start
上一篇:postgresql初体验
下一篇:Linux入门
我来说两句: