./configure  --prefix=/usr/local/php7.1.5 --with-curl --with-iconv-dir  --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pear --with-zlib --enable-fpm --enable-bcmath --enable-mbregex --enable-mbstring --enable-opcache  --enable-pcntl --enable-sockets  --enable-embed

configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

vim /etc/ld.so.conf

/usr/local/mysql/lib

ldconfig

yum install libxml2*  libcurl-devel -y

./configure --prefix=/usr/local/php7.1.5 --with-curl --with-iconv-dir --with-mysqli --with-pcre-regex --with-pdo-mysql --with-pear --with-zlib --enable-fpm --enable-bcmath --enable-mbstring --enable-opcache=no --enable-sockets

wget http://www.ohse.de/uwe/releases/lrzsz-0.12.20.tar.gz

tar zxvf lrzsz-0.12.20.tar.gz && cd lrzsz-0.12.20
./configure && make && make install
上面安装过程默认把lsz和lrz安装到了/usr/local/bin/目录下,现在我们并不能直接使用,下面创建软链接,并命名为rz/sz:
cd /usr/bin
ln -s /usr/local/bin/lrz rz
ln -s /usr/local/bin/lsz sz

2)yum安装
root 账号登陆后执行以下命令:
yum install -y lrzsz
2.用说明
sz命令发送文件到本地:
# sz filename
rz命令本地上传文件到服务器:
# rz
执行该命令后,在弹出框中选择要上传的文件即可。
说明:打开SecureCRT软件 -> Options -> session options -> X/Y/Zmodem 下可以设置上传和下载的目录

安装http://blog.csdn.net/21aspnet/article/details/47708763

重新安装libxml2和libxml2-devel包

yum install libxml2

yum install libxml2-devel -y

yum -y install curl-devel

tar zxvf php-7.0.2.tar.gz

cd php-7.0.2

简约版

如果是php扩展debug,可不用下行

CFLAGS="-g -gdwarf-2 -g3" CXXFLAGS="-g -gdwarf-2 -g3"
./configure --prefix=/usr/local/php7.1.6 --with-curl --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli --with-openssl --with-pcre-regex --with-pdo-mysql --with-pear --with-zlib --enable-fpm --enable-bcmath --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-sockets --enable-zip --enable-embed --enable-debug

CFLAGS="-g -gdwarf-2 -g3" CXXFLAGS="-g -gdwarf-2 -g3"
./configure --prefix=/usr/local/php7 \
--with-curl \
--with-iconv-dir \
--with-kerberos \
--with-libdir=lib64 \
--with-libxml-dir \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pear \
--with-zlib \
--enable-fpm \
--enable-bcmath \
--enable-mbregex \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-sockets \
--enable-zip

configure error xml2-config not found. please check your libxml2 installation

yum install libxml2

yum install libxml2-devel -y

configure: error: Please reinstall the libcurl distribution -
easy.h should be in /include/curl/
# RetHat CentOS or Fedora 使用下面安装命令
yum install curl curl-devel
# Debian or Ubuntu使用下面的安装命令
apt-get install curl
apt-get install libcurl4-gnutls-dev

CFLAGS="-g -gdwarf-2 -g3" CXXFLAGS="-g -gdwarf-2 -g3"
./configure --prefix=/usr/local/php7 \
--with-curl \
--enable-debug\
--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

简约版

CFLAGS="-g -gdwarf-2 -g3" CXXFLAGS="-g -gdwarf-2 -g3" ./configure --prefix=/usr/local/php7.1.2 --enable-fpm --enable-sockets --enable-pdo --with-curl --enable-debug --enable-opcache

如果配置错误,需要安装需要的模块,直接yum一并安装依赖库

# yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel MySQL pcre-devel libxslt-devel

错误:

  1. /usr/include/ft2build.h:56:38: error: freetype/config/ftheader.h: No such file or directory
  2. /root/tx-pj-static-install/Packages/php-5.2.17/ext/gd/gd.c:84:12: error: #include expects “FILENAME” or <FILENAME>

解决:

  1. ln -s /usr/include/freetype2/freetype/ /usr/include/freetype

配置文件

 cp php.ini-development /usr/local/php7/lib/php.ini
 cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php7/etc/php-fpm.conf
 cp /usr/local/php7/etc/php-fpm.d/www.conf.default /usr/local/php7/etc/php-fpm.d/www.conf
 cp -R ./sapi/fpm/php-fpm /etc/init.d/php-fpm-7
 
 
需要注意的是php7中www.conf这个配置文件配置phpfpm的端口号等信息,如果你修改默认的9000端口号需在这里改,再改nginx的配置
启动
#  /etc/init.d/php-fpm-7
 
 
 
 

安装php7的更多相关文章

  1. CentOS 7.1编译安装PHP7

    原文: https://typecodes.com/web/centos7compilephp7.html?utm_source=tuicool&utm_medium=referral 1 创 ...

  2. 编译安装PHP7并安装Redis扩展Swoole扩展

    编译安装PHP7并安装Redis扩展Swoole扩展 在编译php7的机器上已经有编译安装过php5.3以上的版本,从而依赖库都有了 本php7是编译成fpm-php 使用的, 如果是apache那么 ...

  3. centos 7.2 安装PHP7.1+apache2.4.23

    安装准备:   http://ftp.cuhk.edu.hk/pub/packages/apache.org//httpd/httpd-2.4.23.tar.gz 下载apache http://cn ...

  4. 【安装PHP】如何在openSUSE42.1下编译安装PHP7

    首先推荐一篇文章PHP 7 Release Date Arrived: Will Developers Adopt PHP 7? - PHP Classes blog. 里面说到是否会去使用PHP7, ...

  5. centos6.4下安装php7+nginx+mariadb环境

    一,安装php71,创建php用户和用户组,并在github下载php7源码#新建php用户和php组# groupadd -r php && useradd -r -g php -s ...

  6. 搭建LNAMP环境(四)- 源码安装PHP7

    上一篇:搭建LNAMP环境(三)- 源码安装Apache2.4 一.安装PHP7 1.yum安装编译php需要的包 yum -y install libxml2 libxml2-devel curl- ...

  7. WINDOWS和Linux上安装php7 alpha 并安装 yaf

    WINDOWS和Linux上安装php7 alpha 并安装 yaf PHP技术  widuu  2个月前 (06-15)  126浏览  0评论 windows 1.windows上安装 php7 ...

  8. Centos 7 通过YUM安装 PHP7 NGINX1.1.8 POSTGRESQL9.5

    转载 1.最小化安装CENTOS7 2.更新源: yum update reboot 3.安装扩展源: yum install epel-release 4.安装工具软件: yum install w ...

  9. HomeBrew 安装 PHP7.1(开发笔记)

    HomeBrew 安装 PHP7.1 $ brew update $ brew tap homebrew/dupes $ brew tap homebrew/php $ brew update $ b ...

  10. Centos7下安装php7

    通过编译的方式安装php7 1. 安装PHP7 ## 下载 wget http://us2.php.net/distributions/php-7.0.2.tar.gz ## 安装 tar zxvf ...

随机推荐

  1. 关于scanf的算法(位操作)

    题目要求:输入有12行数据,每一行分别是每个月的余额.计算他们的平均值后输出.在输出时要在前面加上“$”,并在四舍五入后保留小数点后两位. 方法1: float a,b; main() { ;) b+ ...

  2. unity animation readonly 无法加事件?

    目前找到的解决方案是用代码加Event: using System.Collections; using System.Collections.Generic; using UnityEngine; ...

  3. Unity3D 游戏在 iOS 上因为 trampolines 闪退的原因与解决办法

    崩溃的情况 进入游戏一会儿,神马都不要做,双手离开手机,盯着屏幕看吧,游戏会定时从服务器那儿读取一些数据,时间一长,闪退了.尼玛问题是神马呢?完全没有头绪,不过大体猜测是因为网络请求导致的,那么好,先 ...

  4. for 续9

    -------siwuxie095                 for 拾遗:         一: for 语句里,do 后面一般会有括号,有括号就是复合语句, 假如需要用到括号里的变量,就需要 ...

  5. sqlserver备份与还原

    备份:数据库右键 默认: 还原成功: 还原: 1,新建同名数据库,右键 下步一定要,不然会报“备份集中的数据库备份与现有的数据库不同” 还原成功后

  6. Luogu 5170 【模板】类欧几里得算法

    原理不难但是写起来非常复杂的东西. 我觉得讲得非常好懂的博客.   传送门 我们设 $$f(a, b, c, n) = \sum_{i = 0}^{n}\left \lfloor \frac{ai + ...

  7. MySQL 系列(三)事务

    MySQL 系列(三)事务 一组要么同时执行成功,要么同时执行失败的 SQL 语句.是数据库操作的一个执行单元! 事务开始于: 连接到数据库上,并执行条 DML 语句(INSERT. UPDATE 或 ...

  8. Forms in Angular 2

    Input handling is an important part of application development. The ng-model directive provided in A ...

  9. 使用windows server2012时FileZilla客户端连接时报150 Opening data channel for directory listing of "/" 响应:425 Can't open data connection

    425 Can't open data connection 和 读取目录列表失败 问题解决 这个问题主要是由于使用Passive Mode模式造成的,解决这个问题很简单: 1.在ftp服务软件中设置 ...

  10. 8 求s=a+aa+aaa+aaaa+aa...a的值

    题目:求s=a+aa+aaa+aaaa+aa...a的值,其中a是一个数字. * 例如2+22+222+2222+22222(此时共有5个数相加),几个数相加有键盘控制.程序分析:关键是计算出每一项的 ...