PHP7.0正式版已经在2015年11月份左右发布,目前是PHP7.0.2版本,本人最早是从2015年8月php7的第一个测试版跟起,现在正式版发布。

linux版本:64位CentOS 6.6

Nginx版本:nginx1.8.0

php版本:php-7.0.2

下载

# wget  http://php.net/get/php-7.0.2.tar.gz/from/a/mirror

 
建议安装之前先看看安装帮助文件INSTALL
 
解压安装
# tar zxvf php-7.0.2.tar.gz
# cd php-7.0.2
首先查看安装帮助
# ./configure   --help
# ./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

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

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

注意:安装php7beta3的时候有几处配置不过去,需要yum一下,现在php-7.0.2已经不用这样了。
# yum -y install curl-devel
# yum -y install libxslt-devel
 
编译安装
# make &&  make install

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

centos 安装php7.0.2的更多相关文章

  1. centos安装php7.2环境

    centos安装php7.2环境 安装apache服务 yum -y install httpd 首先获取rpm: rpm -Uvh https://dl.fedoraproject.org/pub/ ...

  2. centos7下编译安装php-7.0.15(PHP-FPM)

    centos7下编译安装php-7.0.15(PHP-FPM) 一.下载php7源码包 http://php.net/downloads.php 如:php-7.0.15.tar.gz 二.安装所需依 ...

  3. centos 安装php7、pecl 、swoole、redis拓展

    一.更新yum源,安装php7 CentOS/RHEL 7.x: rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest- ...

  4. Linux安装php-7.0.16,完成php和apache的配置

    Linux安装php-7.0.16,完成php和apache的配置     版本:php-7.0.16.tar.gz,libxml2-2.9.2.tar.gz(php需要它的支持,首先安装它) 说明 ...

  5. Linux Centos7.2 编译安装PHP7.0.2

    操作环境: 1.系统:Centos7.2 2.服务:Nginx 1.下载PHP7.0.2的安装包解压,编译,安装: $ cd /usr/src/ $ wget http://cn2.php.net/d ...

  6. CentOS 7.2mini版本下编译安装php7.0.10+MySQL5.7.14+Nginx1.10

    一.安装前的准备工作 1.yum update    #更新系统 2.yum install gcc gcc-c++ autoconf automake cmake bison m4 libxml2  ...

  7. CentOS 7.2mini版本下编译安装php7.0.10+MySQL5.7.14+Nginx1.10.1

    一.安装前的准备工作 1.yum update    #更新系统 1.1)vi /etc/selinux/config #  禁止SELINUX,设置SELINUX=disabled 2.yum in ...

  8. CentOS 7.2下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1

    一.安装前的准备工作 1.yum update    #更新系统 2.yum install gcc gcc-c++ autoconf automake cmake bison m4 libxml2  ...

  9. CentOS安装PHP7+Nginx+MySQL

    本文属于动手搭建PHP开发环境的一部分,更多点击链接查看. 本文以centos6为例.命令部分均省略sudo命令. 安装PHP 下载 http://cn2.php.net/distributions/ ...

随机推荐

  1. java项目的划分方式:模块优先还是层优先?

    I've seen and had lots of discussion about "package by layer" vs "package by feature& ...

  2. 【BZOJ-4690】Never Wait For Weights 带权并查集

    4690: Never Wait for Weights Time Limit: 15 Sec  Memory Limit: 256 MBSubmit: 88  Solved: 41[Submit][ ...

  3. 【BZOJ-1833】count数字计数 数位DP

    1833: [ZJOI2010]count 数字计数 Time Limit: 3 Sec  Memory Limit: 64 MBSubmit: 2494  Solved: 1101[Submit][ ...

  4. Bzoj4300 绝世好题

    Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 1325  Solved: 722 Description 给定一个长度为n的数列ai,求ai的子序列bi ...

  5. POJ 2492 A Bug's Life

    传送门:A Bug's Life Description Background Professor Hopper is researching the sexual behavior of a rar ...

  6. yield和python(如何生成斐波那契數列)

    您可能听说过,带有 yield 的函数在 Python 中被称之为 generator(生成器),何谓 generator ? 我们先抛开 generator,以一个常见的编程题目来展示 yield ...

  7. PHP的单引号与双引号的区别

    字符串应用 单引号 较好! 在某些特定情况下,单引号的效率比双引号高. PHP把单引号中的数据视为普通字符串,不再处理. 而双引号还要对其中的字符串进行处理,比如遇到$了会把其后的内容视为变量等.

  8. C语言函数指针的用法

    函数指针是一种在C.C++.D语言.其他类 C 语言和Fortran 2003中的指针.函数指针可以像一般函数一样,用于调用函数.传递参数.在如 C 这样的语言中,通过提供一个简单的选取.执行函数的方 ...

  9. NOIp 0910 爆零记

    这套题是神犇chty出的. 刚拿到题的时候有点懵逼,因为按照一般的套路第一题都是一眼题,但是看到第一题后想了很多个算法和数据结构好像都不能很好的解决.然后就随手敲了个暴力去看T2. 嗯...文件名是b ...

  10. VRRP协议详解

    今天做了lvs的负载均衡的实验,竟然成功了,出乎我意料......哈哈哈哈 http://blog.csdn.net/fanlu319/article/details/7013258