Centos 7 下Apache2.4关联php5.6.10
2015-07-02 18:31
627 查看
准备文件:
上传到服务器,保存到usr/local/bin/soft/php_linux/php-5.6.10.tar.bz2
1,安装步骤:
1.1解压
# tar jxvf php-5.6.10.tar.bz2
1.2配置
#./configure –prefix=/work/installed/php –with-apxs2=/work/installed/apache/bin/apxs –with-config-file-path=/usr/local/php –enable-xml –disable-rpath –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –enable-mbregex –enable-fpm –enable-mbstring –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-xmlrpc –enable-zip –enable-soap –enable-opcache –with-pdo-mysql –enable-maintainer-zts
在配置中可能会出现以下错误:
是因为缺少依赖包,执行以下命令即可:
#yum install libxml2 libxml2-devel
#yum install openssl openssl-devel
#yum install curl curl-devel
#yum install libjpeg libjpeg-devel libpng libpng-devel
安装完成后可以:
#make
#make install
2.修改apache2.4的httpd.conf
将DirectoryIndex index.html改为DirectoryIndex index.html index.php
并在类似的地方加上AddType application/x-httpd-php .php
保存退出。
重启服务器
上传到服务器,保存到usr/local/bin/soft/php_linux/php-5.6.10.tar.bz2
1,安装步骤:
1.1解压
# tar jxvf php-5.6.10.tar.bz2
1.2配置
#./configure –prefix=/work/installed/php –with-apxs2=/work/installed/apache/bin/apxs –with-config-file-path=/usr/local/php –enable-xml –disable-rpath –enable-bcmath –enable-shmop –enable-sysvsem –enable-inline-optimization –with-curl –enable-mbregex –enable-fpm –enable-mbstring –with-gd –enable-gd-native-ttf –with-openssl –with-mhash –enable-pcntl –enable-sockets –with-xmlrpc –enable-zip –enable-soap –enable-opcache –with-pdo-mysql –enable-maintainer-zts
在配置中可能会出现以下错误:
“configure: error: xml2-config not found. Please check your libxml2 installation.” “configure: error: Cannot find OpenSSL's” “checking for cURL in default path... not found configure: error: Please reinstall the libcurl distribution - easy.h should be in /include/curl/” “checking for the location of libjpeg... no checking for the location of libpng... no checking for the location of libXpm... no checking for FreeType 2... no checking for T1lib support... no checking whether to enable truetype string function in GD... yes checking whether to enable JIS-mapped Japanese font support in GD... no If configure fails try --with-vpx-dir= If configure fails try --with-jpeg-dir= configure: error: png.h not found.”
是因为缺少依赖包,执行以下命令即可:
#yum install libxml2 libxml2-devel
#yum install openssl openssl-devel
#yum install curl curl-devel
#yum install libjpeg libjpeg-devel libpng libpng-devel
安装完成后可以:
#make
#make install
2.修改apache2.4的httpd.conf
将DirectoryIndex index.html改为DirectoryIndex index.html index.php
并在类似的地方加上AddType application/x-httpd-php .php
保存退出。
重启服务器
相关文章推荐
- Linux下apache源码安装
- Linux服务篇之三:构建Apache服务器
- 安装新版xampp后apache无法启动提示:Apache Service detected with wrong path解决方案
- Apache ServiceMix 介绍
- Zend Studio 如何配置本地apache服务器使用xdebug调试php脚本
- Apache JMeter安装说明
- Apache ServiceMix应用之深入Apache Camel
- Apache ServiceMix 初探
- php 5.6.10V11 apache 2.4.12 V14配置
- Centos 7环境下Apache 2.4服务器搭建
- Apache JK集群环境session丢失问题
- Apache Kafka —一个不同的消息系统
- apache防止目录列表漏洞
- apache在ubuntu的配置(apt-get 安装)
- 重启Apache报错
- 安装xampp后apache不能启动解决方法
- 禁掉Apache web server签名 How to turn off server signature on Apache web server
- 配置apache和php mysql的一些问题
- Linux Debian系统配置LAMP(Apache, MySQL, PHP)网站环境详解
- apache如何解决跨域资源访问