Linux PHP expands FileInfo compiler solution

Source: Internet
Author: User

Recently uploaded their blog to the Aliyun server, the results in the download vendor package, the need for the expansion of PHP FileInfo, this would like to install expansion is a very simple thing, but the trouble is still there, make the time is always compiled through, Think maybe Php (7.2) version is too high, so the PHP has been recompiled installed (PHP version 7.0.2), but in make, or can not pass, the Internet to see the approximate solution is in the compile time plus--disable-fileinfo, installed after the installation from the PHP source package extension Exhibition, but in any case, is to compile, as long as the compilation, is pass, this method may let us temporarily compile and install the PHP, but we will eventually install this expansion.

Compilation FileInfo expansion cannot pass, can not pass, said online is the reason for system memory, I think it should be, because of my Linux system memory is 1G, remove other services to use, the last only half of G, seemingly to install this expansion, the system surplus memory may be more than 1G, personal solutions,

Since there is not enough memory, a bit of a pit, then temporarily use the swap partition to solve it, swap partition will be the disk partition as a virtual memory to use, after use, and then delete the virtual partition is good

(1) Specify the PHP related configuration directory and expansion, into the unpacked source package, check the installation environment
    ./configure --prefix=/usr/local/php \       -- exec-prefix=/usr/local/php \       --bindir=/usr/local/php/bin \        --sbindir=/usr/local/php/sbin \       -- includedir=/usr/local/php/include \       --libdir=/usr/local/php/lib/php  \       --mandir=/usr/local/php/php/man \        --with-config-file-path=/usr/local/php/etc \       -- with-mysql-sock=/tmp/mysql.sock \       --with-mysqli \       --with-pdo-mysql \       --with-mcrypt=/usr/include  \       --with-mhash \       -- with-openssl \       --with-gd \       --with-iconv \        --with-zlib \       --enable-zip \        --enable-inline-optimization \       --disable-debug  \       --disable-rpath \       --enable-shared  \       --enable-xml \       -- enable-bcmath \       --enable-shmop \        --enable-sysvsem \       --enable-mbregex \        --enable-mbstring \       --enable-ftp \       --enable-gd-native-ttf \       --enable-pcntl \    &NBsp;   --enable-sockets \       --with-xmlrpc \        --enable-soap \       --without-pear \        --with-gettext \       --enable-session  \       --with-curl \       -- with-jpeg-dir \       --with-freetype-dir \        --enable-opcache \       --enable-fpm \        --without-gdbm \       --enable-fileinfo       
DD If=/dev/zero of=/swapfile bs=64m count=16
mkswap/swapfile swapon/swapfile make 
& make
install  
Close swap partition after end 
Remove swap partition
Rm/swapfile




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.