1 安装依赖软件
yum install libxml2 libxml2-devel openssl openssl-devel bzip2 bzip2-devel libcurl libcurl-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel gmp gmp-devel libmcrypt libmcrypt-devel readline readline-devel libxslt libxslt-devel sqlite-devel \
oniguruma-devel autoconf
2 编译安装
./configure \
--prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --enable-fpm --with-fpm-user=nginx --with-fpm-group=nginx --enable-inline-optimization--disable-debug --disable-rpath --enable-shared \
--enable-soap --with-libxml-dir --with-xmlrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif \
--enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir--with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf--enable-gd-jis-conv --with-gettext --with-gmp \
--with-mhash --enable-json --enable-mbstring --enable-mbregex --enable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib-dir --with-pdo-sqlite --with-readline \
--enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear --enable-opcache
3. 配置环境变量
vim /etc/profile
PATH=$PATH:/usr/local/php/bin
4. 安装扩展(pecl安装)
二 容器部署
部署一个容器然后制作成镜像,多启动几个组成集群,提高并发量
安装swoole拓展
pecl install swoole-4.2.12
启用swoole拓展
docker-php-ext-enable swoole
容器制作镜像
docker commit 4e5a6a90097b php7.4-fpm-20221005:01
启动新容器
标签:enable,--,openssl,devel,php,安装,dir From: https://www.cnblogs.com/yanzi2020/p/16756032.html