最近在hisi平台,做许多软件包的交叉编译和配置,遇到各种问题。httpd编译好后,放到开发板m.
运行# ./apachectl 时提示
AH00543: httpd: bad user name daemon
查阅了网上很多资料,通行的方法是执行
# useradd -g daemon daemon
或修改/etc/sysconfig/iptables 如果礼拜有daemon,取消里边对daemon的注释。
奇怪的是我的主机Ubuntu10.04和开发板都没有/etc/sysconfig/iptables这个文件。
我的开发板也没有useradd命令,只有adduser,我想作用是一样的。
执行
#adduser -g daemon daemon
然后再次执行# ./apachectl 提示
AH00557: httpd: apr_sockaddr_info_get() failed for (none)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName'' directive globally to suppress this message
告诉我们要设置ServerName,编辑httpd.conf文件,添加
ServerName localhost:80
然后再次执行# ./apachectl 没有任何提示,去主机浏览器输入172.16.1.119提示无法访问。
查看error_log,提示AH01177: Failed to lookup provider 'shm' for 'slotmem' : is mod_slotmem_shm loaded??
修改httpd.conf文件,
LoadModule slotmem_shm_module modules/mod_slotmem_shm.so
运行
#./apachectl start
在浏览器访问172.16.107.3 显示It works!