Debian 7快速搭建安装LNMP网站服务器(lighttpd)

 时间:2026-02-15 14:22:41

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的密码。

Debian 7快速搭建安装LNMP网站服务器(lighttpd)

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",

))

)

Debian 7快速搭建安装LNMP网站服务器(lighttpd)

3、3.禁用fastcgi模块和fastcgi的php支持,使用刚才建立的 fastcgi-fpm 模块同时支持两者。

lighty-disable-mod fastcgilighty-disable-mod fastcgi-phplighty-enable-mod fastcgi-fpmservice lighttpd force-reload

查看探针和phpinfo,可以看到已经是FPM支持了。

Debian 7快速搭建安装LNMP网站服务器(lighttpd)

Debian 7快速搭建安装LNMP网站服务器(lighttpd)

  • 搭建LNMP平台详解
  • 教你如何构建支持lighttpd + cgi的环境
  • Linux源码安装lnmp
  • Linux 搭建 lnmp 环境
  • centOS如何安装lnmp环境
  • 热门搜索
    海洋手抄报 手抄报的边框 创建平安校园手抄报 做文明小学生手抄报 有关中秋节的手抄报 普法手抄报图片 清明手抄报图片大全 生活中的小数手抄报 小学生守则手抄报 武汉手抄报