发新帖

[PHP] [Linux] php7-编译安装参数

零下一度 2019-7-8 961
php7.4-编译安装参数
./configure \
--with-fpm-user=www \
--with-fpm-group=www \
--prefix=/usr/local/php7 \
--with-config-file-path=/usr/local/php7/etc \
--disable-fileinfo \
--with-mysql-sock \
--with-mysqli \
--with-pgsql \
--with-pdo-pgsql \
--with-libxml \
--with-openssl \
--with-mhash \
--with-zlib \
--with-iconv \
--with-bz2 \
--with-curl \
--with-cdb \
--with-jpeg \
--with-webp \
--with-xpm \
--with-freetype \
--with-gettext \
--with-gmp \
--with-mhash \
--with-readline \
--with-xsl \
--with-pear \
--with-external-gd \
--enable-fpm \
--enable-gd \
--enable-soap \
--enable-bcmath \
--enable-calendar \
--enable-dom \
--enable-exif \
--enable-filter \
--enable-ftp \
--enable-gd-jis-conv \
--enable-json \
--enable-mbstring \
--enable-mbregex \
--enable-pdo \
--enable-session \
--enable-shmop \
--enable-simplexml \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--without-gdbm \
--enable-opcache






编译php5.3

./configure --prefix=/usr/local/php5.3.2 --with-config-file-path=/usr/local/php5.3.2 --with-apxs2=/usr/local/httpd/bin/apxs --with-mysql=mysqlnd --with-mcrypt --with-pgsql --with-mysql-sock=/var/lib/mysql/mysql.sock --enable-sigchild --with-mcrypt --with-mhash --with-gd --with-zlib --with-jpeg-dir --with-png-dir --with-iconv=/usr/local/lib --with-freetype-dir=/usr/local/freetype --enable-gd-native-ttf --with-libxml-dir=/usr/local/libxml2.2.9.1 --enable-ftp --enable-soap --enable-mbstring --enable-calendar --with-curl --enable-fpm --enable-fastcgi


如下错误

You've configured multiple SAPIs to be build. You can build only one SAPI module and CLI binary at the same time. 

原因:由于在LAMP环境中,php与apache通信是通过apxs,而LNMP环境是通过php-fpm

解决方法去掉其中一个php-fpm




最新回复 (0)
返回
零下一度
主题数
928
帖子数
0
注册排名
1