栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

PHP安装

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

PHP安装

下载php:

[rot@localhost httpd-2.2.16]# cd /usr/local/src[root@localhost src]# wget http://am1.php.net/distributions/php-5.3.27.tar.gz

解压:

[root@localhost src]# tar zxf php-5.3.27.tar.gz

配置编译参数:

[root@localhost src]# cd php-5.3.27
[root@localhost php-5.3.27]# ./configure 

--prefix=/usr/local/php 

--with-apxs2=/usr/local/apache/bin/apxs 

--with-config-file-path=/usr/local/php/etc 
--with-mysql=/usr/local/mysql 
--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 
--disable-ipv6



error: jpeglib.h not found.

解决办法: yum install libjpeg-devel


error: mcrypt.h not found. Please reinstall libmcrypt.

解决办法: wget -P /etc/yum.repos.d/  http://mirrors.aliyun.com/repo/epel-6.repo

               yum install -y  libmcrypt-devel 

error: Please reinstall the BZip2 distribution

解决办法: yum install bzip2-devel.x86_64 -y

error: Cannot find OpenSSL's

解决办法: yum install openssl openssl-devel

               ln -s /usr/lib64/libssl.so /usr/lib/

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

解决办法:yum install libxml2-devel


error: mcrypt.h not found. Please reinstall libmcrypt”

解决方法:

解决办法一
1、安装第三方yum源
wget http://www.atomicorp.com/installers/atomic
sh ./atomic
2、使用yum命令安装

yum  install  php-mcrypt  libmcrypt  libmcrypt-devel

解决办法二、

使用php mcrypt 前必须先安装Libmcrypt

libmcrypt源码安装方法:


cd /usr/local/src

wget http://softlayer.dl.sourceforge.net/sourceforge/mcrypt/libmcrypt-2.5.8.tar.gz

tar -zxvf libmcrypt-2.5.8.tar.gz

cd /usr/local/src/libmcrypt-2.5.8

./configure --prefix=/usr/local

make

make install



configure: error: png.h not found.
复制代码 代码如下:
yum -y install libpng-devel

configure: error: freetype.h not found.
复制代码 代码如下:
yum -y install freetype-devel

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/230173.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号