Heim > Artikel > Backend-Entwicklung > Linux下php7安装命令记录 linux查看php版本 linux php升级 linux php mssq
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</dir> </dir></curl-dir></evp.h></span></code>').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });
以上就介绍了Linux下php7安装命令记录,包括了Linux,php7方面的内容,希望对PHP教程有兴趣的朋友有所帮助。