日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > php >内容正文

php

php的mcypt,php 7.3 在Centos6.x下的安装过程

發布時間:2023/12/10 php 37 豆豆
生活随笔 收集整理的這篇文章主要介紹了 php的mcypt,php 7.3 在Centos6.x下的安装过程 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

提示unrecognized options: –with-mcrypt, –enable-gd-native-ttf

表示php7.3不支持這兩個選項,

編譯準備工作:

yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel libzip

yum -y install gcc automake autoconf libtool make

yum -y install gcc gcc-c++ glibc

yum?-y?install?pcre-devel

updatedb

yum install -y cmake

yum install -y cmake3

yum install zlib-devel

正式編譯:

./configure --prefix=/opt/php73/ --with-config-file-path=/etc/php73/ --with-libdir=lib64 --with-gd --with-iconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-curl --with-openssl --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pdo-sqlite=shared --enable-xml --enable-pcntl --enable-mbregex --enable-mbstring --enable-bcmath --enable-inline-optimization --enable-zip --enable-ftp --enable-sockets --enable-shmop --enable-sysvsem --enable-sysvmsg --enable-sysvshm --disable-rpath --disable-debug --without-gdbm --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-maintainer-zts --enable-soap

make && make install

cp php.ini-production /opt/php73/etc/php.ini

cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

cp /opt/php73/etc/php-fpm.d/www.conf.default /opt/php73/etc/php-fpm.d/www.conf

chmod 755 /etc/init.d/php-fpm

service php-fpm restart

相關資料:

編譯PHP7.3

錯誤:

Starting php-fpm /opt/php73/sbin/php-fpm: error while loading shared libraries: libzip.so.5: cannot open shared object file: No such file or directory

failed

#checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11

方法1:

檢測到沒有安裝libzip5,?請先安裝?libzip5,

1.?下載安裝方法:?wget?http://rpmfind.net/linux/remi/enterprise/6/remi/x86_64/libzip5-1.5.1-1.el6.remi.x86_64.rpm

2.?rpm安裝:?rpm?-ivh?libzip5-1.5.1-1.el6.remi.x86_64.rpm

方法2:

#下載編譯安裝

wget?https://libzip.org/download/libzip-1.3.0.tar.gz

tar?-zxvf?libzip-1.3.0.tar.gz

cd?libzip-1.3.0

./configure

make?&&?make?install

cp?/usr/local/lib/libzip/include/zipconf.h?/usr/local/include/zipconf.h

報錯configure:?error:?off_t?undefined;?check?your?library?configuration

解決方案:

or

Starting?php-fpm?/opt/php73/sbin/php-fpm:?error?while?loading?shared?libraries:?libzip.so.5:?cannot?open?shared?object?file:?No?such?file?or?directory

failed

#?添加搜索路徑到配置文件

echo?'/usr/local/lib64

/usr/local/lib

/usr/lib

/usr/lib64'>>/etc/ld.so.conf

#?更新配置

ldconfig?-v

報錯configure:?error:?Please?reinstall?the?libzip?distributio?或??configure:?error:?system?libzip?must?be?upgraded?to?version?>=?0.11。

解決方案:

yum?remove?libzip?-y

wget?https://nih.at/libzip/libzip-1.2.0.tar.gz

tar?-zxvf?libzip-1.2.0.tar.gz

cd?libzip-1.2.0

./configure

make?&&?make?install

#?cmake?和?cmake3都要安裝

yum?install?-y?cmake

yum?install?-y?cmake3

wget?https://libzip.org/download/libzip-1.5.0.tar.gz

tar?-zxvf?libzip-1.5*

cd?libzip-1.5*

mkdir?build?&&?cd?build?&&?cmake3?..?&&?make?&&?make?install

報錯/usr/local/include/zip.h:59:21:?fatal?error:?zipconf.h:?No?such?file?or?directory

解決方案:

cp?/usr/local/lib/libzip/include/zipconf.h?/usr/local/include/zipconf.h

報錯/package/php-7.3.7/ext/zip/php_zip.c:3318:48:?error:?‘LIBZIP_VERSION’?undeclared?(first?use?in?this?function)

解決方案:

重新正確安裝?libzip

[root@BobServerStation?twemproxy]#?autoconf

configure.ac:8:?error:?Autoconf?version?2.64?or?higher?is?required

configure.ac:8:?the?top?level

autom4te:?/usr/bin/m4?failed?with?exit?status:?63

Redis?擴展安裝:

git?clone?https://github.com/igbinary/igbinary.git

whereis?php

phpize?&&?./configure?CFLAGS="-O2?-g"?--enable-igbinary?--with-php-config=/opt/php73/bin/php-config

make?-j4?&&?make?install

git?clone?https://github.com/nicolasff/phpredis.git

cd?phpredis/

phpize?&&?./configure?CFLAGS="-O2?-g"?--enable-redis-igbinary?--with-php-config=/opt/php73/bin/php-config?&&?make?-j4?&&?sudo?make?install

php-config

php?--ini

vim?/usr/local/php/etc/php.ini

ls?/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/

ll

yum?install?libtool

查詢當前版本

rpm?-qf?/usr/bin/autoconf

autoconf-2.63-5.1.el6.noarch

卸載當前版本

rpm?-e?--nodeps?autoconf-2.63

安裝最新版本

wget?ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz

tar?zxvf?autoconf-2.68.tar.gz

cd?autoconf-2.68

./configure?--prefix=/usr/

make?&&?make?install

查看當前版本

/usr/bin/autoconf?-V

autoconf?(GNU?Autoconf)?2.68

Copyright?(C)?2010?Free?Software?Foundation,?Inc.

License?GPLv3+/Autoconf:?GNU?GPL?version?3?or?later

,?

This?is?free?software:?you?are?free?to?change?and?redistribute?it.

There?is?NO?WARRANTY,?to?the?extent?permitted?by?law.

至此,autoconf已升級到2.68。

安裝memcahce?擴展:

然后就去翻查了一下資料,pecl好像不支持安裝memcache擴展。這樣只能找其他辦法解決了,在期間也踩了很多坑,后來找到了一個github上的可支持php7的memcache擴展

接下來就是安裝步驟了:

拉去memcache擴展

cd?/usr/local/src/

git?clone?https://github.com/websupport-sk/pecl-memcache

編譯安裝memcache擴展

cd?pecl-memcache/

/usr/local/php/bin/phpize

./configure?--with-php-config=/usr/local/php/bin/php-config

make?&&?make?install

Installing?shared?extensions:????/usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/

上面已經安裝完成memcache擴展,接下來把它加入php.ini中

vim??/etc/php.ini

extension_dir?=?"/usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/"

extension?=?"memcache.so"

重啟php-fpm使配置生效

/etc/init.d/php-fpm?reload

mcrypt 在 php7.1 就廢棄了.

@since4.0.2@since5.0@deprecated7.1

wget https://pecl.php.net/get/mcrypt-1.0.3.tgz

tar -xvf mcrypt-1.0.3.tgz

cd ?mcrypt-1.0.3

/opt/php73/bin/phpize

./configure --with-php-config=/opt/php73/bin/php-config

make && make install

總結

以上是生活随笔為你收集整理的php的mcypt,php 7.3 在Centos6.x下的安装过程的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。