php-7.3.6 编译安装过程

时间:2021-05-26

1.、安装编译工具及库文件(使用yum命令安装)

yum install -y apr* autoconf automake bison bzip2 bzip2* cloog-ppl cpp curl curl-devel fontconfig fontconfig-devel freetype freetype* freetype-devel gcc gcc-c++ gtk+-devel gd gettext gettext-devel glibc kernel kernel-headers keyutils keyutils-libs-devel krb5-devel libcom_err-devel libpng libpng-devel libjpeg* libsepol-devel libselinux-devel libstdc++-devel libtool* libgomp libxml2 libxml2-devel libXpm* libxml* libXaw-devel libXmu-devel libtiff libtiff* make mpfr ncurses* ntp openssl openssl-devel patch pcre-devel perl php-common php-gd policycoreutils telnet t1lib t1lib* nasm nasm* wget zlib-devel

2.安装libzip 扩展

wget https://nih.at/libzip/libzip-1.2.0.tar.gztar -zxvf libzip-1.2.0.tar.gzcd libzip-1.2.0./configuremakemake installcp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h

3. 官网下载-下载3.6

wget http://cn2.php.net/distributions/php-7.3.3.tar.gz

编译安装 扩展

cd /usr/local/src/git clone https://github.com/websupport-sk/pecl-memcachecd pecl-memcache//usr/local/php7/bin/phpize./configure --with-php-config=/usr/local/php7/bin/php-configmake && make installyum install libmemcached libmemcached-devel -ycd /usr/local/src/wget https://pecl.php.net/get/memcached-3.1.3.tgztar -zxvf memcached-3.1.3.tgz cd memcached-3.1.3/usr/local/php7/bin/phpize ./configure --with-php-config=/usr/local/php7/bin/php-configmake && make installcd /usr/local/src/wget https://pecl.php.net/get/redis-4.3.0.tgztar -zxvf redis-4.3.0.tgzcd redis-4.3.0/usr/local/php7/bin/phpize ./configure --with-php-config=/usr/local/php7/bin/php-configmake && make install

安装 mcrypt扩展

yum install libmcrypt libmcrypt-devel mcrypt mhash -ycd /usr/local/src/wget http://pecl.php.net/get/mcrypt-1.0.1.tgztar xf mcrypt-1.0.1.tgzcd mcrypt-1.0.1/usr/local/php7/bin/phpize./configure --with-php-config=/usr/local/php7/bin/php-config && make && make install

在php.ini加上扩展即可

extension=memcache.soextension=memcached.soextension=redis.soextension=mcrypt.so

总结

以上所述是小编给大家介绍的php-7.3.6 编译安装过程,希望对大家有所帮助!

声明:本页内容来源网络,仅供用户参考;我单位不保证亦不表示资料全面及准确无误,也不保证亦不表示这些资料为最新信息,如因任何原因,本网内容或者用户因倚赖本网内容造成任何损失或损害,我单位将不会负任何法律责任。如涉及版权问题,请提交至online#300.cn邮箱联系删除。

相关文章