经过多次安装,将linux4AS下的php+apache+mysql+gd库安装过程多次修订,整理如下:

一、 系统及软件版本问题:

1、 操作系统:Linux AS U2 (advanced server update 2)

2、

apache:httpd-2.0.54.tar.gz;下载地址:http://www.apache.org/

3、 php:php-4.3.0.tar.gz

;可以安装更高的php-4.4以上版本,为了兼容老程序,不要安装php-5

;下载地址:http://www.php.net/

4、

mysql:mysql-4.1.20.tar.gz;下载地址:http://www.mysql.com/

5、 zlib:zlib-1.2.3.tar.gz;下载地址:http://www.ijg.org/

6、

libpng-1.2.8.tar.gz;下载地址:http://sourceforge.net/projects/libpng/

7、

freetype-2.1.10.tar.gz载地址:http://sourceforge.net/projects/freetype/

8、 jpeg:jpegsrc.v6b.tar.gz;下载地址:http://www.ijg.org/

9、

gd:gd-2.0.33.tar.gz;下载地址:http://www.boutell.com/gd/

10、 libxml:libxml2-2.6.26.tar.gz;下载地址:暂无

二、 安装过程:

1、 mysql:

# rpm -e mysql --nodeps

# cd /usr/local

# tar zxvf mysql-4.1.20.tar.gz

# cd mysql-4.1.20

# groupadd mysql //添加用户组

# useradd mysql -g mysql //添加用户及属于哪个组

#./configure --prefix=/usr/local/mysql --with-charset=gbk

--with-extra-charsets=utf8 //编译

# make

# make install

# cd /usr/local/mysql-4.0.20-rc/scripts

#./mysql_install_db //安装mysql服务

# chown -R root:mysql /usr/local/mysql//修改权限

# chown -R mysql:mysql /usr/local/mysql/var

# chgrp -R mysql /usr/local/mysql

# cd /usr/local/mysql-4.0.20-rc/support-files/my-medium.cnf

/etc/my.cnf//创建启动文件

# cp /usr/local/share/mysql/mysql.server

/usr/local/mysql/share/mysql/mysql 将启动mysql服务更改名字

# chmod a+x /usr/local/mysql/share/mysql/mysql

启动服务方法

# /opt/mysql/bin/safe_mysqld --user=mysql &

或者

# /opt/mysql/share/mysql/mysql start

停止服务方法

# /opt/mysql/share/mysql/mysql stop

### 完毕

2、 apache:

本安装方法是可以单独升级 apache 的

安装步骤:

# cd /usr/local

# tar tzvf httpd-2.0.54.tar.gz

# cd httpd-2.0.54

#./configure --prefix=/usr/local/apache --enable-shared=max

--enable-module=most

# make

# make install

# cd /usr/local/apache/bin

#./apachectl start//此步骤在重新启动后使用

# vi /etc/rc.d/rc.local

在末尾添加

# /usr/local/apache/bin/apachectl start

//将来升级方法为

# /usr/local/apache/bin/apachectl stop

# cd /usr/local/apche

升级高版本的步骤

#./configure --prefix=/usr/local/apache --enable-shared=max

--enable-module=most

# make

# make install

### 完毕

3、 libxml:

在安装前,先卸载默认 libxml rpm 包,卸载方法如下:

先查询是否安装此包

# rpm -q libxml

# rpm -e libxml --nodeps

;先不要卸载,因为只有安装php5才需要高版本libxml,安装php4的不要装libxml

然后安装 libxml源码包

版本:libxml2-2.6.26.tar.gz

步骤:

# tar zxvf libxml2-2.6.26.tar.gz

# cd /usr/local/libxml2-2.6.26.tar

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

# make

# make install

4、 zlib:

# cd usr/local

# tar zxvf zlib-1.2.2.tar.gz

# cd zlib-1.2.2

#./configure –prefix=/usr/local/zlib

# make

# make install

5、 libpng:

# tar zxvf libpng-1.2.7.tar.tar

# cd libpng-1.2.7

# cd scripts/

# mv makefile.linux ../makefile

# cd ..

# make

# make install

注意,这里的makefile不是用./configure生成,而是直接从scripts/里拷一个,在安装gd库时也不能指定安装路径

6、 freetype:

# cd /usr/local

# tar zxvf freetype-2.1.9.tar.gz

# cd freetype-2.1.9

#./configure –prefix=/usr/local/freetype

# make

# make install

7、 jpeg:

建立目录:

# 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

# cd /usr/local

# tar -zvxf jpegsrc.v6b.tar.gz

# cd jpeg-6b

# ./configure --prefix=/usr/local/jpeg6/ --enable-shared

;加载共享参数

# make;

# make install

8、 gd:

# cd /usr/local

# tar -zvxf gd-2.0.33.tar.gz

# cd gd-2.0.33

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

--with-jpeg-dir=/usr/local/jpeg/

--with-png

--with-zlib-dir=/usr/local/zlib/

--with-freetype-dir=/usr/local/freetype/

# make;

# make install

9、 php:

# cd /usr/local

# tar zxvf php-4.3.0.tar.gz

# cd /usr/local/php-.4.3.0

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

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

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

--with-libxml-dir=/usr/local/libxml

--with-jpeg-dir=/usr/local/jpeg

--with-png

--with-zlib-dir=/usr/local/zlib

--with-freetype-dir=/usr/local/freetype

--with-gd-dir=/usr/local/gd

# make

# make install

###补充说明

安装php时肯可能用到的补丁

#./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

#make

#make install

三、 注意事项

1、

在安装服务器事,选择开发工具组件,因为里面包含里安装其它软件时所需的gcc库。

2、

在安装gd库时,顺序安装软件:zlibàlibpngàfreetypeàjpegàgd,特别注意libpng的安装方法与安装gd库时加载libphp的方法与其它软件不一样,不用指定安装路径(默认安装路径)

3、

只有安装php5才需要高版本libxml,安装php4的不要装libxml

四、 如何判断安装是否成功

1、 如何判断gd库的附件已经安装成功,在编译gd时请仔细查看:

#./configure

配置完成后,注意输出的信息是否如下:

** Configuration summary for gd 2.0.15:

Support for PNG library: yes

Support for JPEG library: yes

Support for Freetype 2.x library: yes

Support for Xpm library: no

Xpm库以前安装不成功,如果程序部门不常用用,一般PNG/JPEG/FREETYPE三个库打开支持就行

2、 如何判断php + mysql + apache + gd安装成功

运行 phpinfo();

查看编译php时是否有一下参数:

Build Date Dec 30 2005 12:00:10 ;看一下更新日期

Configure Command './configure' '--prefix=/usr/local/php'

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

'--with-jpeg-dir=/usr/local/jpeg6/' '--with-png'

'--with-gd=/usr/local/gd2/'

'--with-freetype-dir=/usr/local/freetype2/' '--enable-trace-vars'

'--with-zlib' '--with-mysql' ;看一下参数是否齐全

3、 如何判断gd是否安装成功

运行 phpinfo();

gd;在gd这一栏,正常情况下应该显示9项,最后一项不知道什么意思

GD Support enabled

GD Version 2.0 or higher

FreeType Support enabled

FreeType Linkage with freetype

GIF Read Support enabled

GIF Create Support enabled

JPG Support enabled

PNG Support enabled

WBMP Support enabled ;此项不知道是哪个软件显示的

gdbm mysql函数库_linux4AS下的php+apache+mysql+gd库安装修订版相关推荐

  1. win7 php mysql环境,在win7下搭建php+apache+mysql环境

    虽然已经有很多博客介绍如何搭建php 环境 ,但是本人今天试了下还是觉得挺费劲,网上很多都说的不全面,特将今天搭建 环境 的过程记录下来,以方便后人. 第0步:安装Apache服务器 我使用的2.2版 ...

  2. fedora mysql 操作系统,Fedora 15 上使用php+apache+mysql+phpMyAdmin+eyeos

    Fedora 15 下使用php+apache+mysql+phpMyAdmin+eyeos 使用phpMyAdmin管理mysql: // 安装相关套件 sudo yum install php m ...

  3. g++ 编译mysql动态库_Linux下g++编译以及使用静态库和动态库的方法详解

    下面小编就为大家带来一篇Linux下g++编译与使用静态库和动态库的方法.小编觉得挺不错的,现在就分享给大家,也给大家做个参考.一起跟随小编过来看看吧 在windows环境下,我们通常在IDE如VS的 ...

  4. 在win7下搭建php+apache+mysql环境

    虽然已经有很多博客介绍如何搭建php环境,但是本人今天试了下还是觉得挺费劲,网上很多都说的不全面,特将今天搭建环境的过程记录下来,以方便后人. 第0步:安装Apache服务器 我使用的2.2版本,安装 ...

  5. PHP编译为静态库,Linux下将Tinyxml编译为静态库

    转载请注明来源:Linux下将Tinyxml编译为静态库 一个应用需要在linux服务器上运行,不能保证每个服务器都有应用依赖的库,又懒得每个服务器都去安装下,也不太现实,于是就将应用所用到的库全部编 ...

  6. linux php mysql.so_在linux下php挂接mysql.so扩展的方法

    总结的方向:在linux下php挂接mysql.so扩展的方法 问题背景:平常我们都是先安装mysql,然后才能去安装php.假如先安装php,后安装mysql,由于php需要连接mysql,因而在p ...

  7. mac 下搭建 php + apache + mysql 服务器(cool)

    之前做.net 网站.后转ios .所有很少接触windows 啦.但有时候自己还真需要个测试的服务器环境.干脆把自己电脑搞成服务器得了 下面贴上链接: Apache+PHP+Mysql OS X 1 ...

  8. MySQL在Django框架下的基本操作(MySQL在Linux下配置)

    注:本文已迁移至CSDN,后续的更新也会在CSDN. http://blog.csdn.net/houchaoqun_xmu/article/details/53813633 http://blog. ...

  9. mysql函数返回表类型_如何从MySQL函数返回表?

    您不能从MySQL函数返回表.该函数可以返回字符串,整数,字符等.要从MySQL返回表,请使用存储过程,而不是函数. 让我们首先创建一个表-mysql> create table DemoTab ...

最新文章

  1. iPhone开发技巧之工具篇(4)--- 使用afconvert转换WAV文件
  2. 分块的单点修改查询区间和_树状数组的区间修改与单点查询与区间查询
  3. 在centos上安装最新的glibc
  4. AttributeError: module 'tensorflow' has no attribute 'random_normal'
  5. ppi 各代iphone_算算你的手机 高PPI屏幕显示强机推荐
  6. java logger 静态,java11教程--公共静态接口System.Logger
  7. 【渝粤教育】广东开放大学 数据结构 形成性考核 (24)
  8. 平面/UI设计师社区交流网站集设|给你的作品多一个展示机会
  9. 大道至简——第二章读后感
  10. mac Desktop 在Terminal 无法访问,错误提示:ls: .: Operation not permitted
  11. 下载win7原版ios系统文件
  12. 常用的VBA代码参考
  13. mysql数据库repair_MySQL数据库中的REPAIRTABLE语法介绍
  14. 【论文速读】【金融】Predicting stock and stock price index movement using ... and machine learning techniques
  15. ERROR 1227 (42000): Access denied; you need (at least one of) the SUPER privilege(s) for this operat
  16. LCCUP 22秋季编程大赛
  17. PDF如何在线转换成PPT呢?
  18. 蝴蝶为花碎,花却随风飞
  19. 2016.05.04,英语,《Vocabulary Builder》Unit 22
  20. 基于SSM实现高校教材预定管理系统-毕业设计【附源码】

热门文章

  1. 如何在上位机电脑上模拟优傲机器人UR robot 编程
  2. iOS开发-提交应用时,评级的翻译
  3. Oracle Study学习之--Flashback Archive
  4. 地壳中元素含量排名记忆口诀_地球的地壳元素含量排名和产量.doc
  5. 【深度学习】Beam Search原理和实现、闲聊机器人优化
  6. 微信小程序连接后端接口时的wx.request写法
  7. 电脑网络看不到其它计算机,电脑看不到局域网其他计算机怎么办_电脑看不到局域网其他计算机的处理方法-系统城...
  8. Java 简单实现银行业务
  9. c++STL标准模板库(关联式容器(set,multiset容器))
  10. Hadoop(三)之实验一CentOS7配置Hadoop系统:安装 Hadoop3.1.2