免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3270 | 回复: 2
打印 上一主题 下一主题

[安装]Cannot load /usr/local/apache/modules/libphp4.so [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-06-22 11:34 |只看该作者 |倒序浏览
安装php4.4.1+apache2.0.55+5.0.15具体编译如下:
1.安装 mysql 5.0.15

# tar zxvf mysql-5.0.15.tar.gz
# cd cd mysql-5.0.15
# groupadd mysql
# useradd -g mysql mysql
# CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" \
./configure --prefix=/usr/local/mysql \
--enable-assembler --with-mysqld-ldflags=-all-static --with-charset=gbk
# make
# make install
# cp support-files/my-medium.cnf /etc/my.cnf

# cp support-files/mysql.server /etc/rc.d/init.d/mysqld
# chmod 755 /etc/rc.d/init.d/mysqld
# chkconfig --add mysqld

# cd /usr/local/mysql
# /usr/local/mysql/bin/mysql_install_db --user=mysql
# chown -R root .
# chown -R mysql var
# chgrp -R mysql .

2.安装 apache 2.0.55

# tar jxvf httpd-2.0.55.tar.bz2
# cd httpd-2.0.55
# ./configure --prefix=/usr/local/apache
# make
# make install

设置自启动
# cp support/apachectl /etc/init.d/httpd

修改/etc/init.d/httpd
# vi /etc/init.d/httpd(前面几行改成如下样子)
#!/bin/sh
#
# Startup script for the Apache Web Server
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. It is used to serve \
# HTML files and CGI.
# processname: httpd
# pidfile: /usr/local/apache/log/httpd.pid
# config: /usr/local/apache/conf/httpd.conf

# chkconfig --add httpd
# chmod 755 /etc/init.d/httpd
# chkconfig httpd on

创建网页根目录
# mkdir /var/www

修改apache配置文件
# vi /usr/local/apache/conf/httpd.conf
//存放网页的目录,原来为DocumentRoot "",改成:
DocumentRoot "/var/www"
//这句应该和DocumentRoot 的目录保持一致,原来为<Directory "">,改成:
<Directory "/var/www">

3.安装php 4.4.1

# tar jxvf php-4.4.1.tar.bz2
# cd php-4.4.1
# ./configure \
--prefix=/usr/local/php \
--with-mysql=/usr/local/mysql \
--with-apxs2=/usr/local/apache/bin/apxs
# make
# make install
# cp php.ini-dist /usr/local/php/lib/php.ini

# vi /usr/local/php/lib/php.ini
;default_charset = "iso-8859-1"
在这行下面加一行
default_charset = "gbk"

# vi /usr/local/apache/conf/httpd.conf
找到#AddType application/x-tar .tgz 这行,在下面加两行
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
找到下面一行在后面加上index.php,这表示网站的默认页也能够为index.php
DirectoryIndex index.html index.html.var index.php


然后启动httpd
报错:
[root@localhost modules]# service httpd start
Syntax error on line 233 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/libphp4.so into server: /usr/local/apache/modules/libphp4.so: cannot restore segment prot after reloc: Permission denied

请问怎么解决?

[ 本帖最后由 HonestQiao 于 2006-6-22 13:46 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2006-06-22 11:51 |只看该作者
我是想搭建一个POSTFIX平台,其中有用到PHP,APACHE这块,不太熟悉,请各位指导一下。

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
3 [报告]
发表于 2006-06-22 13:47 |只看该作者
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP