欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

CentOS怎么樣安裝PHP5和PHP7-創(chuàng)新互聯(lián)

這篇文章主要介紹CentOS怎么樣安裝PHP5和PHP7,文中介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們一定要看完!

成都創(chuàng)新互聯(lián)于2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目網(wǎng)站設(shè)計、做網(wǎng)站網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元月湖做網(wǎng)站,已為上家服務(wù),為月湖各地企業(yè)和個人服務(wù),聯(lián)系電話:18980820575

安裝PHP5

  • 下載解壓二進制包

[root@test-a src]# cd /usr/local/src/
[root@test-a src]# wget  /tupian/20230522/php-5.6.32.tar.bz2
[root@test-a src]# tar jxvf php-5.6.32.tar.bz2
  • 編譯安裝PHP

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc  --with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

#報錯:
...
configure: error: Cannot find OpenSSL's <evp.h>

# 安裝openssl
[root@test-a php-5.6.32]# yum install openssl-devel -y
...
Total size: 14 M
Total download size: 151 k
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
libselinux-utils-2.5-12.el7.x8 FAILED
http://mirrors.163.com/centos/7/os/x86_64/Packages/libselinux-utils-2.5-12.el7.x86_64.rpm: [Errno 14] HTTP Error 416 - Requested Range Not Satisfiable
Trying other mirror.

Error downloading packages:
  libselinux-utils-2.5-12.el7.x86_64: [Errno 256] No more mirrors to try.

# 安裝過程報錯,需要安裝deltarpm
[root@test-a php-5.6.32]# yum install deltarpm
...
Downloading packages:
No Presto metadata available for base
libselinux-utils-2.5-12.el7.x8 FAILED
http://mirrors.163.com/centos/7/os/x86_64/Packages/libselinux-utils-2.5-12.el7.x86_64.rpm: [Errno 14] HTTP Error 416 - Requested Range Not Satisfiable
Trying other mirror.


Error downloading packages:
  libselinux-utils-2.5-12.el7.x86_64: [Errno 256] No more mirrors to try.
# 還是報錯,由于之前用的Base源是163的,換回默認的Base源再試就OK了... :(
# 繼續(xù)初始化配置過程,報錯
...
checking for BZip2 support… yes checking for BZip2 in default path… not found configure: error: Please reinstall the BZip2 distribution 
[root@test-a php-5.6.32]# yum -y install bzip2-devel
# 繼續(xù)報錯
...
checking for stdarg.h... (cached) yes
checking for mcrypt support... yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
# 繼續(xù)報錯
[root@test-a php-5.6.32]# yum install -y libmcrypt-devel

#繼續(xù)報錯
...
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
configure: error: Cannot find libmysqlclient_r under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!
# PHP默認是去/usr/local/mysql/lib/mysql/搜索,沒有找到報錯,復(fù)制或者做個軟連接就行.
[root@test-a php-5.6.32]# cp /usr/local/mysql/lib/libmysqlclient.so /usr/local/mysql/lib/mysql/libmysqlclient_r.so

# 再次安裝,蒼了個天,看見Thank you...啦 成功!
...
Thank you for using PHP.

config.status: creating php5.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands


# 編譯
[root@test-a php-5.6.32]# make
...
Build complete.
Don't forget to run 'make test'.

# 安裝
[root@test-a php-5.6.32]# make install
  • 查看php的模塊(都是靜態(tài)的)

[root@test-a php-5.6.32]#  /usr/local/php/bin/php -m
[PHP Modules]
bz2
Core
ctype
date
dom
ereg
exif
fileinfo
filter
gd
hash
iconv
json
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
Phar
posix
Reflection
session
SimpleXML
soap
sockets
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlwriter
zlib

[Zend Modules]

# 拷貝配置文件
[root@test-a php-5.6.32]# cp php.ini-production /usr/local/php/etc/php.ini

# 查看php信息
[root@test-a php-5.6.32]#  /usr/local/php/bin/php -i

安裝PHP7

  • 下載安裝包解壓

[root@test-a src]# wget /tupian/20230522/php-7.1.6.tar.bz2
[root@test-a src]# tar jxvf php-7.1.6.tar.bz2
  • 配置初始化

[root@test-a src]# cd php-7.1.6/
[root@test-a php-7.1.6]#  ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc  --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
# 出錯
....
checking for mysql_set_server_option in -lmysqlclient_r... no
configure: error: wrong mysql library version or lib not found. Check config.log for more information.
# 由于php已經(jīng)帶了這個模塊,所以編譯時不指定mysqli的路徑,繼續(xù)
[root@test-a php-7.1.6]#  ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc  --with-pdo-mysql=/usr/local/mysql --with-mysqli --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

#出錯
...
checking for mysql_commit in -lmysqlclient_r... (cached) no
configure: error: PDO_MYSQL configure failed, MySQL 4.1 needed. Please check config.log for more information.

#編譯時不指定pdo的路徑,繼續(xù)
root@test-a php-7.1.6]#  ./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc  --with-pdo-mysql --with-mysqli --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

...
Thank you for using PHP.

config.status: creating php7.spec
config.status: creating main/build-defs.h
config.status: creating scripts/phpize
config.status: creating scripts/man1/phpize.1
config.status: creating scripts/php-config
config.status: creating scripts/man1/php-config.1
config.status: creating sapi/cli/php.1
config.status: creating sapi/cgi/php-cgi.1
config.status: creating ext/phar/phar.1
config.status: creating ext/phar/phar.phar.1
config.status: creating main/php_config.h
config.status: executing default commands
  • 編譯安裝

[root@test-a php-7.1.6]# make
[root@test-a php-7.1.6]# make install
[root@test-a php-7.1.6]# ls /usr/local/apache2.4/modules/libphp*
/usr/local/apache2.4/modules/libphp5.so  /usr/local/apache2.4/modules/libphp7.so

以上是“CentOS怎么樣安裝PHP5和PHP7”這篇文章的所有內(nèi)容,感謝各位的閱讀!希望分享的內(nèi)容對大家有幫助,更多相關(guān)知識,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道!

新聞標題:CentOS怎么樣安裝PHP5和PHP7-創(chuàng)新互聯(lián)
網(wǎng)站鏈接:http://www.aaarwkj.com/article24/hsdje.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計、電子商務(wù)、手機網(wǎng)站建設(shè)、做網(wǎng)站、網(wǎng)站制作微信小程序

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)
欧美日本一区二区四区| 手机在线观看av网站| av影片在线观看亚洲天堂| 国产自拍在线视频精品| 传媒视频免费在线观看| 日韩一级免费高清黄片| 午夜精品一区二区三区在线视频| 中文字幕人妻中文av不卡专区| 精品国产欧美成人一区| 中文字幕av不卡一区| 亚洲一区二区三区av蜜桃| 亚洲一区二区三区四区五区六| 欧美日韩69av网| 午夜激情视频免费国产| 狠狠综合久久av一区二区大宝| 精品视频偷拍一区二区三区 | 人妻日韩字幕一区二区| 校园春色亚洲一区二区| 国产一区二区三区在线看片| 国产一区精品在线免费看| 免费欧美一级黄片播放| 一区二区亚洲国产精品| 国产精品毛片一区内射| 片子免费毛片日韩不卡一区| 91人妻一区二区三区久久| 91麻豆精品国产久久久| 欧美日韩国产精品乱人伦| 日本a级免费大片网站| 蜜桃少妇人妻一区二区视频| 亚洲欧美另类国产一区| 日本高清免费黄色录像| 日本特黄高清免费大片| 中文字幕成人资源网站| 国语对白自拍视频在线播放| 国产熟女乱免费一区二区| 亚洲永久精品天码野外| 欧美成人夫妻性生活视频| 午夜91激情福利视频| 亚洲黄色片一区二区三区| 亚洲精品成人午夜久久| 亚洲欧美日韩综合一区|