configure: error: xml2-config not found. Please check your libxml2 installation.
解決辦法:
yum install -y libxml2-devel
錯誤2:
configure: error: Cannot find OpenSSL\\\’s
解決辦法:
yum install -y openssl openssl-devel
錯誤3:
configure: error: Please reinstall the BZip2 distribution
解決辦法:
yum install -y bzip2 bzip2-devel
錯誤4:
configure: error: jpeglib.h not found.
解決辦法:
yum install -y libjpeg libjpeg-devel
錯誤5:
configure: error: freetype-config not found.
解決辦法:
yum install -y freetype freetype-devel
錯誤6:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解決辦法:
yum install -y libmcrypt-devel

其中錯誤6,需要安裝epel擴展yum源,安裝方法如下:

rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm

6.上面的錯誤都解決后就可以編譯和安裝了

make

make install

7.最后復制文件

cp php.ini-production /usr/local/php/etc/php.ini

8.測試是否正確解析php

vi /usr/local/apache2.4/htdocs/mytest.php //寫入如下內容

<?php

    echo php測試正常

?>

9.保存腳本后繼續測試,如下:

[root@aws srclib]# curl localhost/mytest.php

php測試正常

10.查看PHP配置文件所在位置

[root@aws srclib]# /usr/local/php/bin/php -i |grep -i loaded configuration file

PHP Warning: Unknown: It is not safe to rely on the system\\\’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone \\\’UTC

歡迎訪問我的另一篇文章,RedHat 7 安裝httpd

http://blog.itpub.net/20893244/viewspace-2151184/

更多關于云服務器,域名注冊,虛擬主機的問題,請訪問三五互聯官網:m.shinetop.cn

贊(0)
聲明:本網站發布的內容(圖片、視頻和文字)以原創、轉載和分享網絡內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。郵箱:3140448839@qq.com。本站原創內容未經允許不得轉載,或轉載時需注明出處:三五互聯知識庫 » RedHat 7 安裝PHP

登錄

找回密碼

注冊