Openwrt里架设Lighttpd+PhP5+MYSQL环境标准教程

时间:2025-07-12

Openwrt里架设Lighttpd+PhP5+MYSQL环境标准教程

Lighttpd+PhP5+MYSQL标准教程

一:硬件准备

路由一台,内存最少64m,推荐128m以上!优盘一个,不推荐多功能读卡器! 二:软件准备

刷好OPenwrt系统,挂载好优盘并且确保识别为/mnt/sda1(需要扩展系统的提前准 备 好)(一般的系统都会默认自动挂载到/mnt/sda1下面,教程以此为基础)

三:GO-->

■■■■■■■■■■安装web服务程序和php程序■■■■■■■■■■ 1,更新和安装组件

opkg update

opkg install lighttpd-mod-fastcgi lighttpd-mod-access

lighttpd-mod-alias lighttpd-mod-redirect lighttpd-mod-rewrite

opkg install php5-fastcgi php5-mod-gd php5-mod-xml php5-mod-ctype php5-mod-session php5-mod-sockets php5-mod-tokenizer

opkg install php5-mod-mcrypt php5-mod-mbstring php5-mod-pdo

php5-mod-curl lighttpd-mod-evasive

2,建立/mnt/sda1/web

3,修改lighttpg.conf 文件相应信息

server.modules = (

"mod_alias",

"mod_access",

"mod_evasive",

"mod_rewrite",

"mod_redirect",

"mod_fastcgi"

)

server.document-root = "/mnt/sda1/web/"

server.errorlog = "/var/log/lighttpd/error.log"

server.port = 88

s = ( "index.php", "index.html","default.html", "index.htm", "default.htm" )

fastcgi.server = ( ".php" =>

( "localhost" =>

(

"socket" => "/tmp/php-fastcgi.socket",

"bin-path" => "/usr/bin/php-fcgi",

"max-procs" => 2,

"bin-environment" => (

Openwrt里架设Lighttpd+PhP5+MYSQL环境标准教程.doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:7 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219