您好,登錄后才能下訂單哦!
1.[root@yaho php-5.3.27]# useradd -s /sbin/nologin phpadmin
[root@yaho php-5.3.27]# yum install -y libtool-ltdl libtool-ltdl-devel #解決找不到lltdl文件問題
[root@yaho php-5.3.27]# rpm -ivh ftp://ftp.pbone.net/mirror/dl.iuscommunity.org/pub/ius/archive/Redhat/6/i386/epel-release-6-5.noarch.rpm #安裝第三方yum源
[root@yaho php-5.3.27]#
yum install -y libmcrypt-devel #解決 缺少mcrypt加密件的問題
[root@yaho php-5.3.27]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=phpadmin --with-fpm-group=phpadmin --with-mysql=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --enable-zend-multibyte --disable-ipv6 --with-pear --with-curl=/usr/bin/ --with-openssl ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql-dir=/usr/local/mysql --with-mysql-sock=/tmp/mysql.sock --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --enable-zend-multibyte --disable-ipv6 --with-pear --with-curl=/usr/bin/ --with-openssl
[root@yaho php-5.3.27]# make
[root@yaho php-5.3.27]# make install
[root@yaho php-5.3.27]# done
當編譯時提示mysql 配置錯誤信息,可嘗試將--with-mysql=/usr/local/mysql 修改為:--with-mysql-dir=/usr/local/mysql。藍色必加項
2.提示錯誤:
cannot run apxs. ***
Sorry, I cannot run apxs. Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)
因為yum了perl,perl-devel后還提示同樣錯誤,apxs文件也的確存在,想不出答案就百度了一下,原來是由于 PHP 的configure文件沒有指定perl程序的路徑導致代碼不能被編譯。
[root@php]#vi configure
把里面的第一句替換成:#!/usr/bin/perl -w 然后保存。再./configure 就正常了。
3.報錯:configure: error: mysql configure failed. Please check config.log for more information.
為php增加mysql模塊時報錯
configure: error: mysql configure failed. Please check config.log for more information.
解決方法:
[root@localhost mysql]$ ./configure --with-php-config=/usr/local/bin/php-config --with-mysql-dir=/usr --with-zlib-dir
而非
[root@localhost mysql]$ ./configure --with-php-config=/usr/local/bin/php-config --with-mysql=/usr --with-zlib-dir
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。