php 安装 --with-mysql,linux/mysql/php--with-gd的安装文档

【IT168 服务器学院】一, 所需软件:  apache_1.3.20.tar.gz

freetype-1.3.1.tgz

mysql-3.23.39.tar.gz

zlib-1.1.3.tar.gz

gd-with_gif-1.8.3-8.i586.rpm

gd-with_gif-1.8.3-8.src.rpm

gd-with_gif-devel-1.8.3-8.i586.rpm

gd-with_gif-progs-1.8.3-8.i586.rpm

二, 安装:

1, 在/usr/local下建一个目录soft

mkdir /usr/local/soft

2, 将上述所需的软件cp到/usr/local/soft

3, 压缩包解开

cd /usr/local/soft

tar.gz 用 tar –zxvf 文件名 来解开

tar –zxvf apache_1.3.20.tar.gz

tar –zxvf mysql-3.23.39.tar.gz

tar –zxvf zlib-1.1.3.tar.gz

tgz的文件,先建一个目录(freetype),用tar –zxvf freetype-1.3.1.tgz freetype来解开。

4, 安装gd的rpm包(按顺序,几个包之间有依赖关系)。

首先要先安装gd-with_gif-1.8.3-8.i586.rpm

rpm –i gd-with_gif-1.8.3-8.i586.rpm

然后

rpm –i gd-with_gif-1.8.3-8.src.rpm

rpm –i gd-with_gif-devel-1.8.3-8.i586.rpm

rpm –i gd-with_gif-progs-1.8.3-8.i586.rpm

5,安装mysql

cd mysql-3.23.39

./configure –prefix=/usr/local/mysql 把mysql安装到/usr/local/mysql

make

make install

cd /usr/local/mysql/bin

./mysql_install_db

../share/mysql/mysql.server start

./mysql 运行mysql改变root用户的密码、再增加一个ggaaoo用户口令

为123

mysql>set password for root=password(‘root123’);

mysql>grant all privileges

mysql>on *.*

mysql>to ggaaoo;

mysql> set password for ggaaoo=password(‘123’);

mysql>exit //退出mysql

6, apache和php的安装

先编译zlib,这是gd必须的一个东东

cd /usr/local/soft/ zlib-1.1.3

./configure

make

make install

cd /usr/local/soft/ apache_1.3.20

./configure –prefix=/usr/local/apache //强迫安装到/usr/local/apache目录下

cd ../php4.0.4

./configure –with-mysql=/usr/local/mysql –with-apache=../apache_1.3.20 --with-gd=/usr/gd-with_gif --with-jpeg-dir=/usr/local --with-ttf=../freetype --with-zlib=/usr/local --enable-track-vars

make

make install

cd ../apche_1.3.20

./configure --prefix=/server/apache --activate-module=src/modules/php4/libphp4.a

make

make install

安装完了

三、配置php/apache

cd ../php4.0.4

cp php.ini-dist /usr/local/lib/php.ini

cd /usr/local/lib

vi php.ini

修改:[mysql]下

mysql.default_port = 3306

mysql.default_host = localhost

mysql.default_user = root

cd /usr/local/apche/conf

vi httpd.conf

修改需要的选项

gd结果是

gd

GD Support Enabled

GD Version 1.6.2 or higher

FreeType Support Enabled

FreeType Linkage With TTF library

GIF Support Enabled

JPG Support Enabled

PNG Support Enabled

WBMP Support Enabled

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值