作为一名php的攻城师,如果没有玩php源码安装是说不过去的。我们知道php之所以这么流行,跟它的开源文化和lamp配套有很大关系。由于PHP7废弃了很多功能,所以一些依赖这些功能的程序可能无法运行,尝鲜前请三思。比如很多国产软件都在依赖的mysql相关函数,如果自己开发php应用请用mysqli代替。不过WordPress是没有问题的,尽情使用吧。

下面进入正题,第一步,当然是下载源码和解压

$ cd ~
$ wget http://cn2.php.net/distributions/php-7.0.2.tar.gz
$ tar -zxvf php-7.0..tar.gz
cd php-7.0.

第二步,是编译配置,如果你之前有安装其它版本的php,请先删除,再安装php7;

./configure --prefix=/opt/php-7.0. --with-config-file-path=/opt/php-7.0./etc --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --with-mysql-sock --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-libxml-dir=/usr --disable-rpath --enable-bcmath --enable-shmop --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-ftp --with-gd --enable-gd-native-ttf --enable-sockets --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-zts --disable-debug --enable-shared --enable-opcache --enable-pdo --with-iconv --with-mcrypt --with-mhash --with-openssl --enable-xml --with-xmlrpc --with-libxml-dir --enable-pcntl --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-zlib --enable-zip --with-readline --without-sqlite3 --without-pdo-sqlite --with-libdir=/lib/x86_64-linux-gnu --with-jpeg-dir=/usr/lib --with-apxs2=/usr/bin/apxs --enable-cgi

其实这一步,会遇到很多问题,系统很抛出一些错误出来,一般都是由于系统缺少必要的依赖库。我们可以求助度娘进行解决,就不详述了。

第三步,编译和安装

$ make && make test
$ make && sudo make install

在ubuntu下,进行php7源码安装的更多相关文章

  1. 搭建LNAMP环境(七)- PHP7源码安装Memcached和Memcache拓展

    上一篇:搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展 一.安装Memcached 1.yum安装libevent事件触发管理器 yum -y install libe ...

  2. 搭建LNAMP环境(六)- PHP7源码安装MongoDB和MongoDB拓展

    上一篇:搭建LNAMP环境(五)- PHP7源码安装Redis和Redis拓展 一.安装MongoDB 1.创建mongodb用户组和用户 groupadd mongodb useradd -r -g ...

  3. 搭建LNAMP环境(五)- PHP7源码安装Redis和Redis拓展

    上一篇:搭建LNAMP环境(四)- 源码安装PHP7 一.安装Redis 1.创建redis用户组和用户 groupadd redis useradd -r -g redis -s /sbin/nol ...

  4. ubuntu下编译VLC源码

    http://blog.csdn.net/beitiandijun/article/details/9225591ubuntu下编译VLC源码 分类: 视频处理 2013-07-02 17:33 57 ...

  5. LinuxMint下的Orionode源码安装

    1. Orionode介绍 Eclipse-orion是Eclipse项目下面的一个子项目,orion是一个在在线版的代码编辑环境.其介绍参考http://wiki.eclipse.org/Orion ...

  6. ubuntu下linux内核源码阅读工具和调试方法总结

    http://blog.chinaunix.net/uid-20940095-id-66148.html 一 linux内核源码阅读工具 windows下当然首选source insight, 但是l ...

  7. 【转】在Ubuntu下编译Android源码并运行Emulator

    原文网址:http://www.mcuos.com/thread-4553-1-1.html 建立编译环境 1.在VirtualBox上安装Ubuntu 2.安装JDK   $ sudo apt-ge ...

  8. PHP7源码安装MongoDB和MongoDB拓展

    一.安装MongoDB 1.创建mongodb用户组和用户 groupadd mongodb useradd -r -g mongodb -s /sbin/nologin -M mongodb 2.下 ...

  9. centos下mysql 5源码安装全过程记录

    参考:http://blog.csdn.net/mycwq/article/details/24488691 安装cmake,mysql 5.5以后的版本要通过cmake进行编译 在新装的CentOS ...

随机推荐

  1. 文件上传及时显示, 前端js和后端php相互结合使用

    文件读取 javascript 绑定文件上传变化事件 onchange 利用window对象 FileReader 调用方法 readerAsDataURL onload 方法 异步读取 属性:fil ...

  2. MyCat的分片规则

    1. 枚举法: 通过在配置文件中配置可能的枚举id,自己配置分片,使用规则: <tableRule name="sharding-by-intfile"> <ru ...

  3. 022——VUE中remove()方法的使用:

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  4. 008-对象—— 对象$this self parent 内存方式及使用方法讲解

    <?php /** * */ /*class Web{ private $webname; private $weburl; function __construct($webname,$web ...

  5. Qt界面(控件)相关设计

    (转自:http://blog.chinaunix.net/uid-25799257-id-600157.html) 引言  最近在做数据库相关课程设计,所以就借此机会,先熟悉一下Qt的一些编程,同时 ...

  6. mysql和SqlServer 中取得汉字字段的各汉字首字母

    mysql 中取得汉字字段的各汉字首字母 这个转载于http://blog.csdn.net/lky5387/article/details/11973721 DELIMITER ;;CREATE  ...

  7. C++进阶2. typedef用法

    C++ 中的typedef用法 20131011 Typedef在C++中是一个关键字,他的用法有多重,但是自己又说不全面,所以整理一下: 1.用类型的别名 typedef char* PChar; ...

  8. bzoj 3197

    题解: 先找到中信 然后dp 代码: #include<bits/stdc++.h> using namespace std; ; ],a[N],b[N],s[N],c[N],f[N]; ...

  9. 使用minidom来处理XML的示例

    http://www.cnblogs.com/xuxm2007/archive/2011/01/16/1936610.html http://blog.csdn.net/ywchen2000/arch ...

  10. LeetCode OJ:Reverse Nodes in k-Group(K个K个的分割节点)

    Given a linked list, reverse the nodes of a linked list k at a time and return its modified list. If ...