php-5.4.4,安装PHPphp-5.4.4 [email protected] [email protected] Web程序 - 贪吃蛇学院-专业IT技术平台...

一、下载PHPphp-5.4.4

[[email protected] software]# pwd

/software

[[email protected] software]# wget http://mirrors.sohu.com/php/php-5.4.44.tar.gz

二、解压php-5.4.44.tar.gz

[[email protected] software]# tar -xzvf php-5.4.44.tar.gz

三、./configure   make   make install

[[email protected] php-5.4.44]# pwd

/software/php-5.4.44

[[email protected] php-5.4.44]# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-libxml-dir --with-gd --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-zlib-dir --with-bz2 --with-openssl --with-mcrypt --enable-soap --enable-gd-native-ttf --enable-mbstring --enable-sockets --enable-exif --disable-ipv6 --with-curl --with-openssl --with-zlib-dir --enable-ftp

make

make install

四、源码安装 Apache+PHP 整合

整合 apache+php 环境,修改 httpd.conf 配置文件,然后加入如下语句:

LoadModule php5_module modules/libphp5.so (默认已存在)

AddType application/x-httpd-php .php

DirectoryIndex index.php index.html (把 index.php 加入 index.html 之前)

五、然后在/usr/local/apache/htdocs 目录下创建 index.php 测试页面,执行如下 命令:

cat >>/usr/local/apache/htdocs/index.php < EOF

重新启动 apache 服务,通过 IP 访问界面如下图,即代表 LAMP 环境搭建成功。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值