ServerName :80改成http服务器的IP或者域名:80.
LAMP安装时出现的一些错误及解决
原创
©著作权归作者所有:来自51CTO博客作者kyvicp的原创作品,请联系作者获取转载授权,否则将追究法律责任
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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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-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/.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/.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/ into server: /usr/local/apache2/modules/: cannot restore segment prot after reloc: Permission denied
解决:#chcon -t texrel_shlib_t /usr/local/apache2/modules/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~`
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 :80改成http服务器的IP或者域名:80.
ServerName :80改成http服务器的IP或者域名:80.
改成下面这一行:
ServerName 192.168.0.10:80
上一篇:LAMP环境搭建
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
使用Qt Creator 出现的一些错误
学了C++一段时间后,感觉控制台程序看起来和用起来都不是太好。于是看了一下可以做图形界面的工具,最后选
Qt5安装 文件路径 百度 文件名 -
关于PHP一些编译安装出现的错误总结
一点经验总结,批评指正
PHP 职场 编译 休闲
















