• Linux零碎下Lighttpd的安置设置配备铺排1


     
     
    lighttpd(http://lighttpd.net/)和apache一样是开源的,与apache比拟,虽然听命不及apache美满,颠簸性也不如apache,但是,不论是办事静态页面,还是办事静态内容(CGI,PHP),它都比apache快,用于ad banner之类的WEB办事器是最恰当不外了。
    本文从使用的角度,分析');如何安置、设置配备铺排lighttpd。
    (1) 安置
    可从http://lighttpd.net/download/下载最新的源码(.tar.gz)可能rpm包。要是下载的是.tar.gz文件,则和GNU的其他软件一样,先./configure一下,然后 make && make install就搞定了。但是要是你想定制一些听命,就得好顺眼看解压后README, INSTALL以及./configure --help的输出成效了。这里仅仅说一下如何从源码安置,其他安置方法可参考 http://trac.lighttpd.net/trac/wiki/TutorialInstallation。
    $ gzip -cd lighttpd-1.4.9.tar.gz   tar xf -
    ...
    $ cd lighttpd-1.4.9
    $ ./configure --help
    `configure' configures lighttpd 1.4.9 to adapt to many kinds of systems.
    Usage: ./configure [OPTION]... [VAR=VALUE]...
    To assign environment variables (e.g., CC, CFLAGS...), specify them as
    VAR=VALUE. See below for descriptions of some of the useful variables.
    Defaults for the options are specified in brackets.
    Configuration:
    ...
    Installation directories:
    --prefix=PREFIX install architecture-independent files in PREFIX
    [/usr/local]
    --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
    [PREFIX]
    By default, `make install' will install all the files in
    `/usr/local/bin', `/usr/local/lib' etc. You can specify
    an installation prefix other than `/usr/local' using `--prefix',
    for instance `--prefix=$HOME'.
    For better control, use the options below.
    Fine tuning of the installation directories:
    ...
    Program names:
    ...
    System types:
    ...
    Optional Features:
    --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
    --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
    --enable-maintainer-mode enable make rules and dependencies not useful
    (and sometimes confusing) to the casual installer
    --disable-dependency-tracking speeds up one-time build
    --enable-dependency-tracking do not reject slow dependency extractors
    --enable-static[=PKGS]
    build static libraries [default=no]
    --enable-shared[=PKGS]
    build shared libraries [default=yes]
    --enable-fast-install[=PKGS]
    optimize for fast installation [default=yes]
    --disable-libtool-lock avoid locking (might break parallel builds)
    --enable-lfs Turn on Large File System (default)
    --disable-ipv6 disable IPv6 support
    Optional Packages:
    --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
    --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
    --with-gnu-ld assume the C compiler uses GNU ld [default=no]
    --with-pic try to use only PIC/non-PIC objects [default=use
    both]
    --with-tags[=TAGS]
    include additional configurations [automatic]
    --with-mysql[=PATH]
    Include MySQL support. PATH is the path to
    'mysql_config'
    --with-ldap enable LDAP support
    --with-attr enable extended attribute support
    --with-valgrind enable internal support for valgrind
    --with-openssl[=DIR]
    Include openssl support (default no)
    --with-openssl-includes=DIR
    OpenSSL includes
    --with-openssl-libs=DIR OpenSSL libraries
    --with-kerberos5 use Kerberos5 support with OpenSSL
    --with-pcre Enable pcre support (default yes)
    --with-bzip2 Enable bzip2 support for mod_compress
    --with-fam fam/gamin for reducing number of stat() calls
    --with-webdav-props properties in mod_webdav
    --with-gdbm gdbm storage for mod_trigger_b4_dl
    --with-memcache memcached storage for mod_trigger_b4_dl
    --with-lua lua engine for mod_cml
    Some influential environment variables:
    ...
    如上所述,可经由历程--prefix指定安置路子,默许安置在/usr/local下。可以指定启用哪些特性(插件),禁用哪些特性(插件)。假定我们要把lighttpd安置到/usr/local/lighttpd-1.4.9上面。
    $ ./configure --prefix=/usr/local/lighttpd-1.4.9
    $ make
    $ make install
    $ cp doc/lighttpd.conf /usr/local/lighttpd-1.4.9/ # 拷贝设置配备铺排文件
    $ cd /usr/local/lighttpd-1.4.9
    $ vi lighttpd.conf # 修改设置配备铺排文件
    设置配备铺排文件很直不雅观了然,一样平居只需把server.document-root、server.errorlog、accesslog.filename改成你的幻想目录和文件名字就可以了。
    $ sbin/lighttpd -f lighttpd.conf # 启动lighttpd办事
    $ ps aux   grep lighttpd
    www 15403 0.0 0.9 2860 1148 ? S 00:15 0:00 sbin/lighttpd -f
    这就完成了从安置到启动的整个历程,很庞大吧。从最后一行的输出可以看出,lighttpd是单历程办事的,这和apache不一样(大概是它的颠簸性不如apache的一个缘由)。
     
     
    来自: 新客网(www.xker.com) 详文参考:http://www.xker.com/page/e2007/1022/36591.html


    版权声明: 原创作品,批准转载,转载时请务必以超链接体式格局标明文章 原始来由 、作者信息和本声明。不然将清查功令责任。

  • 相关阅读:
    android —— textview解析html富文本
    android toolbar及可折叠标题栏
    dp——cf1327F
    cf1327D,E——组合数学
    技能表自查
    python 之禅 import this
    转--Python标准库之一句话概括
    python 爆破
    python -- 算法
    python 代码模板
  • 原文地址:https://www.cnblogs.com/zgqjymx/p/1975483.html
Copyright © 2020-2023  润新知