注册 登录  
 加关注
   显示下一条  |  关闭
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!立即重新绑定新浪微博》  |  关闭

phperwuhan的博客

记载一个phper的历程!phperwuhan.blog.163.com

 
 
 

日志

 
 

Failed to enable the 'httpready' Accept Filter  

2010-09-30 15:16:55|  分类: Freebsd |  标签: |举报 |字号 订阅

  下载LOFTER 我的照片书  |

来源:http://zhoushuqun.spaces.live.com/blog/cns!2B070A76FD6627CE!1130.entry

在 FreeBSD 6.2-RELEASE 上从 ports 安装 apache22(/usr/ports/www/apache22),在 /etc/rc.conf 加入 apache22_enable="YES" 后,启动 apache,报下面的警告:
# apachectl start
httpd not running, trying to start
[Wed Sep 12 21:27:30 2007] [warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter

要解决这个问题,只需
# kldload accf_http

并在 /boot/loader.conf 加入下面两行,以便下次启动自动装载模块:
accf_data_load="YES"
accf_http_load="YES"

这两条设置其实是覆盖了在 /boot/defaults/loader.conf 中的这两个同名选项:
# cat /boot/defaults/loader.conf | grep accf
accf_data_load="NO" # Wait for data accept filter
accf_http_load="NO" # Wait for full HTTP request accept filter

---------------- 清晰明朗的分割线 ----------------
其实这个问题我早解决了,今天写出来省得下次遇到再找。

 

来源:http://serverfault.com/questions/72490/httpready-problem-on-apache-httpd-restart-on-freebsd

I run Apache HTTPD 2.2 on my FreeBSD 7.2 webserver. I have enabled the httpready and dataready in my /boot/loader.conf, like this:

accf_http_load="YES"   accf_data_load="YES"   

That works great when the server is started, but whenever I restart (via apachectl graceful or apachectl restart), I get a salvo like this in my /var/log/httpd-error.log:

[Thu Oct 08 13:32:53 2009] [warn] (22)Invalid argument: Failed to enable the 'httpready' Accept Filter   [Thu Oct 08 13:32:53 2009] [warn] (22)Invalid argument: Failed to enable the 'dataready' Accept Filter   [Thu Oct 08 13:32:53 2009] [warn] (22)Invalid argument: Failed to enable the 'httpready' Accept Filter   [Thu Oct 08 13:32:53 2009] [warn] (22)Invalid argument: Failed to enable the 'dataready' Accept Filter   [Thu Oct 08 13:32:53 2009] [warn] (22)Invalid argument: Failed to enable the 'httpready' Accept Filter   [Thu Oct 08 13:32:53 2009] [warn] (22)Invalid argument: Failed to enable the 'httpready' Accept Filter   

There' is a bug for this on ASF bugzilla, but that doesn't look like it's going anywhere soon, so in the meantime, I'm looking to find out if this is really a problem (does the httpready filter still work despite the warnings?), and if it is, is there a workaround?

 

 

http://www.pc51.net/system/unix/freebsd/2009-09-05/10882.html

apache22 在启动时出现 Failed to enable the 'dataready' Accept Filter 的出错提示,解决方法如下:


1.在/etc/rc.conf中加入
代码:
apache22_http_accept_enable="YES"
 

2.
ee /boot/defaults/loader.conf


代码:
accf_data_load="YES"            # Wait for data accept filter
accf_http_load="YES"            # Wait for full HTTP request accept filter

3.编辑httpd.conf文件

ee /usr/local/etc/apache/Includes/no-accf.conf
把里面的内容改成
AcceptFilter http httpready
AcceptFilter https dataready

重启操作系统后即可解决


该文章转载自宋氏电脑 技术无忧:http://www.pc51.net/system/unix/freebsd/2009-09-05/10882.html

 

来源:http://blog.163.com/koumm@126/blog/static/95403837201052595441995/

1.1.1 MySQL安装
1. 先添加mysql组和mysql用户

# pw addgroup mysql
# pw adduser mysql
# cd /usr/ports/databases/mysql51-server
# ee Makefile

#有以下内容需要修改,数据库安装目录,字符集
--localstatedir=/var/db/mysql 改成
--localstatedir=/usr/local/db/mysql

#在CONFIGURE_ARGS=后面增加
--with-charset=gb2312 --with-xcharset=all

2. 编译/安装MySql
# make install clean

3. 初始化MySQL数据库(用户指定数据位置)
# mkdir -p /data/mysql/mysql3306
# chown -R mysql:mysql /data/mysql
# /usr/local/bin/mysql_install_db --user=mysql --datadir=/data/mysql/mysql3306
# mysql_install_db --user=mysql --datadir=/data/mysql/mysql3306

注:用户指定数据位置,不指定的话,就是采用在编译时的指定的目录中初始化。配置文件默认的位置与名称/etc/my.cnf
# cp /usr/local/share/mysql/my-large.cnf /etc/my.cnf

# /usr/local/bin/mysqladmin -u root password 'password'

先检查确定 /usr/local/etc/rc.d/文件夹中含有mysql-server启动服务文件
# ee /etc/rc.conf
增加mysql_enable="YES"
重启系统即可

1.1.2 Apache安装
1. 安装apache

# cd /usr/ports/www/apache22/
# make install clean
编译选项不需要很大改变,把有关IP6的选项去掉就行了

2.设置自启动服务
先检查确定 /usr/local/etc/rc.d/文件夹中含有apache22启动服务文件
# ee /etc/rc.conf
增加apache22_enable="YES"
重启系统即可

3.启动与错误分析
启动apache时显示的提示错误
# /usr/local/sbin/httpd -k start
[warn] (2)No such file or directory: Failed to enable the 'httpready' Accept Filter

错误一
解决apache Failed to enable the 'httpready' Accept Filter
Apache无法开启FreeBSD下accept filter 的机制。
FreeBSD 系统还提供了http filter,会自动过滤掉不完整的HTTP请求。
1. 解决方法:
# vi /boot/defaults/loader.conf
#打开,下次启动自动装载模块
accf_data_load="YES"
accf_http_load="YES"

2. 或在以下位置添加/boot/loader.conf /etc/loader.conf
accf_http_load="yes"

3. 然后reboot一下就可以解决了

错误二
# netstat -an |grep tcp4
发现80端口没有启动,查看apache错误日志内容

# cat /var/log/httpd-error.log
[Sun Jun 13 10:40:32 2010] [warn] Init: Session Cache is not configured [hint: SSLSessionCache]
[Sun Jun 13 10:40:32 2010] [alert] (EAI 8)hostname nor servname provided, or not known: mod_unique_id: unable to find IPv4 address of ""
Configuration Failed

# vi /usr/local/etc/apache22/httpd.conf
#注释掉以下内容
#LoadModule unique_id_module libexec/apache22/mod_unique_id.so

1.1.3 PHP安装
1. 安装PHP5

# cd /usr/ports/lang/php5
# make install clean

编译选项选择如下:
Options for php5 5.2.9
————————————————
[x] CLI Build CLI version
[x] CGI Build CGI version
[X] APACHE Build Apache module
[ ] DEBUG Enable debug
[ ] SUHOSIN Enable Suhosin protection system
[X] MULTIBYTE Enable zend multibyte support
[ ] IPV6 Enable ipv6 support
[ ] REDIRECT Enable force-cgi-redirect support (CGI only)
[ ] DISCARD Enable discard-path support (CGI only)
[ ] FASTCGI Enable fastcgi support (CGI only)
[ ] PATHINFO Enable path-info-check support (CGI only)
————————————————

2. 安装PHP扩展
# cd /usr/ports/lang/php5-extensions
# make install clean
需要配置 make config install clean
选择安装需要的扩展模块,如:

Options for php5-extensions 1.0
————————————————-
[X] DBASE dBase library support
[X] DOM DOM support
[X] FILEINFO fileinfo support
[X] FILEPRO filePro support
[X] FTP FTP support
[X] GD GD library support
[X] MBSTRING multibyte string support
[X] MYSQL MySQL database support
[X] OPENSSL OpenSSL support
[X] PDF PDFlib support (implies GD)
[X] PDO PHP Data Objects Interface (PDO)
[X] POSIX POSIX-like functions
[X] SESSION session support
[X] SIMPLEXML simplexml support
[X] SOAP SOAP support
[X] SOCKETS sockets support
[X] XML XML support
[X] XMLREADER XMLReader support
[X] XMLRPC XMLRPC-EPI support
[X] XMLWRITER XMLWriter support
[X] XSL XSL support (Implies DOM)
[X] ZIP ZIP support
[X] ZLIB ZLIB support

1.1.4 Apache-PHP配置
1. 配置/usr/local/etc/apache22/httpd.conf
# ee /usr/local/etc/apache22/httpd.conf
修改
DirectoryIndex index.html index.htm index index.php index.phps

2. 如果你需要修改网站根目录,就修改下面两个地方,下面仅仅是个例子,大家可根据需要自行修改,确保一致即可。
DocumentRoot  "/usr/local/www/web"

3. Options Indexes FollowSymLinks
去掉Indexes可以限制浏览你的主页目录

4. 加入
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

5. 配置/usr/local/etc/php.ini:
# cd /usr/local/etc/
# cp php.ini-recommended php.ini

1.1.5 PHP扩展配置
1. 安装 Zend Optimizer

# cd /usr/ports/devel/ZendOptimizer
# make install clean

编辑/usr/local/etc/php.ini 并加入下面内容:
[Zend]
zend_optimizer.optimization_level=15
zend_extension_manager.optimizer="/usr/local/lib/php/20060613/Optimizer"
zend_extension_manager.optimizer_ts="/usr/local/lib/php/20060613/Optimizer_TS"
zend_extension="/usr/local/lib/php/20060613/ZendExtensionManager.so"
zend_extension_ts="/usr/local/lib/php/20060613/ZendExtensionManager_TS.so"

2. 安装eaccelerator
# cd /usr/ports/www/eaccelerator
# make install clean

# mkdir /tmp/eaccelerator
# chown www /tmp/eaccelerator
# chmod 0700 /tmp/eaccelerator
# ee /usr/local/etc/php/extensions.ini
加入
extension=eaccelerator.so
重启Apache后访问网页,查看/tmp/eaccelerator文件夹内是否有内容,若有表明安装成功。
 
3. 安装memcache
# tar zxvf memcache-2.2.5.tgz
# cd memcache-2.2.5/
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config
# make
# make install
# 说明:memcache库的位置
Installing shared extensions:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
# cd ..

4.安装ImageMagick是Linux下非常强大的图象处理函数与GD类似.
# cd /usr/ports/graphics/ImageMagick
# make install clean

5.安装imagick(连接PHP和ImageMagick的通道)
# tar zxvf imagick-2.1.1.tgz
# cd imagick-2.1.1/
# /usr/local/php/bin/phpize
# ./configure --with-php-config=/usr/local/php/bin/php-config
# make
# make install
Installing shared extensions:
/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/
# cd ../

  评论这张
 
阅读(1113)| 评论(0)
推荐 转载

历史上的今天

在LOFTER的更多文章

评论

<#--最新日志,群博日志--> <#--推荐日志--> <#--引用记录--> <#--博主推荐--> <#--随机阅读--> <#--首页推荐--> <#--历史上的今天--> <#--被推荐日志--> <#--上一篇,下一篇--> <#-- 热度 --> <#-- 网易新闻广告 --> <#--右边模块结构--> <#--评论模块结构--> <#--引用模块结构--> <#--博主发起的投票-->
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2017