设为首页 友情链接
在线留言 发表文章
加入收藏 广告联系

刺猬首页

| 专案技术 | 网络技术 | 图形图象 | 网络编程 | 网页设计 | 操作系统 | 服务器 | 技术白皮书 | 在线实验室 | 刺猬论坛 |
小说专版  | 数据库 | 设计赏析 | 存储频道 | 网络安全 | 私服架设 |  Solaris | 网站评估 | PC维护技巧 | 下载中心 | 博 客 |
专   题: | Linux | java | cisco | 防病毒 | 刀片 | SOA | iscsi | ASP.NET | SQL | Oracle |
您现在的位置: IT公社 IT community >> Linux专题 >> 企业应用 >> 教程正文 用户登录 新用户注册
专 题 栏 目
最 新 热 门
最 新 推 荐
相 关 文 章
Linux Apache服务器系统…
Linux系统Apache用户授权…
如何测试和调试Linux的A…
Linux系统下Apache服务器…
在Unix服务器上设置Orac…
详细解析Apache服务器实…
教你用APF和BFD来加强Li…
在掌上电脑HP iPAQ上运行…
Slackware10汉化、美化
用Ndiswrapper在Linux中…
  Apache+PHP5.0+GD+Zend+Mysql的配置 (1)           
Apache+PHP5.0+GD+Zend+Mysql的配置 (1)
 

pache2.0+php5.0+gd+zend+mysql安装与配置

下面是我的一些配置经验,花了我三天时间才搞定。把他记录下来就算是对自己的一点奖励把。

所需软件包

Apache2.0.54

Php5.03

jpegsrc.v6b.tar.gz

libpng-1.2.8.tar.gz

freetype2-1.10.tar.gz

libxml2-2.tar.gz

gd-2.0.28.tar.gz

ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz

Mysql-4.1.11

libtiff-3.5.7

zlib-1.1.4

下载地址:

Apache v2.0.54 官方主页: http://www.apache.org

http://www.apache.org/dist/httpd/httpd-2.0.54.tar.gz

PHP v4.3.11 官方主页: http://www.php.net

http://cn.php.net/distributions/php-5.0.4.tar.gz

Zend Optimizer v3.0.01 官方主页: http://www.zend.com

http://downloads.zend.com/optimizer或者是在http://www.phpchina.cn/下载

GD Library v2.0.33 官方主页: http://www.boutell.com/gd/

http://www.boutell.com/gd/http/gd-2.0.33.tar.gz

FreeType v2.1.10 官方主页: http://www.freetype.org

http://savannah.nongnu.org/download/freetype/freetype-2.1.10.tar.gz

Jpeg v6b 官方主页: http://www.ijg.org

http://www.ijg.org/files/jpegsrc.v6b.tar.gz

LibPNG v1.2.8 官方主页: http://www.libpng.org/pub/png/

http://switch.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8.tar.gz

OpenSSL v0.9.7g 官方主页: http://www.openssl.org

http://www.openssl.org/source/openssl-0.9.7g.tar.gz

zlib v1.2.2 官方主页: http://www.gzip.org/zlib/

http://www.zlib.net/zlib-1.2.3.tar.gz

libxml2-2.6.tar.gz 官方主页:http://xmlsoft.org/downloads.html ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/

MySQL v4.0.24 官方主页: http://www.mysql.com

http://ftp.stu.edu.tw/pub/Unix/Database/Mysql/Downloads/MySQL-4.0/mysql-4.0.24.tar.gz

libtiff-3.5.7 下载地址:ftp://ftp.remotesensing.org/pub/libtiff/tiff-v3.5.7.tar.gz

也可以去rpmfind.net 上找rpm包.不过那样就可能需要devel包。

安装:

##### zlib #####

cd zlib-1.2.2

./configure

make

make install

cd ..

##### OpenSSL #####

cd openssl-0.9.7g

./config --prefix=/usr/local/ssl \

--openssldir=/usr/local/ssl \

shared \

zlib

make

make install

ln -s /usr/local/ssl /usr/lib/ssl

cd .. ##### MySQL #####

cd mysql-4.0.24

编辑 sql/mysqld.cc :

搜索:&max_connections, 0, GET_ULONG, REQUIRED_ARG, 100, 1, 16384, 0, 1,

修改:&max_connections, 0, GET_ULONG, REQUIRED_ARG, 1000, 1, 16384, 0, 1,

groupadd mysql

useradd -g mysql mysql

./configure \

--prefix=/server/mysql \

--sysconfdir=/server/mysql \

--without-isam \

--without-debug \

--enable-assembler \

--with-unix-socket-path=/tmp/mysql.sock \

--with-mysqld-user=mysql \

--with-extra-charset=all \

--with-client-ldflags=-all-static \

--with-mysqld-ldflags=-all-static \

--localstatedir=/data/mysql/data

如果出现了以下错误:

checking for tgetent in -ltermcap... no

checking for termcap functions library... configure: error: No curses/termcap library found

说明 curses/termcap 库没有安装

apt-cache search curses | grep lib

安装 libncurses5-dev ,然后重新运行配置

mkdir /data

mkdir /data/mysql

mkdir /data/mysql/data

make

make install

/server/mysql/bin/mysql_install_db --user=mysql

chown -R mysql /data/mysql

chgrp -R mysql /data/mysql

chown -R root /server/mysql

chgrp -R mysql /server/mysql

cp /server/mysql/share/mysql/my-medium.cnf /server/mysql/my.cnf

/server/mysql/share/mysql/mysql.server start

/server/mysql/bin/mysqladmin -u root password 123456789

cd ..

##### Apache2 #####

cd httpd-2.0.54

./configure --prefix=/usr/local/apache --enabe-so --enable-ssl(如果不修改默认参数就直接安装就可以了)

make

make install

cd ..

修改 Apache 配置文件 /server/httpd/conf/httpd.conf :

DirectoryIndex index.html index.php

找到AddType application/x-gzip .gz .tgz

加入:AddType application/x-httpd-php .php

保存就可以了。

cd freetype-2.1.10

./configure --prefix=/usr/local/freetype

make

make install

cd ..

##### LibPNG #####

cd libpng-1.2.8

cp scripts/makefile.linux makefile

make test

make install

cd ..

##### Jpeg #####

cd jpeg-6b

mkdir /usr/local/jpeg

mkdir /usr/local/jpeg/bin

mkdir /usr/local/jpeg/lib

mkdir /usr/local/jpeg/include

mkdir /usr/local/jpeg/man

mkdir /usr/local/jpeg/man/man1

./configure --prefix=/usr/local/jpeg --enable-shared

注意:这里configure一定要带--enable-shared参数,不然,不会生成共享库

make

make install

cd ..

##### GD Library #####

cd gd-2.0.33

./configure --prefix=/usr/local/gd \

--with-jpeg=/usr/local/jpeg \

--with-freetype=/usr/local/freetype \

--with-png \

--with-zlib

make

make install

cd ..

##### ClibPDF #####

cd ClibPDF/source

cp Makefile.Linux makefile

make

make install

cd ..

##### PHP #####

cd php-5.0.4

./configure \

--prefix=/usr/local/php \

--with-mysql=/usr/local/mysql \

--enable-force-cgi-redirect \

--with-freetype-dir=/usr \

--with-png-dir=/usr \

--with-gd --enable-gd-native-ttf \

--with-ttf \

--with-gdbm \

--with-gettext \

--with-iconv \

--with-jpeg-dir=/usr \

--with-png \

--with-zlib \

--with-xml \

--enable-calendar \

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

[1] [2] 下一页

频道声明:本频道的文章除部分特别声明禁止转载的专稿外,可以自由转载.但请务必注明出出处和原始作者 文章版权归本频道与文章作者所有.对于被频道转载文章的个人和网站,我们表示深深的谢意。

原始作者:佚名 录入时间:2007-3-31 2:17:10
信息来源:不详 投稿信箱:itqoo@126.com
教程录入:itqoo    责任编辑:itqoo 
  • 上一个教程:

  • 下一个教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)
    - 关于我们 - 合作伙伴 - 友情链接 - 广告刊登 - 投稿热线 - 在线留言版权声明联系方式 -
    IT公社版权所有 粤ICP备05127012号
    Copyrigh@2005-2006 itqoo.com.Inc All Rights Reserved  推荐分辨率 1024*768
    联系站长:E-Mail:itqoo@126.com     MSN:urchincc@hotmail.com    QQ:点击这里给我发消息
    特别感谢:亿太网络提供空间支持