自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

LAMP下的更新問題

運(yùn)維 系統(tǒng)運(yùn)維
LAMP下的更新:在安裝php、mysql、apache后,需要安裝新的版本進(jìn)行更新時(shí),會遇到好多麻煩。本文對應(yīng)遇到的幾個(gè)問題提出了相應(yīng)的LAMP安裝過程中的解決方案。LAMP下的更新

  LAMP下的更新問題:系統(tǒng)是redhat9,自定義安裝了php,mysql,apache。所以在安裝***的php,mysql,apache版本時(shí)候,本人對相關(guān)的rpm進(jìn)行了卸載,忽略依賴關(guān)系強(qiáng)制卸載apache;由于php,mysql與perl的bt依賴關(guān)系,

  LAMP下的更新中的問題

  1.當(dāng)你看到mysql有很多版本,如:

  mysql-max-5.0.21-linux-i686-glibc23.tar.gz和

  mysql-max-5.0.21-linux-i686.tar.gz

  這倆個(gè)到底選哪個(gè)呢,請你使用如下命令來決定

  1.   # rpm -qa | grep glibc  
  2.  
  3.   glibc-kernheaders-2.4-8.10  
  4.  
  5.   glibc-common-2.3.2-11.9  
  6.  
  7.   glibc-2.3.2-11.9  
  8.  
  9.   glibc-devel-2.3.2-11.9  
  10.  

  如果出現(xiàn)以上信息,請選擇mysql-max-5.0.21-linux-i686-glibc23.tar.gz版本

  2:編譯php時(shí)出現(xiàn)

  1.   ./configure: /usr/local/apache2/bin/apxs: /replace/with/path/to/perl/interpreter:  
  2.  
  3.   bad interpreter: No such file or directory  
  4.  

  這是找不到perl解釋器的緣故。

  修改/usr/local/apache2/bin/apxs文件中:

  /replace/with/path/to/perl/interpreter

  把他替換成perl所在的路徑如/opt/ActivePerl-5.8/bin/perl,

  (如果你下載的是active perl5.8的rpm,他默認(rèn)安裝路徑是/opt/ActivePerl-5.8/bin/perl)

  3.安裝了perl后,發(fā)現(xiàn)所有的文本編輯器都不能用了。

  運(yùn)行vi或者gedit時(shí)候,提示找不到libperl.so

  到perl的安裝目錄下找一個(gè)libperl.so放到/usr/lib目錄下就解決問題了

  我的libperl.so在/opt/ActivePerl-5.8/lib/5.8.8/i686-linux-thread-multi-CORE/目錄下。

  如果不知道libperl.so在什么地方,可以用

  1.   # locate libperl.so  
  2.  

  查找,或者用find命令

  4.當(dāng)我使用mysql-standard-5.0.20,編譯php時(shí)出現(xiàn)mysql錯(cuò)誤:

  1.   checking for mSQL support... no  
  2.  
  3.   checking for MSSQL support via FreeTDS... no  
  4.  
  5.   checking for MySQL support... yes  
  6.  
  7.   checking for specified location of the MySQL UNIX socket... no  
  8.  
  9.   checking for MySQL UNIX socket location... /tmp/mysql.sock  
  10.  
  11.   checking for mysql_close in -lmysqlclient... no  
  12.  
  13.   checking for mysql_error in -lmysqlclient... no  
  14.  
  15.   configure: error: mysql configure failed. Please check config.log for more information  

.

  LAMP下的更新中的問題,安裝PHP的時(shí)候沒有指定一下mysql的安裝目錄。但是我已經(jīng)指定了,所以這個(gè)說法是錯(cuò)誤的,其實(shí)主要原因是 mysql-level沒有裝,也就是mysql的版本不對,應(yīng)該換

  mysql-max-5.0.21版本(包含所有mysql相關(guān)內(nèi)容的軟件包)

  5.編譯php時(shí)出現(xiàn)

  configure: error: freetype2 not found!

  沒有安裝freetype-level

  configure: error: libpng.(a|so) not found.

  沒有安裝libpng-devel

  6忘了mysql的root口令怎么辦

  1.   # /usr/local/mysql/support-files/mysql.server stop  
  2.  
  3.   # cd /usr/local/mysql/bin/  
  4.  
  5.   # mysqld_safe --skip-grant-tables &  
  6.  
  7.   # mysqladmin -u user password 'newpassword'  
  8.  
  9.   # mysqladmin flush-privileges  
  10.  

  增加pdo_mysql單獨(dú)安裝

  原來編譯php的時(shí)候,沒有把dpo_mysql相關(guān)的參數(shù)帶上,安裝 完后才發(fā)現(xiàn)。再重新編譯有點(diǎn)費(fèi)時(shí)間,所以決定單獨(dú)來安裝。

  先找需要的版本,我用的是穩(wěn)定的版本。要先看看說明,特別是要注意mysql的php的版本。

  1.   wget  
  2.  
  3.   tar xzvf PDO_MYSQL-1.0.2.tgz  
  4.  
  5.   cd PDO_MYSQL-1.0.2  
  6.  
  7.   /usr/local/php/bin/phpize  
  8.  
  9.   Configuring for:  
  10.  
  11.   PHP Api Version: 20041225  
  12.  
  13.   Zend Module Api No: 20060613  
  14.  
  15.   Zend Extension Api No: 220060519  
  16.  
  17.   ./configure  
  18.  

  執(zhí)行完以后,報(bào)了個(gè)錯(cuò)誤:

  1.   checking for mysql_config... not found  
  2.  
  3.   configure: error: Cannot find MySQL header files under  
  4.  

  這個(gè)錯(cuò)誤表明系統(tǒng)缺省沒有找到你的mysql安裝目錄,因此可以使用這個(gè)命令解決:

  ln -s /usr/local/mysql/bin/mysql_config /usr/bin/mysql_config

  這樣建立了你的實(shí)際msyql安裝目錄和mysql_config命令的管理

  經(jīng)過configure就可以make了

  在執(zhí)行:./configure 時(shí),又出現(xiàn)了一個(gè)問題:

  1.   checking for PDO includes... checking for PDO includes...  
  2.  
  3.   configure: error: Cannot find php_pdo_driver.h.  
  4.  

  檢查的時(shí)候,不能找到php_pdo_driver.h,經(jīng)過檢查,發(fā)現(xiàn)在讀php-config的時(shí)候,在讀以前的配置。

  解決方法:./configure –with-php-config=/usr/local/php/bin/php-config(根據(jù)實(shí)際的路徑的來指定)

  在執(zhí)行./configure --with-php-config=/usr/local/php/bin/php-config,又出現(xiàn)了一個(gè)問題:

  error: mysql_query missing!?

  解決方法:./configure --with-php-config=/opt/php5/bin/php-config --with-pdo-mysql=/opt/mysql5

  (根據(jù)自己的實(shí)際路徑,設(shè)定編譯安裝mysql的位置).

  1.   make  
  2.  
  3.   make install  
  4.  

  注意pdo_mysql的全路徑,我的是:

  /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so

  然后在/usr/local/lib/php.ini

  加上一句:

  1.   extension=/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so  
  2.  

  重新啟動apache即可看到已經(jīng)加載pdo_mysql成功。

       LAMP下的更新中的問題有好多,這只是其中的一部分,如果大家還有什么類似的問題的話,可以貼出來,一起解決一下。

【編輯推薦】

  1. Linux下安裝LAMP的步驟
  2. LAMP簡介
  3. Linux上安裝LAMP
責(zé)任編輯:zhaolei 來源: javaeye
相關(guān)推薦

2015-09-29 16:43:50

UAC更新Windows 10

2025-02-08 14:05:00

2011-03-09 15:44:14

UbuntuLAMP

2011-03-14 11:29:43

2011-03-09 10:52:04

ContOSLAMP安裝

2011-03-09 13:46:47

SUSElamp安裝

2011-03-09 15:13:00

UbuntuLAMP配置

2011-03-10 10:09:09

UbuntuLAMP搭建

2011-03-11 10:27:45

UbuntuLAMP配置

2011-03-10 15:44:18

CentOSLAMP安裝

2011-03-09 16:16:54

CentOSLAMP

2011-03-10 15:44:18

CentOSLAMP安裝

2018-08-31 09:32:46

Windows 10Windows安裝更新

2010-05-12 15:29:17

WSUS服務(wù)器更新

2011-03-09 13:02:15

LinuxLAMP安裝

2011-03-14 13:38:40

LAMPApache調(diào)優(yōu)

2011-03-09 10:25:25

Linux安裝LAMP

2011-03-14 13:07:22

LAMPApache調(diào)優(yōu)

2011-03-09 09:25:53

RedHatLinuxLAMP

2011-03-11 09:54:48

CentOSLAMP安裝
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號