centos7 编译php56
编译安装php5.6 centos7环境
步骤:
//下载php5.6
wget http://cn2.php.net/distributions/php-5.6.26.tar.bz2 yum install -y gcc \ gcc-c++ \ autoconf \ libjpeg \ libjpeg-devel \ libpng libpng-devel \ freetype freetype-devel \ libpng libpng-devel libxml2 \ libxml2-devel zlib zlib-devel \ glibc glibc-devel glib2 glib2-devel \ bzip2 bzip2-devel ncurses curl \ openssl-devel gdbm-devel db4-devel \ libXpm-devel libX11-devel gd-devel \ gmp-devel readline-devel libxslt-devel \ expat-devel xmlrpc-c xmlrpc-c-devel \ httpd-devel //解压
tar -jxvf php-5.6.26.tar.bz2
cd php-5.6.26 //编译
./configure --prefix=/usr/local/php --with-apxs2=/usr/bin/apxs --with-mysql=mysqlnd --with-mysql-sock --with-mysqli=mysqlnd --enable-fpm --enable-soap --with-libxml-dir --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear
提示: configure: error: xml2-config not found. Please check your libxml2 installation.
yum install libxml2-dev
提示:Cannot find OpenSSL's <evp.h>
yum install openssl openssl-devel
提示:configure: error: Please reinstall the BZip2 distribution
yum install bzip2-devel
提示: configure: error: Please reinstall the libcurl distribution -easy.h should be in <curl-dir>/include/curl/
yum install libcurl-devel
提示:If configure fails try --with-vpx-dir=<DIR> configure: error: jpeglib.h not found
yum install libjpeg-devel
提示:configure: error: png.h not found.
yum install libpng-devel
提示:configure: error: freetype-config not found
yum install freetype-devel
提示:configure: error: Unable to locate gmp.h
yum install gmp-devel
提示:configure: error: mcrypt.h not found. Please reinstall libmcrypt.,由于版权的原因没有自带mcrypt的包。额外安装
wget http://www.atomicorp.com/installers/atomic
chmod 777 atomic
./atomic
yum install php-mcrypt libmcrypt libmcrypt-devel
提示:configure: error: Cannot find MySQL header files under /usr/local/mysql.
Note that the MySQL client library is not bundled anymore!
yum install mysql-devel
然后修改为mysqlnd
--with-mysql=mysqlnd --with-mysqli=mysqlnd
Mysql Native驱动(Mysql Native Driver 简称:mysqlnd )在PHP5.3.0版本中被引入。PHP5.4之后的版本mysqlnd被作为默认配置选项
修改过后的安装依赖:
yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses curl openssl-devel gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel httpd-devel libxml2-dev openssl openssl-devel bzip2-devel libcurl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel
mycrypt
wget http://www.atomicorp.com/installers/atomic
chmod 777 atomic
./atomic
yum install php-mcrypt libmcrypt libmcrypt-devel
编译选项:
./configure --prefix=/usr/local/php --with-apxs2=/usr/bin/apxs --with-mysql=mysqlnd --with-mysql-sock --with-mysqli=mysqlnd --enable-fpm --enable-soap --with-libxml-dir --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear
httpd.conf添加libphp5.so
LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so
和mime添加
AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
centos7 编译php56的更多相关文章
- CentOS7编译安装Nginx-1.8.1和编译参数
CentOS7编译安装Nginx-1.8.1和编译参数 Web服务器Nginx LNMP是一组众所周知的Web网站服务器架构环境,即由Linux+Nginx+MySQL+PHP(MySQL有时也 ...
- centos7编译安装MySQL5.7.9
title: centos7编译安装MySQL5.7.9 date: 2016-05-12 16:20:17 tags: --- Centos7编译安装mysql5.7.9 mysql5.7有更好的性 ...
- Centos7编译opencv3.4.1
Centos7编译opencv3.4.1 参考博客 https://blog.csdn.net/wjbwjbwjbwjb/article/details/79111996 1.配置epel源 yum ...
- centos7 编译安装新版LNMP环境
centos7 编译安装新版LNMP环境 环境版本如下: 1.系统环境:Centos 7 x86_64 2.NGINX:nginx-1.11.3.tar.gz 3.数据库:mariadb-10.0.2 ...
- CentOS7编译安装httpd-2.4.41 php7.3
CentOS7编译安装httpd-2.4.41 php7.3 安装参考环境: CentOS Linux release 7.5.1804 (Core) 一.安装依赖包 httpd安装的依赖包 # yu ...
- centos7 编译问题:aclocal-1.14: command not found
centos7 编译问题:aclocal-1.14: command not found https://blog.csdn.net/vr7jj/article/details/80438663
- Centos7 编译安装PHP7
Centos7 编译安装PHP7 编译安装的方式可以让组件等设置更加合理,但需要你对PHP的代码及各种配置非常的熟悉,以下为大致的安装流程,大家可以参考 1.下载编译工具 yum groupinsta ...
- CentOS7编译和安装GCC7.5
CentOS7编译和安装GCC7.5 一. 环境介绍: CentOS7 虚拟机连上了互联网(为什么要强调这点呢,因为CentOS7每次进入系统,都需要手动点击右上角的Connect,才能连上互联 ...
- CentOS7编译安装php7.1配置教程详解
这篇文章主要介绍CentOS7编译安装php7.1的过程和配置详解,亲测 ,需要的朋友可以参考. 1.首先安装依赖包: yum install libxml2 libxml2-devel openss ...
随机推荐
- 机器学习实战笔记--k近邻算法
#encoding:utf-8 from numpy import * import operator import matplotlib import matplotlib.pyplot as pl ...
- Java中接口和抽象类的区别
经常看到这样的问题,就是问这两个的区别,我这也总结一下: 1,宏观上说,一个是类,一个是接口,类只支持单一继承,接口支持多个继承 2,微观上说,就是从内部来说 a,成员变量方面 接口可以包含方法,属性 ...
- Why many EEG researchers choose only midline electrodes for data analysis EEG分析为何多用中轴线电极
Source: Research gate Stafford Michahial EEG is a very low frequency.. and literature will give us t ...
- linux 项目部署问题
1.ubuntu 安装 pillow 报错 缺少依赖包 pip install Pillow ValueError: zlib is required unless explicitly disabl ...
- [LeetCode] Reverse Vowels of a String 翻转字符串中的元音字母
Write a function that takes a string as input and reverse only the vowels of a string. Example 1:Giv ...
- [LeetCode] Factor Combinations 因子组合
Numbers can be regarded as product of its factors. For example, 8 = 2 x 2 x 2; = 2 x 4. Write a func ...
- go channel
channel 是go语言中不同goroutine之间通信一种方法 //定义一个channel c := make(chan bool) //向channel中写入 c <- true //读取 ...
- Redis-Sentinel(Redis集群监控管理)
Redis的高可用方案的实现:主从切换以及虚拟IP或客户端 从Redis 2.8开始加入对Sentinel机制从而实现了服务器端的主从切换,但目前尚未发现实现虚拟IP或客户端切换方案 Redis-Se ...
- install scrapy-redis on centos
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -ivh epel-release- ...
- 【原创】自己动手写工具----签到器[Beta 2.0]
一.前面的话 上一篇中基本实现了简单的签到任务,但是不够灵活.在上一篇自己动手写工具----签到器的结尾中,我设想了几个新增功能来提高工具的灵活程度,下面把新增功能点列出来看看: (1)新增其他的进程 ...