wadeyu

前置条件

  • autoconf:2.59+
  • automake:1.4+
  • libtool:1.4.x(除了1.4.2)
  • re2c:0.13.4+
  • bison:建议1.281.35 或 1.75
  • 依赖的库
yum install gcc gcc-c++ libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib \
zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel curl curl-devel openssl openssl-devel libzip libzip-devel \
libwebp libwebp-devel
  • 如果需要安装libzip扩展,需要安装libzip libzip-devel库,版本>=0.11,yum仓库自带的版本比较低,需要手动编译libzip
  • 手动编译libzip需要先安装cmake,libzip版本选择跟cmake适配的版本,这里选择1.2.0 libzip版本,libzip手动编译默认安装在/usr/local目录下

环境检查

  • 线程安全版本:--enable-maintainer-zts
  • 多进程方式使用非线程安全版本即可
[root@wadeyu php-7.3.4]# ./configure --prefix=/usr/local/php7.3 --with-config-file-path=/usr/local/php7.3/etc \
--with-mysqli=mysqlnd --with-iconv-dir=/usr --with-gd --with-freetype-dir=/usr --with-jpeg-dir=/usr --with-png-dir=/usr --with-webp-dir=/usr \
--with-zlib --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-fpm --enable-mbstring \
--with-openssl --with-mhash --enable-pcntl --enable-sockets --enable-soap --without-pear --with-libzip=/usr/local --with-bz2 --enable-calendar \
--enable-ftp --enable-ctype --enable-exif --disable-ipv6 --with-sqlite3 --enable-pdo --with-pdo-mysql=mysqlnd --enable-phar --with-curl --with-tsrm-pthreads

编译安装

  • 编译需要比较长的时间,不同硬件配置的机器,编译时间不一样
  • 我的树莓派1G4核的配置,编译了差不多1个半小时

分类:

技术点:

相关文章: