分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 前端开发

php编译安装

发布时间:2023-09-06 01:30责任编辑:彭小芳关键词:编译

Centos6 环境:

yum install libxml2-devel curl-devel libpng-devel freetype-devel -y

./configure --prefix=/usr/local/php-7.x.x \
--with-mysqli=mysqlnd \
--with-jpeg-dir \
--with-png-dir \
--with-iconv-dir \
--with-freetype-dir \
--with-zlib \
--with-mhash \
--with-libxml-dir \
--with-curl \
--with-mcrypt \
--with-gd \
--with-openssl \
--enable-ftp \
--enable-xml \
--enable-sockets \
--enable-bcmath \
--enable-inline-optimization \
--enable-gd-native-ttf \
--enable-mbregex \
--enable-mbstring \
--enable-pcntl \
--enable-sockets \
--enable-fpm \
--enable-soap \
--enable-zip \
--enable-opcache

make -j24
make install

安装相关扩展:

第一种是使用pecl:

pecl install swoole
pecl install redis 

第二种是下载扩展源码安装:

#swoole编译,添加--enable-coroutine编译参数启用协程能力
git clone https://github.com/swoole/swoole-src.git
cd swoole-src/
phpize
./configure --with-php-config=/usr/local/php/bin/php-config --enable-coroutine
make && make install


相关错误记录:
configure: error: xml2-config not found. Please check your libxml2 installation.
=>yum install libxml2-devel -y

configure: error: Please reinstall the libcurl distribution -
=>yum -y install curl-devel

checking for jpeg_read_header in -ljpeg... yes
configure: error: png.h not found.
=>yum install libpng-devel -y


If configure fails try --with-xpm-dir=<DIR>
configure: error: freetype-config not found.
=>yum install freetype-devel -y

yum install libxml2-devel curl-devel libpng-devel freetype-devel -y

像这种安装部署的事情可以用Ansible或SaltStack固化下来,形成统一标准化配置。

php编译安装

原文地址:http://www.cnblogs.com/helloworld899/p/8043244.html

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved