Home > php教程 > php手册 > [php]CentOS5.7+php5.3.8 用默认apache安装

[php]CentOS5.7+php5.3.8 用默认apache安装

WBOY
Release: 2016-06-06 19:54:21
Original
1158 people have browsed it

CentOS全部默认安装 按装GCC和设置防火墙 apache已经默认安装了。所以不需要再安装apache 检查一下有没有安装httpd-devel #rpm -qa | grep httpd-devel 如果没有安装,那需要安装一下 #rpm -ivh httpd-devel-2.2.3-53.el5.centos.x86_64.rpm 从官网下载php5.

  1. CentOS全部默认安装
  2. 按装GCC和设置防火墙

apache已经默认安装了。所以不需要再安装apache


检查一下有没有安装httpd-devel

#rpm -qa | grep httpd-devel


如果没有安装,那需要安装一下

#rpm -ivh httpd-devel-2.2.3-53.el5.centos.x86_64.rpm


从官网下载php5.3.8的安装包php-5.3.8.tar.bz2

#tar -xjvf php-5.3.8.tar.bz2
#cd php-5.3.8
#./configure --prefix=/usr/local/php5 --with-apxs2=/usr/sbin/apxs

如果这时候报错:configure: error: xml2-config not found. Please check your libxml2 installation.

那么看一下有没有安装libxml2-2.6.26-2.1.12.x86_64.rpm 和 libxml2-devel-2.6.26-2.1.12.x86_64.rpm

如果没有安装,安装一下就可以解决。


#make
#make install
#cp php.ini-development /usr/local/php5/php.ini


这时候会发现,Apache的配置文件(/ect/httpd/conf/httpd.conf)被修改了。

追加了

LoadModule php5_module        /usr/lib64/httpd/modules/libphp5.so

如果没有这一项的话,那要手动追加一下。


然后再追加一下

AddType application/x-httpd-php .php


最后重启apache






Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template