• 技术文章 >后端开发 >PHP7

    记录Linux下php7安装命令

    coldplay.xixicoldplay.xixi2021-02-22 09:27:37转载84

    推荐(免费):PHP7

    Linux下php7安装命令记录

    wget http://cn2.php.net/distributions/php-7.0.5.tar.gztar -zxvf php-7.0.5.tar.gz

    cd php-7.0.5./configure \--prefix=/usr/local/php
    \ --with-curl --with-freetype-dir --with-gd
    \--with-gettext --with-iconv-dir --with-kerberos
    \--with-libdir=lib64 --with-libxml-dir --with-mysqli
    \--with-openssl --with-pcre-regex --with-pdo-mysql
    \--with-pdo-sqlite --with-pear --with-png-dir
    \--with-xmlrpc --with-xsl --with-zlib
    \--enable-fpm --enable-bcmath --enable-libxml
    \--enable-inline-optimization
    \--enable-gd-native-ttf --enable-mbregex
    \--enable-mbstring --enable-opcache
    \--enable-pcntl --enable-shmop
    \--enable-soap --enable-sockets
    \--enable-sysvsem --enable-xml
    \--enable-zip报错
    configure: error: Cannot find OpenSSL'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

    以上就是记录Linux下php7安装命令的详细内容,更多请关注php中文网其它相关文章!

    本文转载于:CSDN,如有侵犯,请联系a@php.cn删除
    专题推荐:Linux php7安装
    上一篇:学习php7配置mysqli和使用mysqli连接mysql 下一篇:总结PHP 7.x 各个版本的新特性
    第15期线上培训班

    相关文章推荐

    • PHP7中十个需要避免的坑• 一个高性能、简单、跨平台的 PHP7 代码加密扩展是什么• 介绍linux安装php7.3.0的方法• 你知道PHP7怎么开启opcache用以提高性能吗• 升级PHP7避免踩坑

    全部评论我要评论

  • 取消发布评论发送
  • 1/1

    PHP中文网