您所在的位置: 首页>>开发>>Web>>PHP>>

RedHat Linux9平台下搭建LAMP(Linux+Apache+Mysql+PHP)(4)

http://developer.51cto.com  2008-04-22 16:56  佚名  51CTO论坛整理  我要评论(0)
  • 摘要:今天我们来介绍一下如今最流行高效的LAMP架构的Linux服务器的安装配置。
  • 标签:LAMP  Linux  RedHat  Apache  Mysql  PHP

4、PHP的安装:

# tar xvjf  php-5.2.5.tar.bz2(注意这个是bz2格式的!!!!)

# cd php-5.2.5

# ./configure --prefix=/usr/local/php

--with-apxs2=/usr/local/apache/bin/apxs

--with-mysql

--with-libxml-dir

--with-png-dir

--with-jpeg-dir

--with-zlib

--with-freetype-dir

--with-gd

--with-curl

--disable-debug

--enable-sockets

--enable-force-cgi-redirect 

--with-config-file-path=/etc

--enable-magic-quotes

--enable-ftp

--enable-gd-native-ttf

-with-ttf --with-gdbm

--with-gettext

--with-iconv

--enable-mbstring=all

# make

# make instal

提示:如果一些图形库,例如gd库在你configure时,失败的话,那么在--with-gd后面加上“-dir”也许就能过去。这样做的目的是让程序自己检测其位置在哪里。当然啦,如果你安装这些图形库的时候指定了位置,在这里指定的话也可以的。

到这里PHP已经安装完毕了。

5、收尾工作:

编辑apache的配置文件httpd.conf

vi /etc/httpd/httpd.conf

找到“#AddType application/x-gzip .gz .tgz”

并在后面加入

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

这两行的目的是让apache识别php。

再找到“DirectoryIndex index.html”

加上 index.php 让它把index.php做为默认页


共5页: 上一页 [1] [2] [3] 4 [5] 下一页
【内容导航】
 第 1 页:软件需求及下地地址  第 2 页:Mysql和Apache的安装
 第 3 页:库软件包的安装  第 4 页:PHP的安装
 第 5 页:最后测试环境
LAMP技术精解
Sun以10亿美元并购开源数据库厂商MySQL
Linux——从菜鸟到高手
Linux/Solaris服务器的安全配置
MySQL5.0新品推介
 
 验证码: (点击刷新验证码)   匿名发表
  • Visual C++ 完全自学宝典

  • 作者:强锋科技,朱洪波
  • Visual C++ 6.0是微软公司为程序人员提供的Visual Studio 6.0工具套件中的重要组成部分。本书由浅入深地介绍使用Visual C++ 6.0..
Copyright©2005-2008 51CTO.COM 版权所有