Linuxでのphp7インストールコマンド記録
<code>wget http:<span>//cn2.php.net/distributions/php-7.0.5.tar.gz</span>tar <span>-zxvf</span> php<span>-</span><span>7.0</span><span>.5</span><span>.</span>tar<span>.</span>gz cd php<span>-</span><span>7.0</span><span>.5</span><span>.</span>/configure <span>\</span><span>--</span>prefix<span>=</span>/usr/<span>local</span>/php <span>\</span><span>--</span><span>with</span><span>-curl</span><span>--</span><span>with</span><span>-freetype</span><span>-dir</span><span>--</span><span>with</span><span>-gd</span><span>\</span><span>--</span><span>with</span><span>-gettext</span><span>--</span><span>with</span><span>-iconv</span><span>-dir</span><span>--</span><span>with</span><span>-kerberos</span><span>\</span><span>--</span><span>with</span><span>-libdir</span><span>=</span>lib64 <span>--</span><span>with</span><span>-libxml</span><span>-dir</span><span>--</span><span>with</span><span>-mysqli</span><span>\</span><span>--</span><span>with</span><span>-openssl</span><span>--</span><span>with</span><span>-pcre</span><span>-regex</span><span>--</span><span>with</span><span>-pdo</span><span>-mysql</span><span>\</span><span>--</span><span>with</span><span>-pdo</span><span>-sqlite</span><span>--</span><span>with</span><span>-pear</span><span>--</span><span>with</span><span>-png</span><span>-dir</span><span>\</span><span>--</span><span>with</span><span>-xmlrpc</span><span>--</span><span>with</span><span>-xsl</span><span>--</span><span>with</span><span>-zlib</span><span>\</span><span>--</span>enable<span>-fpm</span><span>--</span>enable<span>-bcmath</span><span>--</span>enable<span>-libxml</span><span>\</span><span>--</span>enable<span>-inline</span><span>-optimization</span><span>\</span><span>--</span>enable<span>-gd</span><span>-native</span><span>-ttf</span><span>--</span>enable<span>-mbregex</span><span>\</span><span>--</span>enable<span>-mbstring</span><span>--</span>enable<span>-opcache</span><span>\</span><span>--</span>enable<span>-pcntl</span><span>--</span>enable<span>-shmop</span><span>\</span><span>--</span>enable<span>-soap</span><span>--</span>enable<span>-sockets</span><span>\</span><span>--</span>enable<span>-sysvsem</span><span>--</span>enable<span>-xml</span><span>\</span><span>--</span>enable<span>-zip</span>报错 configure: error: Cannot find OpenSSL<span>'s <evp.h> yum install openssl openssl-devel configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/ yum install curl curl-devel If configure fails try --with-webp-dir=<DIR> If configure fails try --with-jpeg-dir=<DIR> configure: error: png.h not found. yum install libpng libpng-devel ..... 或者一次性把这些需要包全部安装 yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel cp php.ini-development /etc/php7.ini cd /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf ln -s /usr/local/php/bin/php /bin/php ln -s /usr/local/php/sbin/php-fpm /bin/php7-fpm ln -s /usr/local/php/bin/php /bin/php7</span></code>
上記は、Linux と php7 の内容を含む、Linux での php7 インストール コマンドの記録を紹介しています。PHP チュートリアルに興味のある友人に役立つことを願っています。