Linux+php+apache+oracle环境搭建之CentOS下源码编译安装PHP
首先需要安装下面几个安装包,可以在CD-ROM数据源里找到以下安装包yum安装
yum install perl* freetype libpng* libxm2 libxm2-devel curl curl-devel libjpeg*
手动下载安装 jpegsrc.v8c.tar libmcrypt-2.5.8.tar.gz
安装 jpegsrc
# tar -xvzf jpegsrc.v8c.tar # cd jpeg-8c # ./configure --prefix=/usr/local/jpeg # make && make install
安装 libmcrypt
# tar -xvzf libmcrypt-2.5.8.tar.gz # cd libmcrypt-2.5.8 # ./configure --prefix-/usr/local/libmcrypt # make && makeinstall
安装PHP
# tar -xvzf php-5.5.10.tar.gz # cd php-5.5.10 # ./configure --prefix=/usr/local/php -with-apxs2=/usr/local/httpd/bin/apxs --with-curl --with-mcrypt --with-mbstring # make && make install
配置Apache支持PHP
修改 /usr/local/apache/conf/httpd.conf文件
在LoadModule项后面加入:
LoadModule php5_module modules/libphp5.so
在<IfModule mime_module></IfModule>之间加入
AddType application/x-httpd-php .php .phtml AddType application/x-httpd-php-source .phps AddHandler application/x-httpd-php .php
重启Apache服务
执行命令 # apachectl restart
测试PHP
在站点根目录下编写探针文件
# vi phpinfo.php
输入:
<?php phpinfo(); ?>
浏览器地址栏输入 http://192.168.23.131/phpinfo.php
显示如下信息:说明PHP安装成功。
相关推荐
Noneyes 2020-11-10
zyyjay 2020-11-09
xuebingnan 2020-11-05
samtrue 2020-11-22
stefan0 2020-11-22
yifangs 2020-10-13
songshijiazuaa 2020-09-24
hebiwtc 2020-09-18
天步 2020-09-17
83911535 2020-11-13
whatsyourname 2020-11-13
zhouyuqi 2020-11-10
mathchao 2020-10-28
王志龙 2020-10-28
wwwsurfphpseocom 2020-10-28
diskingchuan 2020-10-23
savorTheFlavor 2020-10-23