php-7.3.6 编译安装过程

编程学习 2021-07-04 23:05www.dzhlxh.cn编程入门
这篇文章主要介绍了php-7.3.6 编译安装过程,本文通过实例文字相结合给大家介绍的非常详细,具有一定的参考借鉴价值,需要的朋友可以参考下

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.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make
make install
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h

3. 官网下载-下载3.6

wget

编译安装 扩展

cd /usr/local/src/
git clone https://github.com/websupport-sk/pecl-memcache
cd pecl-memcache/

/usr/local/php7/bin/phpize

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

make && make install

yum install libmemcached libmemcached-devel -y
cd /usr/local/src/
wget https://pecl.php.net/get/memcached-3.1.3.tgz
tar -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-config
make && make install
cd /usr/local/src/
wget https://pecl.php.net/get/redis-4.3.0.tgz
tar -zxvf redis-4.3.0.tgz
cd redis-4.3.0
/usr/local/php7/bin/phpize 
./configure --with-php-config=/usr/local/php7/bin/php-config
make && make install

安装 mcrypt扩展

yum install libmcrypt libmcrypt-devel mcrypt mhash -y
cd /usr/local/src/
wget http://pecl.php.net/get/mcrypt-1.0.1.tgz
tar xf mcrypt-1.0.1.tgz
cd 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.so
extension=memcached.so
extension=redis.so
extension=mcrypt.so

总结

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

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板