百度空间 | 百度首页 
               
 
查看文章
 
安装apache+mysql+php+gd+png+zlib+jpeg+freetype
2006年09月08日 星期五 14:00
1、安装MYSQL:到http://www.mysql.com/下载。
     rpm -ivh MySQL-server-4.1.10a-0.i386.rpm
     rpm -ivh MySQL-client-4.1.10a-0.i386.rpm
     rpm -ivh MySQL-shared-compat-4.1.10a-0.i386.rpm
     rpm -ivh MySQL-devel-4.1.10a-0.i386.rpm
10、./safe_mysqld & (启动)
11、./mysqladmin -u root password "new-password"(新密码,缺省没有密码)
12、[jpeg-6b]:JPEG图像的函数库。
  cd jpeg-6d
./configure   make   make test   make install

13、[zlib-1.2.1]:压缩算法库
   cd zlib-1.2.1
  ./configure

make test make install

14、[freetype-2.1.9]:字体库,在图像上使用字体的时候需要用到
   cd freetype-2.1.9
./configure --prefix=/usr/local   make   make install

15、[libpng-1.2.5]:PNG图像的函数库
   cd libpng-1.2.5
  cp scripts/makefile.linux makefile
  make test
  pngtest pngnow.png 
  (如果都通过测试了,请继续。否则,看看错误提示,改正错误)
  make install

16、[gd-2.0.27]:GD库,用来动态生成图像。
17、[apache_1.3.27]:步骤一 ./configure --prefix=/usr/local/apache

   cd gd-1.8.4
./configure
make
make install


18、[libxml]:xml库,XML解析器。

   tar zxf libxml2-2.6.11.tar.gz
   cd libxml2-2.6.11
   ./configure --prefix=/usr/local
   make
make install


18、[libxslt]:libxslt库。

   tar zxf libxslt-1.1.9.tar.gz
   cd libxslt-1.1.9
   ./configure --with-libxml-prefix=/usr/local --with-libxml-include-prefix=/usr/local/include --with-libxml-libs-prefix=/usr/local/lib
   make
make install


18、[curl]:curl库。

   tar zxf curl-7.12.1.tar.gz
   cd curl-7.12.1
   ./configure 
   make
make install

19、[php-4.3.11]:

  如果不是第一次安装,请删除:config.cache文件,然后执行先执行make clean

  接下来配置环境,输入命令:


  ./configure --prefix=/usr/local/php 
--with-apxs=/usr/local/apache/bin/apxs
--with-config-file-path=/usr/local/apache/conf
--with-enable-versioning --with-mysql
--enable-ftp
--with-gd=../gd-2.0.27
--with-disable-debug
--enable-memory-limit
--enable-track-vars
--with-zlib
--with-jpeg-dir=../jpeg-6b
--with-png-dir=../libpng-1.2.5
--with-freetype-dir=../freetype-2.1.9
--with-xml
--with-iconv
--with-curlwrappers
--with-curl
--with-dom
--with-dom-xslt=../libxslt-1.1.9
make
make install

如果出现configure: error: libjpeg.(a|so) not found.
那么 cp ../jpeg-6b/libjpeg.a /usr/lib

如果出现configure: error: Unable to find libgd.(a|so) anywhere under ../gd-2.0.27

那么 cp /usr/local/lib/libgd.a ../gd-2.0.27

如果在make时出现/usr/local/include/libxslt/xsltInternals.h:20:25: libxml/dict.h: No such file or directory

那么cp /usr/local/include/libxml2/libxml/* /usr/local/include/libxml2/

20、修改配置:

  编辑/usr/local/apache/conf/httpd.conf文件,增加一行,使apache支持php工作


  AddType application/x-httpd-php .php

21、检查一下配置文件是否正确。
                /usr/local/apache/bin/apachectl configtest

22、启动apache服务器
               /usr/lcoal/apache/bin/apachectl start  

 23、在/usr/local/apache/htdocs建立一个test.php文件包含下列内容:

  <?
    phpinfo();
  ?>

24、访问一下test.php会出现php的配置总汇,前面编译的模块都在的主就OK了。


类别:服务器相关 | 添加到搜藏 | 浏览() | 评论 (0)
 
最近读者:
 
网友评论:
发表评论:
姓 名:
网址或邮箱: (选填)
内 容:
验证码: 请点击后输入四位验证码,字母不区分大小写
      

     

©2009 Baidu