<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_59545"> PHP7 2015-12月正式发布,性能比5.6版本提高了不少,因此安装php7试试,在php.ini 配置<br>zend_extension=opcache.so<br>opcache.enable=1<br>opcache.enable_cli=1<br>果然性能提高了很多。 <div class="blockcode"> <div id="code_CaL"><ol> <li>#!/bin/bash</li> <li>apt-get update</li> <li>apt-get install -y git-core autoconf bison libxml2-dev libbz2-dev libmcrypt-dev libcurl4-openssl-dev libltdl-dev libpng-dev libpspell-dev libreadline-dev libicu-dev build-essential</li> <li>mkdir -p /usr/local/php7/etc/conf.d</li> <li>mkdir /usr/local/php7</li> <li>cd /tmp</li> <li>git clone http://git.php.net/repository/php-src.git --depth=1</li> <li>cd php-src</li> <li>./buildconf</li> <li>./configure --prefix=/usr/local/php7 --enable-intl --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-bcmath --with-bz2 --enable-exif --enable-dba --enable-ftp --with-gettext --with-gd --enable-mbstring --with-mcrypt --with-mhash --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --enable-pcntl --with-pspell --enable-shmop --enable-soap --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-zlib --enable-zip --with-readline --with-curl --with-config-file-path=/usr/local/php7/etc --with-config-file-scan-dir=/usr/local/php7/etc/conf.d</li> <li>make</li> <li>make install</li> <li> </ol></div> <em onclick="copycode($('code_CaL'));">复制代码</em> </div> </td></tr></table> <div class="ptg mbm mtn"> 쉘</div> <div id="comment_59545" class="cm"> </div> <div id="post_rate_div_59545"></div> <br><br>