首页 > 学院 > 操作系统 > 正文

apache安装php

2024-06-28 16:04:48
字体:
来源:转载
供稿:网友
1.install php 5.3.27所需要的库yum install zlib-devel libxm12-devel libjpeg-devel libiconv-devel -y检查安装的包rpm -qa zlib-devel libxm12-devel libjpeg-devel libiconv-develzlib-devel-1.2.3-29.el6.x86_64yum  install freetype-devel libpng-devel gd-devel curl-devel libxslt-devel -y检查安装的包:rpm -qa freetype-devel libpng-devel gd-devel libcurl-devel libxslt-develgd-devel-2.0.35-11.el6.x86_64freetype-devel-2.3.11-17.el6.x86_64libpng-devel-1.2.49-2.el6_7.x86_64libxslt-devel-1.1.26-2.el6_3.1.x86_64 yum install libmcrypt-devel mhash mhash-devel mcrypt -y检查安装的包: rpm -qa libmcrypt-devel mhash mhash-devel mcrypt mcrypt-2.6.8-10.el6.x86_64libmcrypt-devel-2.5.8-9.el6.x86_64mhash-0.9.9.9-3.el6.x86_64mhash-devel-0.9.9.9-3.el6.x86_64

其他的库没有进行安装的使用编译安装。。。。。

–获得安装包,从网上直接下载或者其他途径,这里直接wget# wgethttp://curl.haxx.se/download/curl-7.17.1.tar.gz–解压到当前目录# tar -zxf curl-7.17.1.tar.gz–进入解压后的目录内# cd curl-7.17.1–配置,指定安装的目录,这里是“/usr/local/curl”# ./configure –PRefix=/usr/local/curl–# make–安装# make install–安装完毕

使用:将curl命令加入环境变量,命令行里执行(仅对本会话起作用,或者在.bash_profile、.bashrc文件里配置环境变量):# export PATH=$PATH:/usr/local/curl/bin然后就可以使用了

其他的没有安装的包自己找源下载后编译安装。。。。

现在安装php:

cd /home/oldboy/tools/

wget http://mirrors.sohu.com/php/php-5.3.27.tar.gz

tar -zxf php-5.3.27.tar.gz 

cd php-5.3.27

./configure /

--prefix=/application/php5.3.27

--with-apxs2=/application/apache/bin/apxs

--with-MySQL=mysqlnd /

--with-pdo-mysql=mysqlnd  /

--with-iconv-dir=/usr/local/libiconv /

--with-freetype-dir /

--with-jpeg-dir /

--with-zlib /

--disable-rpath /

--enable-safe-mode /

--enable-bcmath /

--enable-shmop /

--enable-sysvsem /

--enable-inline-optimization /

--with-curl /

--with-curlwrappers /

--enable-mbstring /

--with-mcrypt /

--with-gd /

--enable--gd-native-ttf /

--with-openssl /

--with-mhash /

--enable-sockets /

--with-xmlrpc /

--enable-zip /

--enable-soap /

--enable-short-tags /

--enable-zend-multibyte /

--enable-static /

--with-xsl /

--enable-ftp


发表评论 共有0条评论
用户名: 密码:
验证码: 匿名发表