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环境
  • 热门搜索
    养龟的方法 手动挡起步正确方法 脑筋急转弯大全及答案 软件大全 莲藕的做法大全家常 豌豆苗怎么做好吃 手心热是怎么回事 怎么申请淘宝小号 广告策划案怎么写 治疗颈椎最好的方法