系统版本:
HP-UX zhwa B.11.23 U ia64 2667688584 unlimited-user license
apache软件:
下载地址:http://hpux.connect.org.uk/hppd/hpux/Networking/WWW/apache-2.4.16/
使用depot安装apache2.4.16和相关依赖包后
zhwg:/usr/local/apache2/adm # cat error_log
/usr/lib/hpux32/dld.so: Unsatisfied code symbol 'strerror_r' in load module '/usr/local/apr/lib/libapr-1.so'.
zhwa:/usr/local/apache2/bin # ./apachectl -k start 启动不起来,也报如上错误。
zhwa:/usr/local/apache2/bin # ./apachectl -V 可以查出版本和APR、APR-UTIL信息.
机器A将apr卸载 swremove -p apr --预览卸载
swremove apr --卸载apr
然后选择源文件安装apr
tar -zxf apr-1.5.2-src-11.31.tar.gz
cd apr-1.5.2
./configure --prefix=/usr/local/apr
make
make install
这样安装上了,检查apache应用:
zhwa:/usr/local/apache2/bin # ./apachectl -k start
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 134.43.1.33. Set the 'ServerName' directive globally to suppress this message
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 134.43.1.33. Set the 'ServerName' directive globally to suppress this message
这个信息提示域名没有加上,无关紧要,继续检查。
ps -ef |grep apache
daemon 13517 13516 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
root 10958 12686 0 11:21:35 pts/tk 0:00 grep apache
daemon 13519 13516 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 13518 13516 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
root 13516 1 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 13782 13516 0 10:12:24 ? 0:00 /usr/local/apache2/bin/httpd -k start
root 10958 12686 0 11:21:35 pts/tk 0:00 grep apache
daemon 13519 13516 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 13518 13516 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
root 13516 1 0 10:11:45 ? 0:00 /usr/local/apache2/bin/httpd -k start
daemon 13782 13516 0 10:12:24 ? 0:00 /usr/local/apache2/bin/httpd -k start
可以看到服务已经起来了,机器A已经ok,只需配置了.
对于机器B,系统软件版本和机器A一样。将apr卸载后改为安装源文件,报出缺少sed,automake,及autoconf,gawk等组件错误,由于状况和机器A类似这些组件也没有安装,只是sed原来就有将其连接到报错找不到的目录 ln -s dira/sed dirb/sed,继续安装apr报出一堆igore的和unsupport的cc编译选项。没有错误,尝试运行:
zhwb:/usr/local/apache2/bin # ./apachectl -k start
zhwb:/usr/local/apache2/bin # ./apachectl -v
/usr/lib/hpux32/dld.so: '/usr/local/apr/lib/libapr-1.so' is not a valid load module: Bad object file type
./apachectl[101]: 6237 Killed
/usr/lib/hpux32/dld.so: '/usr/local/apr/lib/libapr-1.so' is not a valid load module: Bad object file type
./apachectl[101]: 6237 Killed
报错可不同了,看到是libapr-1.so这个模块编译的不符号机器要求,感觉再编译也无济于事,一堆依赖包环环相扣,而机器A是编译成功,正常运行的,于是将其拷贝过来赋予读写权限,chmod 555 libapr-1.so,然后再启动
zhwb:/usr/local/apache2/bin # ./apachectl -k start,这次终于启动成功了。整个安装过程一说都是泪啊,耍了点小聪明应了急,可更深层次的原因需要细细研究,期待哪个高人可以做个终极solution。