分享web开发知识

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

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

php安装

发布时间:2023-09-06 01:44责任编辑:胡小海关键词:暂无标签
安装php5

cd /usr/local/src/
wget http://cn2.php.net/distributions/php-5.6.30.tar.gz
tar zxf php-5.6.30.tar.gz
cd php-5.6.30
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php/etc ?--with-mysql=/usr/local/mysql --with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif

提示
configure: error: xml2-config not found. Please check your libxml2 installation.

解决方法: yum install -y libxml2-devel

提示:

解决方法:yum install -y openssl-devel

提示:
configure: error: Please reinstall the BZip2 distribution
解决方法:yum install -y bzip2-devel

提示:configure: error: jpeglib.h not found.
解决方法:yum install -y libjpeg-devel

提示:configure: error: png.h not found.
解决方法:yum install -y libpng-devel

提示:configure: error: freetype-config not found.
解决方法:yum install -y freetype-devel

提示:configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决方法:
yum install -y epel-release
yum install -y libmcrypt-devel
问题解决

make
make install

拷贝配置文件到目录下
cp php.ini-production /usr/local/php/etc/php.ini

配置php7
cd /usr/local/src/
wget http://cn2.php.net/distributions/php-7.1.6.tar.bz2
tar zxf php-7.1.6.tar.bz2
cd php-7.1.6
./configure --prefix=/usr/local/php7 --with-apxs2=/usr/local/apache2.4/bin/apxs --with-config-file-path=/usr/local/php7/etc ?--with-pdo-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif
make && make install
ls /usr/local/apache2.4/modules/libphp7.so
du -sh !$
查看apache加载的php
cp php.ini-production ?/usr/local/php7/etc/php.ini

php安装

原文地址:http://blog.51cto.com/13528516/2074117

知识推荐

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