首页 > 系统运维 > lighttpd安装学习笔记
您的足迹
  • 你没有浏览过任何文章或者你没有开启cookies。

lighttpd安装学习笔记

1.安装mysql

测试使用yum安装,过程略

2.安装pcre

#./configure && make && make install

3.安装php(fast-cgi)

./configure \
--prefix=/usr/local/php \
--enable-fastcgi \
--enalb-fpm \
--enable-discard-path \
--enable-force-cgi-redirect \
--with-config-file-path=/usr/local/php/etc \
--enable-zend-multibyte \
--with-mysql=/usr/local/mysql \
--with-libxml-dir \
--with-xmlrpc \
--with-gd=/usr/local/gd2 \
--with-jpeg-dir \
--with-png-dir \
--with-bz2 \
--with-freetype-dir \
--with-iconv-dir \
--with-zlib-dir \
--with-curl \
--with-curlwrappers \
--with-openssl \
--with-mcrypt \
--with-mhash \
--enable-pcntl \
--enable-sockets \
--enable-sysvsem \
--enable-inline-optimization \
--enable-soap \
--enable-gd-native-ttf \
--enable-ftp \
--enable-mbstring \
--enable-exif \
--disable-debug \
--disable-ipv6 \
--enable-bcmath

4.安装lighttpd

# groupadd lighttpd
# useradd -g lighttpd -s /sbin/nologin -d /dev/null lighttpd
# ./configure –prefix=/usr/local/lighttpd –with-mysql=/usr/bin/mysql_config  –disable-ipv6
#make && make install

# mkdir /usr/local/lighttpd/conf
# mkdir /usr/local/lighttpd/log
# mv ./doc/lighttpd.conf /usr/local/lighttpd/conf/
# cp ./doc/rc.lighttpd.redhat /etc/init.d/lighttpd

vi conf/lighttpd.conf

将 #”mod_fastcgi”, 的#去掉

server.modules = (

“mod_rewrite”,

“mod_redirect”,

# “mod_alias”,

“mod_access”,

# “mod_cml”,

# “mod_trigger_b4_dl”,

# “mod_auth”,

# “mod_status”,

# “mod_setenv”,

“mod_fastcgi”,

找到fastcgi的定义
#### fastcgi module

## read fastcgi.txt for more info

## for PHP don’t forget to set cgi.fix_pathinfo = 1 in the php.ini

fastcgi.server = ( “.php” =>
( “localhost” =>
(
“socket” => “/var/run/lighttpd/php-fastcgi.socket”,
“bin-path” => “/usr/local/php/bin/php-cgi”
)
)
)
启动lighttpd命令是这样的:
/usr/local/lighttpd/sbin/lighttpd -f conf/lighttpd.conf
最后可以在程序目录下建个test.php,检查一下是否正常!

  1. 还没有评论
评论提交中, 请稍候...

留言

可以使用的标签: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackbacks & Pingbacks ( 0 )
  1. 还没有 trackbacks
Feed