php的安装错误
……..
checking for mSQL support... no
checking for MSSQL support via FreeTDS... no
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... no
configure: error: Cannot find MySQL header files under /usr/local/myaql/.
Note that the MySQL client library is not bundled anymore!
原因:找不到header file文件在哪?
解决:指定mysql的安装位置 --with-mysql=/usr/local/mysql
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

 

Configuring extensions
checking size of long... (cached) 4
checking size of int... (cached) 4
checking for int32_t... yes
checking for uint32_t... yes
checking for sys/types.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for string.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for strtoll... yes
checking for atoll... yes
checking for strftime... (cached) yes
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.
原因:缺少libxml2-devel这个包
[root@rhel5 Server]# rpm -qa |grep libxml
libxml2-python-<?xml:namespace prefix = st1 ns = "urn:schemas-microsoft-com:office:smarttags" />2.6.26-2.1.2
libxml2-2.6.26-2.1.2    
//原因是没有安装libxml2-devel这个包,

 

解决:
[root@rhel5 Server]# rpm -ivh /mnt/Server/libxml2-devel-2.6.26-2.1.2.i386.rpm
warning: /mnt/Server/libxml2-devel-2.6.26-2.1.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
        zlib-devel is needed by libxml2-devel-2.6.26-2.1.2.i386
[root@rhel5 Server]# rpm -ivh /mnt/Server/zlib-devel-1.2.3-3.i386.rpm        
warning: /mnt/Server/zlib-devel-1.2.3-3.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:zlib-devel             ########################################### [100%]
[root@rhel5 Server]# rpm -ivh /mnt/Server/libxml2-devel-2.6.26-2.1.2.i386.rpm
warning: /mnt/Server/libxml2-devel-2.6.26-2.1.2.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libxml2-devel          ########################################### [100%]

 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

[activating module `php5' in /usr/local/apache2/conf/httpd.conf]
Installing PHP CLI binary:        /usr/local/php/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/php/lib/php/build/
Installing header files:          /usr/local/php/include/php/
Installing helper programs:       /usr/local/php/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/php/lib/php/
/root/php-5.2.10/sapi/cli/php: error while loading shared libraries: /usr/local/mysql//lib/libmysqlclient.so.15: cannot restore segment prot after reloc: Permission denied
make[1]: *** [install-pear-installer] Error 127
make: *** [install-pear] Error 2
解决:禁用SELINUX:
       vi /etc/selinux/config    //SELINUX=enforcing改成 SELINUX=disabled
       vi /etc/sysconfig/selinux   //SELINUX=enforcing改成 SELINUX=disabled
使用chcon
#chcon -t texrel_shlib_t  /usr/local/mysql/lib/libmysqlclient.so.15
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

 

[root@rhel5 php-5.2.10]# /usr/local/apache2/bin/apachectl restart

httpd: Syntax error on line 53 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied

 

解决: # chcon -t texrel_shlib_t  /usr/local/apache2/modules/libphp5.so

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`

 

 

mysql 错误

[root@rhel5 mysql]# /usr/local/mysql/bin/mysqld_safe --user=mysql &

[1] 22926

[root@rhel5 mysql]# Starting mysqld daemon with databases from /usr/local/mysql/data

STOPPING server from pid file /usr/local/mysql/data/rhel5.pid

090909 12:52:47  mysqld ended

 

 

[1]+  Done                    /usr/local/mysql/bin/mysqld_safe --user=mysql

原因是 /usr/local/mysql 目录的宿主及属组的问题

解决: chown –R mysql:mysql /usr/local/mysql

 

 

 

apache 的安装错误:

[root@rhel php-5.2.10]# /usr/local/apache2/bin/apachectl restart
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
修改 http 的配置文件 . 找到 ServerName 这一行 ,
ServerName www.host.name:80
改成 http 服务器的 IP 或者域名 :80.

改成下面这一行:

ServerName 192.168.0.10:80