欧普下载是国内较新、较齐、较安全的软件下载基地!
当前位置:首页 ›› 网络软件 ›› 服务器类 ›› LightTPD For Windows下载

LightTPD For Windows v1.4.49

lighttpd[下载地址]
LightTPD For Windows v1.4.49

  lighttpd是一个德国人领导的开源软件,lighttpd根本的目的是提供一个专门针对高性能网站,安全、快速、兼容性好并且灵活的web server环境。lighttpd具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。
  lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能,而Apache之所以流行,很大程度也是因为功能丰富,在lighttpd上很多功能都有相应的实现了,这点对于apache的用 户是非常重要的,因为迁移到lighttpd就必须面对这些问题。

LightTPD For Windows v1.4.49

LightTPD For Windows安装教程

1.解压到任何目录(最好是英文目录,其他语言的没试过),如d:\inetpub\LightTPD;我的系统环境:Vista32 中文版,PHP5.2.3和5.2.4,mysql 5.0.45;

以下的conf、bat和RunHiddenConsole.exe可以在这里下载:http://www.box.net/shared/vfvqyjhday

2.打开conf文件夹,将lighttpd-inc.conf备份;

3.修改这个配置文件,我的配置如下(精简过的)#后面的是注释,详细注释前往官方文档

代码:

#定义lighttpd所在目录

var.root = "D:/Inetpub/Lighttpd"

#启用的modules(详细见原版lighttpd-inc.conf)

server.modules = (

"mod_access",

"mod_cgi",

"mod_accesslog",

"mod_alias",

#"mod_fastcgi"

)

#服务的目录

server.document-root = "D:/Inetpub/www/"

server.errorlog = var.root + "/logs/lighttpd.error.log"

server.upload-dirs = (var.root + "/tmp")

accesslog.filename = var.root + "/logs/access.log"

#默认首页

index-file.names = ( "index.php", "index.html", "index.htm" )

#使用php

static-file.exclude-extensions = ( ".php" )

#使用CGI php的定义

cgi.assign = ( ".php" => "D:/Inetpub/php/php-cgi.exe")

#使用fastcgi PHP(win版下可使用)

#fastcgi.server = ( ".php" =>( "localhost" =>("host" => "127.0.0.1","port" => 521 )))

mimetype.assign = (

".pdf" => "application/pdf",

".sig" => "application/pgp-signature",

".spl" => "application/futuresplash",

".class" => "application/octet-stream",

".ps" => "application/postscript",

".torrent" => "application/x-bittorrent",

".dvi" => "application/x-dvi",

".gz" => "application/x-gzip",

".pac" => "application/x-ns-proxy-autoconfig",

".swf" => "application/x-shockwave-flash",

".tar.gz" => "application/x-tgz",

".tgz" => "application/x-tgz",

".tar" => "application/x-tar",

".zip" => "application/zip",

".mp3" => "audio/mpeg",

".m3u" => "audio/x-mpegurl",

".wma" => "audio/x-ms-wma",

".wax" => "audio/x-ms-wax",

".ogg" => "application/ogg",

".wav" => "audio/x-wav",

".gif" => "image/gif",

".jpg" => "image/jpeg",

".jpeg" => "image/jpeg",

".png" => "image/png",

".xbm" => "image/x-xbitmap",

".xpm" => "image/x-xpixmap",

".xwd" => "image/x-xwindowdump",

".css" => "text/css",

".html" => "text/html",

".htm" => "text/html",

".js" => "text/javascript",

".asc" => "text/plain",

".c" => "text/plain",

".cpp" => "text/plain",

".log" => "text/plain",

".conf" => "text/plain",

".text" => "text/plain",

".txt" => "text/plain",

".dtd" => "text/xml",

".xml" => "text/xml",

".mpeg" => "video/mpeg",

".mpg" => "video/mpeg",

".mov" => "video/quicktime",

".qt" => "video/quicktime",

".avi" => "video/x-msvideo",

".asf" => "video/x-ms-asf",

".asx" => "video/x-ms-asf",

".wmv" => "video/x-ms-wmv",

".bz2" => "application/x-bzip",

".tbz" => "application/x-bzip-compressed-tar",

".tar.bz2" => "application/x-bzip-compressed-tar"

)

#虚拟目录

alias.url = ( "/ma/" => "D:/Inetpub/ma/" )

#侦听端口

server.port = 81

mimetype.use-xattr = "enable"

#无首页是否列文件目录

dir-listing.activate = "enable"

#服务器的版本好(好像是列目录时显示的)

server.tag = "lighttpd/1.4.18i-win32"

url.access-deny = ( "~", ".inc" )

$HTTP["url"] =~ "\.pdf$" {

server.range-requests = "disable"

}

4.写运行Lighttpd的批处理文件放在lighttpd的根目录下:

运行CGI php:

start_lighttpd - cgi.bat

代码:

@ECHO OFF

ECHO Starting lighttpd...

#重点是这句,-m指定mod文件的位置(一般不需要修改),-f指定配置文件的位置

LightTPD.exe -m lib\ -f conf\lighttpd.conf

IF %errorlevel% GTR 0 (

ECHO Starting lighttpd failed!

PAUSE

) ELSE (

ECHO Starting lighttpd succeed!

)

运行fastcgi php:

a.先确保在conf中使用mod_fastcgi,和配置了fastcgi.server;

b.start_lighttpd - fastcgi.bat,RunHiddenConsole.exe 在官方网站有下(也可以不使用,不过回留下一个cmd的窗口)

代码:

@ECHO OFF

ECHO Starting PHP FastCGI...

#运行php-cgi.exe

RunHiddenConsole.exe ..\PHP\php-cgi.exe -b 127.0.0.1:521

ECHO Starting LightTPD...

ECHO.

lighttpd.exe -v

ECHO.

lighttpd.exe -f etc\lighttpd.conf -m lib

EXIT

关闭Lighttpd:

stop_lighttpd - cgi.bat

代码:

@ECHO OFF

ECHO Stoping lighttpd...

bin\Process -k LightTPD.exe

ping 127.0.0.1 > NUL

stop_lighttpd_fastcgi.bat

代码:

@ECHO OFF

ECHO Stopping LightTPD...

bin\process.exe -k lighttpd.exe >nul

ECHO Stopping PHP FastCGI...

bin\process.exe -k php-cgi.exe >nul

ECHO.

EXIT

重启Lighttpd:

restart_lighttpd.bat

代码:

@ECHO OFF

CALL stop_lighttpd.bat

CALL start_lighttpd.bat

5.也可以去bin目录把lighttpd配置成windows的系统服务。

lighttpd特点:

相较于其他的网页服务器,lighttpd仅需少量的内存及CPU资源即可达到同样的效能。

lighttpd

Lighttpd是一个具有非常低的内存开销,cpu占用率低,效能好,以及丰富的模块等特点。lighttpd是众多OpenSource轻量级的web server中较为优秀的一个。支持FastCGI, CGI, Auth, 输出压缩(output compress), URL重写, Alias等重要功能。

Lighttpd使用fastcgi方式运行php,它会使用很少的PHP进程响应很大的并发量。

Fastcgi的优点在于:

从稳定性上看, fastcgi是以独立的进程池运行来cgi,单独一个进程死掉,系统可以很轻易的丢弃,然后重新分配新的进程来运行逻辑.

从安全性上看, fastcgi和宿主的server完全独立, fastcgi怎么down也不会把server搞垮,

从性能上看, fastcgi把动态逻辑的处理从server中分离出来, 大负荷的IO处理还是留给宿主server, 这样宿主server可以一心一意作IO,对于一个普通的动态网页来说, 逻辑处理可能只有一小部分, 大量的图片等静态IO处理完全不需要逻辑程序的参与(注1)

从扩展性上讲, fastcgi是一个中立的技术标准, 完全可以支持任何语言写的处理程序(php,java,python...)

nginx与lighttpd性能简单对比

做nginx和lighttpd的性能对比,可以在选择webserver上做个参考。

测试环境如下

Dell2950 4G内存,FreeBSD 8.2 release

#sysctl -a | grep CPU
hw.model: Intel(R) Xeon(R) CPU                        5130 @ 2.00GHz

2x2颗

内存4G

#uname -a
FreeBSD localhost.localdomain 8.2-RELEASE

php5.2.17,fastcgi方式,默认5进程测试,失败请求太多,改用20进程,无请求失败。

Nginx主要配置

events {

use kqueue;

worker_connections 102400;

}

写了个phpinfo用ab测试,内网IP,不考虑带宽因素。

# ab -n 100000 -c 1000 http://192.168.100.28/info.php
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.100.28 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software:                nginx/1.0.0                                                                                
Server Hostname:                192.168.100.28
Server Port:                        80

Document Path:                 /info.php
Document Length:                49457 bytes

Concurrency Level:         1000
Time taken for tests: 86.578 seconds
Complete requests:         100000
Failed requests:                0
Broken pipe errors:         0
Total transferred:         4977355920 bytes
HTML transferred:         4961202790 bytes
Requests per second:        1155.03 [#/sec] (mean)
Time per request:         865.78 [ms] (mean)
Time per request:         0.87 [ms] (mean, across all concurrent requests)
Transfer rate:                 57489.84 [Kbytes/sec] received

Connnection Times (ms)
                        min mean[+/-sd] median max
Connect:                0 297 888.8         11 6414
Processing:        20 555 649.9        421 9989
Waiting:         18 555 649.9        421 9988
Total:                 20 852 1065.3        473 10222

Percentage of the requests served within a certain time (ms)
50%        473
66%        584
75%        699
80%        776
90% 3308
95% 3473
98% 3688
99% 3817
100% 10222 (last request)

iostat -w 1

tty         mfid0         da0         cd0         cpu

tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id

0 23 19.12 1 0.01 0.01 0 0.00 0.00 0 0.00 0 0 0 0 100

0 235 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100

0 79 2.00 3 0.01 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100

4 393 2.00 2 0.00 0.00 0 0.00 0.00 0 0.00 10 0 4 2 85

0 78 123.85 54 6.52 0.00 0 0.00 0.00 0 0.00 76 0 17 7 0

0 76 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 72 0 16 8 5

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 81 0 12 5 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 74 0 15 7 3

0 79 16.95 19 0.31 0.00 0 0.00 0.00 0 0.00 71 0 19 8 2

0 78 21.60 10 0.21 0.00 0 0.00 0.00 0 0.00 74 0 17 7 2

0 78 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 74 0 17 8 1

0 78 53.33 3 0.16 0.00 0 0.00 0.00 0 0.00 68 0 21 10 1

0 104 20.20 20 0.39 0.00 0 0.00 0.00 0 0.00 68 0 18 10 5

磁盘压力只在测试开始时大,并且因为所有东西都放在一台服务器,瞬间最高把CPU空闲率干到了0.3%,但实际上占用CPU最多的是ab,占了40%多,nginx占用不到40%

------------------------------------------------换lighttpd

server.max-fds = 8192

##

## Stat() call caching.

##

## lighttpd can utilize FAM/Gamin to cache stat call.

##

## possible values are:

## disable, simple or fam.

##

server.stat-cache-engine = "simple"

##

## Fine tuning for the request handling

##

## max-connections == max-fds/2 (maybe /3)

## means the other file handles are used for fastcgi/files

##

Server.max-connections = 4096

也是使用kqueue队列

# ab -n 100000 -c 1000 http://192.168.100.28/info.php
This is ApacheBench, Version 1.3d <$Revision: 1.73 $> apache-1.3
Copyright (c) 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Copyright (c) 2006 The Apache Software Foundation, http://www.apache.org/

Benchmarking 192.168.100.28 (be patient)
Completed 10000 requests
Completed 20000 requests
Completed 30000 requests
Completed 40000 requests
Completed 50000 requests
Completed 60000 requests
Completed 70000 requests
Completed 80000 requests
Completed 90000 requests
Finished 100000 requests
Server Software:                lighttpd/1.4.28                                                                        
Server Hostname:                192.168.100.28
Server Port:                        80

Document Path:                 /info.php
Document Length:                49127 bytes

Concurrency Level:         1000
Time taken for tests: 83.107 seconds
Complete requests:         100000
Failed requests:                0
Broken pipe errors:         0
Total transferred:         4932575365 bytes
HTML transferred:         4915304142 bytes
Requests per second:        1203.27 [#/sec] (mean)
Time per request:         831.07 [ms] (mean)
Time per request:         0.83 [ms] (mean, across all concurrent requests)
Transfer rate:                 59352.10 [Kbytes/sec] received

Connnection Times (ms)
                        min mean[+/-sd] median max
Connect:                0        19 206.2         1 3113
Processing:        79 807 155.8        823 3891
Waiting:         66 807 155.8        823 3890
Total:                 79 826 251.0        826 4248

Percentage of the requests served within a certain time (ms)
50%        826
66%        843
75%        854
80%        862
90%        894
95%        939
98% 1006
99% 1094
100% 4248 (last request)

# iostat -w 1

tty         mfid0         da0         cd0         cpu

tin tout KB/t tps MB/s KB/t tps MB/s KB/t tps MB/s us ni sy in id

0 23 19.25 1 0.01 0.01 0 0.00 0.00 0 0.00 0 0 0 0 100

0 387 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0 0 0 0 99

0 78 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 0 0 0 0 100

4 2185 0.00 0 0.00 0.00 0 0.00 0.00 0 0.00 47 0 14 7 33

0 78 120.00 2 0.23 0.00 0 0.00 0.00 0 0.00 68 0 23 9 1

0 2405 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 77 0 14 6 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 71 0 17 10 2

0 1852 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 72 0 18 8 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 62 0 22 7 10

0 1143 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 68 0 20 9 3

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 65 0 25 8 2

0 2074 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 69 0 22 8 2

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 65 0 23 10 3

0 1917 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 62 0 26 10 3

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 63 0 25 8 5

0 2247 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 66 0 23 8 3

0 79 128.00 1 0.12 0.00 0 0.00 0.00 0 0.00 66 0 25 7 2

0 1373 48.00 7 0.33 0.00 0 0.00 0.00 0 0.00 66 0 22 8 4

看起来,lighttpd在磁盘上并没有nginx那样的瞬间压力。

NTFS for mac
NTFS for mac
Paragon NTFS for mac是OS系统中一款功能强大的mac读写工具,也是唯一的读写外置存储设备解决方案,具有传输速度快、数据安全性高的特点,兼容Mac OS X所有版本。小编带来了Paragon NTFS for mac不同版
下载LightTPD For Windows v1.4.49
本地下载地址:
本地电信下载
本地电信下载
本地联通下载
本地联通下载
本地迅雷下载
本地迅雷下载
移动用户下载
移动用户下载

版权声明:本站提的序列号、注册码、注册机、补丁等均来自互联网,仅供学习交流之用,请在下载后24小时内删除。

猜您喜欢
相关文章
软件评论
请自觉遵守互联网相关政策法规,评论内容只代表网友观点,与本站立场无关!
    登录   注册