centos 5.4通常故障解決方法

 

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 restart
centos

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

相關文章
相關標籤/搜索