Home >php教程 >php手册 >centos下安装php

centos下安装php

WBOY
WBOYOriginal
2016-06-06 20:00:231385browse

一、下载安装php软件包 yum install php php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml 二、编写apache配置文件,把你的php项目进行添加,如你的php项目保存在/var/www/fusionpbx下,访问的虚拟目录为fusionpbx时,

一、下载安装php软件包

yum install php php-common php-gd php-mcrypt php-pear php-pecl-memcache php-mhash php-mysql php-xml

二、编写apache配置文件,把你的php项目进行添加,如你的php项目保存在/var/www/fusionpbx下,访问的虚拟目录为fusionpbx时,则用vim /etc/httpd/conf/httpd.conf打开配置文件进行配置,在httpd.conf文件的最末尾加上以下代码:


Alias /fusionpbx "/var/www/fusionpbx"
<directory>
   Options Indexes FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
</directory>


保存后,用/etc/init.d/httpd restart 来重启apache服务,然后打开浏览器进行测试验证,如:

http://192.168.1.70/fusionpbx/index.php



Statement:
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