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 http://cn2.php.net/distributions/php-7.3.3.tar.gz
編譯安裝 擴展
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 編譯安裝過程,希望對大家有所幫助!
您可能感興趣的文章:- 如何在centos8自定義目錄安裝php7.3
- PHP7.3.10編譯安裝教程
- apache集成php7.3.5的詳細步驟
- 在Ubuntu 18.04上安裝PHP 7.3 7.2和7.0的方法
- CentOS 7.3.1611編譯安裝Nginx1.10.3+MySQL5.7.16+PHP7.1.2