1.安装依赖

sudo apt-get install libjpeg-dev
sudo apt-get install libxml2-dev
sudo apt-get -y install libjpeg-dev
sudo apt-get install libmcrypt-dev
sudo apt-get install libpng12-dev
sudo apt-get -y install libfreetype6-dev
sudo apt-get install curl libcurl3 libcurl3-dev

2.编译
sudo ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php --enable-fpm --with-fpm-user=php-fpm --with-fpm-group=php-fpm --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-ftp --enable-mbstring --enable-exif --disable-ipv6 --with-pear --with-curl --enable-bcmath --enable-mbstring --enable-sockets --with-gd --with-libxml-dir=/usr/local --with-gettext

3.修改php.ini时区为PRC
sudo cp php.ini-development /usr/local/php/php.ini
sudo vim /usr/local/php/php.ini
#去掉;
data.timezone = PRC

4.修改php-fpm配置(php7要注意配置 /usr/local/php70/etc/php-fpm.d/www.conf)
cd /usr/local/php/etc
sudo cp php-fpm.conf.default php-fpm.conf
vim php-fpm.conf
#开启pid与错误日志,修改php为当前用户和用户,去掉;
pid = run/php-fpm.pid
error_log = log/php-fpm.log
user = qingpz
group = qingpz

5.设置php启动命令
sudo cp -r /usr/local/src/php-5.6.26/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
sudo mkdir -p /usr/local/php/etc/fpm.d
sudo chmod +x /etc/init.d/php-fpm

6.启动相关命令
sudo /etc/init.d/php-fpm (start|stop|force-quit|restart|reload|status)

扩展设置开机就启动
sudo apt-get install sysv-rc-conf
sudo sysv-rc-conf php-fpm on

ubuntu下php编译的更多相关文章

  1. ubuntu下boost编译安装

    ubuntu下boost编译安装 boost 安装 1.依赖安装 apt-get install mpi-default-dev libicu-dev python-dev python3-dev l ...

  2. ubuntu下如何编译C语言

    ubuntu下如何编译C语言     如果没有gcc编译器的话,使用以下命令获取 ~# sudo apt-get install gcc同时要下载辅助工具 ~# sudo apt-get instal ...

  3. 64位ubuntu下重新编译hadoop2.2流水账

    hadoop官方网站中只提供了32位的hadoop-2.2.0.tar.gz,如果要在64位ubuntu下部署hadoop-2.2.0,就需要重新编译源码包,生成64位的部署包.建议以下操作使用roo ...

  4. Ubuntu下Android编译环境的配置

    从安装操作系统到编译程序结束,过程大致如下. 1. Ubuntu Linux操作系统安装软件包.使用 Ubuntu 14.04 Desktop系统.安装Linux系统到VMWare虚拟机上. 2. 完 ...

  5. 关于ubuntu下qt编译显示Cannot connect creator comm socket /tmp/qt_temp.xxx/stub-socket的解决的方法

    今天在ubuntu下安装了qtcreator,准备測试一下能否用.果然一測试就出问题了,简单编写后F5编译在gnome-terminal中出现 Cannot connect creator comm ...

  6. 关于ubuntu下qt编译显示Cannot connect creator comm socket /tmp/qt_temp.xxx/stub-socket的解决办法

    今天在ubuntu下安装了qtcreator,准备测试一下是否能用,果然一测试就出问题了,简单编写后F5编译在gnome-terminal中出现 Cannot connect creator comm ...

  7. Ubuntu下怎么编译并运行C、C++和Pascal语言?

    很多同学在安装了Ubuntu的环境后,发现在Windows下的许多东西都打不开了,但是用网站上的在线IDE又不是很方便. 所以,ljn教你如何在Ubuntu下编译并运行C.C++和Pascal. 一. ...

  8. Linux/Ubuntu下 静态编译Qt程序

    一般情况下,我们用Qt编译出来的程序是要依赖于系统Qt库的,也就是这个程序移到别的没有安装Qt库的系统上是不能使用的.会提示缺少……库文件之类的错误.这就是动态编译的结果. 但是如果我们想编译一个程序 ...

  9. 【Linux学习】Ubuntu下内核编译(一)

    (1)当要运行内核配置时,输入make menuconfig时出现错误 遇到这个问题,主要是以为没有ncurses库,而make menconfig 须要这个库.因此须要安装ncurses或者ncur ...

  10. ubuntu 下jrtplib编译

    我本来想用最新的 jrtplib-3.9.1和jthread-1.3.1,可是最新的那两个版本中都是用cmake进行配置的,我搞了好久,查了好多资料也没有解决交叉编译的问题,无奈,只能选用比较老的两个 ...

随机推荐

  1. PAT (Advanced Level) 1083. List Grades (25)

    简单排序. #include<cstdio> #include<cstring> #include<cmath> #include<vector> #i ...

  2. Ubuntu“无法解析或打开软件包的列表或是状态文件”的解决办法。_StarSasumi_新浪博客

    Ubuntu"无法解析或打开软件包的列表或是状态文件"的解决办法. (2011-04-30 14:56:14) 转载▼ 标签: ubuntu apt 分类: Ubuntu/Linu ...

  3. 控制流之break

    break语句是用来 终止 循环语句的,即哪怕循环条件没有称为False或序列还没有被完全递归,也停止执行循环语句.一个重要的注释是,如果你从for或while循环中 终止 ,任何对应的循环else块 ...

  4. log4CXX第二篇---配置文件(properties文件)详解

    一.Log4j简介 Log4j有三个主要的组件:Loggers(记录器),Appenders (输出源)和Layouts(布局).这里可简单理解为日志类别,日志要输出的地方和日志以何种形式输出.综合使 ...

  5. Servlet实现文件上传(简单)(一)

     1..使用到的jar包,为apache的一个子项目  此commons-fileupload-1.2.2需要以下commons-io-2.0.1的支持   2.页面展示fileUpload.jsp ...

  6. 如何深入学习CSS

    学习CSS有了一定基础后,有的人会觉得好象没有什么学的.因为知道一些基本的理论性的东西.CSS说它容易是因为它的知识点有限.说它难学就在于各浏览器对CSS的支持程度不同.如何深入学习我给出以下几点见意 ...

  7. webstorm 激活码

    WebStorm 2016 最新版激活(activation code方式) 注册时,在打开的License Activation窗口中选择“activation code”,在输入框输入下面的注册码 ...

  8. EF的join用法

    var customers = DB.Customer.Join(DB.Commission, cst => cst.CommissionId,                          ...

  9. stm单片机之STM32F4-Discovery资料汇总 (转载自http://blog.163.com/thinki_cao/blog/static/83944875201362493134992/)

    STM32F4的资料大部分都在这里: http://www.stmcu.org/download/index.php?act=ziliao&id=150 根据个人的理解对这些资料作了一些规律, ...

  10. [repost]Xcode因为证书问题经常报的那些错

    [reference]http://www.jianshu.com/p/b10680a32d3 1.   确认下证书是不是开发证书,如果是发布证书就会出现这样的提示. 2.   证书失效了,去开发者中 ...