QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1880|回复: 3

[求助] Fedora4 中的 php5+mysql

[复制链接]
发表于 2005-7-21 09:14:30 | 显示全部楼层 |阅读模式
- 昨天在 hp 的服务器上安装了一份 Fedora4,用以作 www 服务器;

    以前跑的是 Redhat 8, 且有一些配置备份(比如 httpd.conf 是
apache 1.3 的),分区配置如下:

sda1             - /
sda2             - /swap
sda3             - /www             用以作为 DocumentRoot
sda4             - Ext
    sda5         - /log                 作为 log 系统


      但是配置的时候出现了两个问题:

1.  不能使用 apache 1.3 的 httpd.conf, 因为 apache2 的语法似乎与 1.3
的不兼容; 但是当把 DocumentRoot 修改为 /www/htmlroot 的时候,
也不行。或者说,问题是,apache 好像对其他分区的 DocumentRoot 指定
不认帐。即:

    DocumentRoot "/www/htmlroot"
-or
      DocumentRoot "/log/"

这样的指定,都无法启动 Apache; 但是对于 / 下的任意文件夹的指定,都能
启动 Apache2; 并且,即便 "mount /dev/sda3 /var/www/" 然后修改
Apache 的配置文件,也无法启动 apache. 郁闷。

2.  Fedora4 内置的 php5 使用 mysql 的 mysql.so,在什么地方下载?


请诸位大大,予以援手啊!   :D

---------------------
发表于 2005-7-21 09:30:43 | 显示全部楼层
如果错误提示ermission Denied,那么就事权限的问题
[code:1]
chmod 666 /www/htmlroot
[/code:1]

PHP5在configure的时候要告诉它MySQL的位置
[code:1]
--with-mysql=/usr/local/mysql
[/code:1]
回复

使用道具 举报

 楼主| 发表于 2005-7-21 13:21:13 | 显示全部楼层
估计和这个有关系:SELinux

Actually, I found two ways to do it

1) disable SELinux for apache
setsebool -P httpd_disable_trans=1

2) Change the policy to let SELinux have access to new DocumentRoot
chcon -R system_ubject_r:httpd_sys_content_t /my/new/docroot
回复

使用道具 举报

发表于 2005-7-23 00:38:49 | 显示全部楼层
yum install php-mysql
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-4-26 21:47 , Processed in 0.060911 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表