redhat9.0 安装mysql+apache+php出错??

redhat9.0 安装mysql+apache+php出错??

一、安装mysql时找不到mysql.sock文件,安装在/usr/local/mysql下。出现下面错误
./scripts/mysql_install_db
mkdir: cannot create directory `/www/servers/mysql4/var': No such file or directory
chmod: cannot access `/www/servers/mysql4/var': No such file or directory
mkdir: cannot create directory `/www/servers/mysql4/var/mysql': No such file or directory
chmod: cannot access `/www/servers/mysql4/var/mysql': No such file or directory
mkdir: cannot create directory `/www/servers/mysql4/var/test': No such file or directory
chmod: cannot access `/www/servers/mysql4/var/test': No such file or directory
Preparing db table
Preparing host table
Preparing user table
Preparing func table
Preparing tables_priv table
Preparing columns_priv table
Installing all prepared tables
./bin/mysqld: Can't change dir to '/www/servers/mysql4/var/' (Errcode: 2)
070619 8:38:36 Aborting
二、安装apache时,安装在/usr/local/apache2下。在启动时出现下面错误
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
(9Address already in use: make_sock: could not bind to address [::]:80
(9Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

那位大哥遇到过此类问题,请给小弟解答一下。
1.
mkdir -p /www/servers/mysql4/var
chown -R mysql /www/servers/mysql4/var
chgrp -R mysql /www/servers/mysql4/var
2.
a. 已经有系统自带的httpd或者其他的使用80端口
b. httpd.conf:ServerName 127.0.0.1
不可能吧,怎么会呢?我删完了的.我安装的是/usr/local/apache目录,怎么会跑到/www/servers下的目录去呢?哦.我安装了proxy,用的是80端口.不会跟它有关系吧.问题是,在安装mysql时,找不到mysql.sock.最终无法启动mysql.


QUOTE:
原帖由 ylcqen 于 2007-6-21 16:33 发表
一、安装mysql时找不到mysql.sock文件,安装在/usr/local/mysql下。出现下面错误
./scripts/mysql_install_db
mkdir: cannot create directory `/www/servers/mysql4/var': No such file or directory
chmod ...

上述第一个问题中,可能是由于你的系统已经存在有MYSQL的相关软件包,可以使用RPM命令查找一下并将其卸载(干净),再重新安装MYSQL即可。

第二个问题是由于你的系统已经启动了一个httpd进程,所以APACHE无法绑定80端口,自然也就无法启动了。

建议多去看看相关的原理部分……
问题以解决.不是牛哥说的那样,RPM安装的文件我清完了的.哈哈.还是要感谢大家一起来谈论.

遇到这种问题一般怎样解决阿?
我也遇到了!!

[Copy to clipboard] [ - ]
CODE:
abc@abc:/etc/apache2$ sudo apache2 -k restart
httpd not running, trying to start
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs