Linux源码编译安装php7.3
---恢复内容开始---
ps:一切从简
一、安装所需环境
yum -y install libxml2 libxml2-devel openssl openssl-devel curl-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel libzip-devel pcre-devel
二、下载及安装nginx
1.下载php
wget http://cn2.php.net/distributions/php-7.3.3.tar.gz
2.解压php
tar -xzf php-7.3.3.tar.gz
3.进入php目录
cd php-7.3.3
3.编译php(我们不提供apxs参数,相反,我们提供php-fpm相关参数)
./configure --prefix=/usr/local/php7 \
--with-config-file-path=/usr/local/php7/etc \
--with-config-file-scan-dir=/usr/local/php7/etc/php.d \
--with-mcrypt=/usr/include \
--enable-mysqlnd \
--with-mysqli \
--with-pdo-mysql \
--enable-fpm \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--with-gd \
--with-iconv \
--with-zlib \
--enable-xml \
--enable-shmop \
--enable-sysvsem \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-ftp \
--enable-gd-native-ttf \
--with-openssl \
--enable-pcntl \
--enable-sockets \
--with-xmlrpc \
--enable-zip \
--enable-soap \
--without-pear \
--with-gettext \
--enable-session \
--with-curl \
--with-jpeg-dir \
--with-freetype-dir \
--enable-opcache
-----------------------start---------------------------
假如编译完成之后报错:
“checking for libzip... configure: error: system libzip must be upgraded to v”
执行一下,没有报错则忽略。
wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -xzf libzip-1.2.0.tar.gz
./configure
make && make install
----------------------------end-------------------------
出现以下则表示编译成功
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+Thank you for using PHP.
然后执行:
make test(如果出现什么问题请谷歌或百度,或者往下看看能解决不)
--------------start----------------
如果这里报错:
/usr/local/include/zip.h:59:21: fatal error: zipconf.h: No such file or directory
则执行一下命令,没有则忽略。
find / -name zipconf.h
cp /你zipconf.h所在的目录 //usr/local/include/zipconf.h
然后重新 configure 成功之后在make test,没问题则继续执行后面的命令。
---------------end--------------------
make && make install -j2
三、配置php
1.复制ini文件
cp php.ini-production /usr/local/php7/etc/php.ini
2.配置fpm
cd /usr/src/php-7.0.0/sapi/fpm
cp init.d.php-fpm /etc/init.d/php-fpm
chmod +x /etc/init.d/php-fpm
chkconfig --add php-fpm
chkconfig php-fpm on
Linux源码编译安装php7.3的更多相关文章
- Linux源码编译安装php7.2
以下简单的介绍下如何源码安装PHP,对于版本不一定是7.2,也可以是7.3,当然方法都是换汤不换药的,核心东西不变. 一.下载PHP源码 需要到指定的路径下载源码,执行下面的命令 wget http: ...
- Centos7源码编译安装PHP7.2(生产环境)
安装PHP依赖包,否则在编译的过程中可能会出现各种报错 # Centos 安装epel-release源并将系统包更新到最新版本 $ yum install epel-release-y $ yum ...
- Centos 7源码编译安装 php7.1 之生产篇
Centos 7源码编译安装 php7.1 之生产篇 Published 2017年4月30日 by Node Cloud 介绍: 久闻php7的速度以及性能那可是比php5系列的任何一版本都要快,具 ...
- linux源码编译安装OpenCV
为了尽可能保证OpenCV的特性,使用OpenCV源码编译安装在linux上.先从安装其依赖项开始,以ubuntu 14.04.X为例讲解在Linux上源码编译安装OpenCV,其他linux版本可以 ...
- Linux源码编译安装httpd
Linux安装软件采用源码编译安装灵活自由,适用于不同平台,维护也十分方便. 源码编译的安装方式一般由3个步骤组成: 1.配置(configure) 2.编译(make) 3.安装(make inst ...
- Linux 源码编译安装软件
程序包编译安装的步骤: 源代码-->预处理-->编译-->汇编-->链接-->执行 多文件:文件中的代码之间,很可能存在跨文件依赖关系 1.编译源码的项目工具 使用相关的 ...
- Ubuntu 16.04 源码编译安装PHP7+swoole
备注: Ubuntu 16.04 Server 版安装过程图文详解 Ubuntu16镜像地址: 链接:https://pan.baidu.com/s/1XTVS6BdwPPmSsF-cYF6B7Q 密 ...
- Ubuntu 16.04 源码编译安装PHP7
一.下载PHP7的最新版源码 php7.0.9 下载地址 http://php.net/get/php-7.0.9.tar.gz/from/a/mirror 二.解压 tar -zxf /tmp/p ...
- 源码编译安装php7
现在新启的项目都是采用php7了,无奈很多Linux发行版中还是php5 第三方php7源在自己本机上用用到无所谓,放到正式环境上还是有点不放心 其实编译安装也就几分钟,麻烦的是各种依赖 先删除老版本 ...
随机推荐
- Page Object设计模式(二)——poium测试库
一.简介 poium是一个基于Selenium/appium的Page Object测试库,最大的特点是简化了Page层元素的定义. 项目地址:https://github.com/SeldomQA/ ...
- TChart-数据编辑(TChartListBox,TeeCommander)
先上图 功能代码: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Contr ...
- Java输入和输出数组(加逗号)
输入示例 61,2,3,4,5,6 输出示例 1,2,3,4,5,61,2,3,4,5,6 import java.util.Scanner; public class Demo01 { public ...
- 一起学Vue之表单输入绑定
在Vue进行前端开发中,表单的输入是基础且常见的功能,本文以一个简单的小例子,简述v-model数据绑定的用法,仅供学习分享使用,如有不足,还请指正. 基础用法 你可以用 v-model 指令在表单 ...
- 谷歌F12获取接口信息
- 内网IPC$入侵加pstools之远程控制
前言: IPC$(Internet process connection)是指内网里面的文件共享连接,通常很多机子的默认共享都是打开的,在cmd下使用命令net share可查看自己的IPC$是否打开 ...
- link(外部资源关系)
规定了外部资源与当前文档的关系 常于链接样式表<link href="/media/examples/link-element-example.css" rel=" ...
- vue项目中使用element ui上传图片到七牛
1.获取token值 后台有接口调用直接返回token值 //请求后台拿七牛云token async getQiniuToken() { //token let uploadtoken = await ...
- Firefox下载.net服务器文件时中文乱码
ASP.NET中产生一个Excel报表,供浏览器下载.显然,下载时经常有汉字报表名称.针对当前的两个主流的浏览器IE和Firefox,似乎没有兼容的解决办法.网上搜索了一些解决方法,但在Firefox ...
- Linux更改时区
在下午查看系统时间,发现时间竟然是凌晨2点过: [root@node01 ~]# date Sat Jul 20 02:34:29 EDT 2019 开始以为是时间不是24小时进制的,百度了一下,参考 ...