网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

centos下安装php

cd /usr/local/src/

创新互联自2013年起,先为宜阳等服务建站,宜阳等地企业,进行企业商务咨询服务。为宜阳企业网站制作PC+手机+微官网三网同步一站式服务解决您的所有建站问题。

wget  http://cn2.php.net/get/php-5.4.36.tar.bz2/from/this/mirror

mv mirror php-5.4.36.tar.bz2

tar jxf php-5.4.36.tar.bz2
cd php-5.4.36
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/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 

yum -y install libxml2-devel openssl openssl-devel  bzip2 bzip2-devel  libpng libpng-devel libjpeg libjpeg-devel freetype freetype-devel  install autoconf libmcrypt-devel  install perl gcc curl-devel

以下为遇到的报错信息及解决办法:

报错:

./configure: /usr/local/apache2/bin/apxs: /replace/with/path/to/perl/interpr 

解决方法:

yum -y install perl

vi /usr/local/apache/bin/apxs 

#!/replace/with/path/to/perl/interpreter -w 更改成 #!/usr/bin/perl即可。

报错:
configure: error: xml2-config not found. Please check your libxml2 installation.
解决办法是:
yum install -y libxml2-devel
还有错误:
configure: error: Cannot find OpenSSL's
解决办法是:
yum install -y openssl openssl-devel
错误:
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution
解决办法:
yum install -y bzip2 bzip2-devel
错误:
configure: error: png.h not found.
解决办法:
yum install -y libpng libpng-devel
错误:
configure: error: jpeglib.h not found.
解决办法:
yum install -y libjpeg libjpeg-devel
错误:
configure: error: freetype.h not found.
解决办法:
yum install -y freetype freetype-devel
错误:
configure: error: mcrypt.h not found. Please reinstall libmcrypt.
解决办法:
rpm -ivh "http://www.aminglinux.com/bbs/data/p_w_upload/forum/month_1211/epel-release-6-7.noarch.rpm"
yum install -y  libmcrypt-devel

安装 yum -y install autoconf

make
echo $?
make install
cp php.ini-production /usr/local/php/etc/php.ini
ls /usr/local/php/
ls /usr/local/apache2/modules/

/usr/local/php/bin/php -m(静态模块)

/usr/local/php/bin/php -i (配置文件)

注:动态模块需要自己编译


本文题目:centos下安装php
URL标题:http://bjjierui.cn/article/gopcoc.html

其他资讯