centos 5.4通常故障解决方法php
1、关于yum的一些错误解决方法mysql
故障现象:linux
Another app is currently holding the yum lock; waiting for it to exit...
The other application is: yum-updatesd-he
Memory : 6.7 M RSS ( 57 MB VSZ)
Started: Wed Dec 15 08:06:15 2010 - 1:18:44 ago
State : Sleeping, pid: 3660
web
解决方法:sql
a、rm -rf /var/run/yum.pid
b、/sbin/service yum-updatesd restartcentos
2、关于Mysql的一些安装错误解决方法安全
一、服务器
a:若是编译时出现了如下错误:
checking for tgetent in -ltermcap… no
checking for termcap functions library… configure: error: No curses/termcap library found
app
这下可苦 了我了,继续查找下,socket
[root@myserver lamp]# yum -y install ncurses* #装这个就能够解决那个问题
如今就能够从新编译Mysql进行安装。
若是编译时出现了如下错误:
checking for tgetent in -ltermcap… no
checking for termcap functions library… configure: error: No curses/termcap library found
说明 curses/termcap 库没有安装
去下载一个ncurses-5.6.tar.gz,
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gz
tar zxvf ncurses-5.6.tar.gz
cd ncurses-5.6
./configure –prefix=/usr –with-shared –without-debug
make
make install clean
而后再从新编译Mysql进行安装。
今天在linux上安装出现了以下错误:
STOPPING server from pid file /var/run/mysqld/mysqld.pid
051111 10:35:27 mysqld ended
[1]+ Done bin/mysqld_safe --user=mysql
解决:
一、mkdir /var/run/mysqld
二、chown -R mysql /var/run/mysqld
三、chgrp -R mysql /var/run/mysqld
3、 安装php开启mysql出现相似Cannot find libmysqlclient_r under /usr/local/mysql错误
在编译PHP5.3.3以上版本,常常会看到以下错误,经常觉得是PHP的./configure后边什么参数没有写对,很让人费解
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 libmysqlclient_r under /usr/local/mysql. Note that the MySQL client library is not bundled anymore!其实这跟PHP没有系
那是由于我在编译APACHE的时候,使用--with-mpm模块,因此就必须在编译MYSQL的时候加上 --enable-thread-safe-client.
这是PHP5.2的一个改进,在PHP5.2.0以前的版本都不须要MYSQL启用安全线程。关于--enable-thread-safe-client项的官方介绍以下:如何生成线程式客户端库老是线程安全的。最大的问题在于从套接字读取的net.c中的子程序并非中断安全的。或许你可能但愿用本身的告警中断对服务器的长时间读取,以此来解决问题。若是为SIGPIPE中断安装了中断处理程序,套接字处理功能应是线程安全的。SupeSite/X-为了不链接中断时放弃程序,MySQL将在首次调用mysql_server_init()、mysql_init()或mysql_connect()时屏蔽SIGPIPE。若是你打算使用本身的SIGPIPE处理程序,首先应调用mysql_server_init(),而后安装你的处理程序.
还有第二种解决方法比较方便 :编译以前,先处理一下mysql的库,默认查找libmysqlclient_r.so,但是mysql默认为libmysqlclient.so,内容彻底同样,作个连接便可 # cd /usr/local/mysql/lib/mysql/ # ln -s libmysqlclient.so.15.0.0 libmysqlclient_r.so