php的mcypt,php 7.3 在Centos6.x下的安装过程
提示unrecognized options: –with-mcrypt, –enable-gd-native-ttf
表示php7.3不支持这两个选项,
编译准备工作:
yum -y install libmcrypt-devel mhash-devel libxslt-devel libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel krb5 krb5-devel libidn libidn-devel openssl openssl-devel libzip
yum -y install gcc automake autoconf libtool make
yum -y install gcc gcc-c++ glibc
yum -y install pcre-devel
updatedb
yum install -y cmake
yum install -y cmake3
yum install zlib-devel
正式编译:
./configure --prefix=/opt/php73/ --with-config-file-path=/etc/php73/ --with-libdir=lib64 --with-gd --with-iconv --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-curl --with-openssl --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-pdo-sqlite=shared --enable-xml --enable-pcntl --enable-mbregex --enable-mbstring --enable-bcmath --enable-inline-optimization --enable-zip --enable-ftp --enable-sockets --enable-shmop --enable-sysvsem --enable-sysvmsg --enable-sysvshm --disable-rpath --disable-debug --without-gdbm --enable-opcache --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-maintainer-zts --enable-soap
make && make install
cp php.ini-production /opt/php73/etc/php.ini
cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
cp /opt/php73/etc/php-fpm.d/www.conf.default /opt/php73/etc/php-fpm.d/www.conf
chmod 755 /etc/init.d/php-fpm
service php-fpm restart
相关资料:
编译PHP7.3
错误:
Starting php-fpm /opt/php73/sbin/php-fpm: error while loading shared libraries: libzip.so.5: cannot open shared object file: No such file or directory
failed
#checking for libzip... configure: error: system libzip must be upgraded to version >= 0.11
方法1:
检测到没有安装libzip5, 请先安装 libzip5,
1. 下载安装方法: wget http://rpmfind.net/linux/remi/enterprise/6/remi/x86_64/libzip5-1.5.1-1.el6.remi.x86_64.rpm
2. rpm安装: rpm -ivh libzip5-1.5.1-1.el6.remi.x86_64.rpm
方法2:
#下载编译安装
wget https://libzip.org/download/libzip-1.3.0.tar.gz
tar -zxvf libzip-1.3.0.tar.gz
cd libzip-1.3.0
./configure
make && make install
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
报错configure: error: off_t undefined; check your library configuration
解决方案:
or
Starting php-fpm /opt/php73/sbin/php-fpm: error while loading shared libraries: libzip.so.5: cannot open shared object file: No such file or directory
failed
# 添加搜索路径到配置文件
echo '/usr/local/lib64
/usr/local/lib
/usr/lib
/usr/lib64'>>/etc/ld.so.conf
# 更新配置
ldconfig -v
报错configure: error: Please reinstall the libzip distributio 或 configure: error: system libzip must be upgraded to version >= 0.11。
解决方案:
yum remove libzip -y
wget https://nih.at/libzip/libzip-1.2.0.tar.gz
tar -zxvf libzip-1.2.0.tar.gz
cd libzip-1.2.0
./configure
make && make install
# cmake 和 cmake3都要安装
yum install -y cmake
yum install -y cmake3
wget https://libzip.org/download/libzip-1.5.0.tar.gz
tar -zxvf libzip-1.5*
cd libzip-1.5*
mkdir build && cd build && cmake3 .. && make && make install
报错/usr/local/include/zip.h:59:21: fatal error: zipconf.h: No such file or directory
解决方案:
cp /usr/local/lib/libzip/include/zipconf.h /usr/local/include/zipconf.h
报错/package/php-7.3.7/ext/zip/php_zip.c:3318:48: error: ‘LIBZIP_VERSION’ undeclared (first use in this function)
解决方案:
重新正确安装 libzip
[root@BobServerStation twemproxy]# autoconf
configure.ac:8: error: Autoconf version 2.64 or higher is required
configure.ac:8: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
Redis 扩展安装:
git clone https://github.com/igbinary/igbinary.git
whereis php
phpize && ./configure CFLAGS="-O2 -g" --enable-igbinary --with-php-config=/opt/php73/bin/php-config
make -j4 && make install
git clone https://github.com/nicolasff/phpredis.git
cd phpredis/
phpize && ./configure CFLAGS="-O2 -g" --enable-redis-igbinary --with-php-config=/opt/php73/bin/php-config && make -j4 && sudo make install
php-config
php --ini
vim /usr/local/php/etc/php.ini
ls /usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/
ll
yum install libtool
查询当前版本
rpm -qf /usr/bin/autoconf
autoconf-2.63-5.1.el6.noarch
卸载当前版本
rpm -e --nodeps autoconf-2.63
安装最新版本
wget ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.68.tar.gz
tar zxvf autoconf-2.68.tar.gz
cd autoconf-2.68
./configure --prefix=/usr/
make && make install
查看当前版本
/usr/bin/autoconf -V
autoconf (GNU Autoconf) 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
,
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
至此,autoconf已升级到2.68。
安装memcahce 扩展:
然后就去翻查了一下资料,pecl好像不支持安装memcache扩展。这样只能找其他办法解决了,在期间也踩了很多坑,后来找到了一个github上的可支持php7的memcache扩展
接下来就是安装步骤了:
拉去memcache扩展
cd /usr/local/src/
git clone https://github.com/websupport-sk/pecl-memcache
编译安装memcache扩展
cd pecl-memcache/
/usr/local/php/bin/phpize
./configure --with-php-config=/usr/local/php/bin/php-config
make && make install
Installing shared extensions: /usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/
上面已经安装完成memcache扩展,接下来把它加入php.ini中
vim /etc/php.ini
extension_dir = "/usr/local/php7/lib/php/extensions/no-debug-non-zts-20160303/"
extension = "memcache.so"
重启php-fpm使配置生效
/etc/init.d/php-fpm reload
mcrypt 在 php7.1 就废弃了.
@since4.0.2@since5.0@deprecated7.1
wget https://pecl.php.net/get/mcrypt-1.0.3.tgz
tar -xvf mcrypt-1.0.3.tgz
cd mcrypt-1.0.3
/opt/php73/bin/phpize
./configure --with-php-config=/opt/php73/bin/php-config
make && make install
php的mcypt,php 7.3 在Centos6.x下的安装过程相关推荐
- Centos6/7下静默安装oracle10g
Centos6/7下静默安装Oracle10g 远程安装oracle10g,通过网上资料,不断摸索成功安装.先在本地虚拟机Centos7上做实验,快照恢复快照恢复,安装了几十次成功之后,再在服务器Ce ...
- Linux(CentOS6.5)下编译安装Nginx1.10.1
原文出自:http://www.cnblogs.com/comexchan/p/5815753.html Linux(CentOS6.5)下编译安装Nginx1.10.1 首先在特权账号(root)下 ...
- mysql5.6.22编译安装教程_Linux CentOS6.0下编译安装MySQL 5.6.22
Linux CentOS6.5下编译安装MySQL 5.6.22[给力详细教程] 一.编译安装MySQL前的准备工作 安装编译源码所需的工具和库(安装过程注意有没出错) yum install gcc ...
- centos6.3下yum安装redis
我得是centos 6.3,如果直接用yum安装redis,报错,如下: [root@CentOS6 etc]# yum install redis Loaded plugins: fastestmi ...
- CentOS6.5下RabbitMQ安装
1.操作系统环境 操作系统:CentOS6.5 / 64bit 用户:root 2.RabbitMQ编译安装 RabbitMQ是使用Erlang开发,所以安装RabbitMQ前需要先安装Erlang. ...
- centos6.4安装java,CentOS6.4下YUM安装MySQL和JDK和Tomcat
1.检查可用的安装包 1.1.检查java安装包yum search java 显示如下: 1.2.tomcat安装包yum search tomcat 显示如下: 1.3.检查mysql安装包yum ...
- CentOS6.5下Redis安装与配置
2019独角兽企业重金招聘Python工程师标准>>> 本文详细介绍redis单机单实例安装与配置,服务及开机自启动.如有不对的地方,欢迎大家拍砖o(∩_∩)o (以下配置基于Cen ...
- centos6.9下php7安装zip扩展
cd /usr/local/src wget http://pecl.php.net/get/zip-1.13.5.tgz tar -zxvf zip-1.13.5.tgz cd zip-1.13.5 ...
- CentOs6.5下独立安装Nginx篇
一.检查系统是否安装了Nginx [root@localhost local]# find -name nginx [root@localhost local]# (如果已经安装了nginx就卸载掉原 ...
最新文章
- Solr环境搭建及IK分词的集成及solrJ的调用(一)
- WPF中Binding使用StringFormat格式化字符串方法
- Wince输入法换肤换语言机制
- java打印sql表_java程序获得SqlServer数据表的表结构
- c语言数据结构学习心得——线性表
- 多客户端异步通讯框架
- php深浅拷贝,JavaScript 中的深浅拷贝
- PWA(Progressive Web App)入门系列:安装 Web 应用
- 励志!86岁的他,申请获得国家自然科学基金!
- 定时器和promise_从Promise链理解EventLoop
- spark 数据框 删除列_pandas 常用的数据处理函数
- 你还在用虚拟机,win10自带的linux还有图形界面(小白教程)
- PostgreSQL的 initdb 源代码分析之十六
- 解决问题---docker:transport: dial unix:///var/run/docker/containerd/docker-containerd.sock: time
- ORB-SLAM 解读(六)ORB特征点构建BoW
- python绘制函数x^2+y^2的3D图像
- WHQL之无需HLK结果就可获得微软驱动数字签名+Cannot specify [ClassInstall32] section解决
- [Linux]history命令用法详解
- SAP 录屏 BDC
- greenplum-cc-web4.0监控安装
热门文章
- python安装caffe_Caffe安装笔记二:Caffe安装过程
- python request库_【Python爬虫】Request库入门
- 计算机网络项目实训教程课后答案,计算机网络项目实训教程
- can通讯bdc_宝马总线K-CAN3和K-CAN4常见案例
- 正在读取软件包列表... 有错误!
- 串口通讯编程一日通1(整合资料) .
- 神经网络与深度学习——TensorFlow2.0实战(笔记)(四)(python列表与元组)
- LSGO软件技术团队2015~2016学年第十一周(1109~1115)总结
- 【转】WPF中关于样式和模板的区别
- 第二十二节: 以SQLServer为例介绍数据库自有的锁机制(共享锁、更新锁、排它锁等)和事务隔离级别 :