Debian 7快速搭建安装LNMP网站服务器(lighttpd)
1、1.安装lighttpd:
同样也是一条命令安装,这是我喜欢用debian的原因。很多php扩展,程序都能自动安装比较方便。
apt-get update
apt-get install lighttpd mysql-server php5-fpm php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-common php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
中间需输入一次mysql的密码。

2、2.配置lighttpd支持php-fpm:
建立/etc/lighttpd/conf-available/10-fastcgi-fpm.conf文件,写入如下内容:
server.modules += ("mod_fastcgi")
fastcgi.server = ( ".php" =>
((
"socket" => "/var/run/php5-fpm.sock",
))
)

3、3.禁用fastcgi模块和fastcgi的php支持,使用刚才建立的 fastcgi-fpm 模块同时支持两者。
lighty-disable-mod fastcgilighty-disable-mod fastcgi-phplighty-enable-mod fastcgi-fpmservice lighttpd force-reload
查看探针和phpinfo,可以看到已经是FPM支持了。


声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
                                阅读量:53
阅读量:135
阅读量:25
阅读量:172
阅读量:63