发新话题
打印

[原创]REDHAT9安装PHP-MYSQL-GD-TTF-LIBPNP等

[原创]REDHAT9安装PHP-MYSQL-GD-TTF-LIBPNP等

Linux RedHat 9.0 Mysql5.1.0+apache2.2.4+PHP5.1
自己写的不知道怎么,请大家多指教。


Linux RedHat 9.0 Mysql5.1.0+apache2.2.4+PHP5.1

1.
安装Mysql

首先先看看系统是有已经安装gcc这个编译软件

# gcc –v

Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

再看看yacc是否安装
#rpm –qa | grep yacc
byacc-1.9-25

接下来我们还要安装perl-DBI这个软件
#rpm -ivh
perl-DBI.xxxx.rpm


接下来开始安装MYSQL
MySQL-client-5.1.21-0.glibc23.i386.rpm

MySQL-devel-5.1.21-0.glibc23.i386.rpm
MySQL-server-5.1.21-0.glibc23.i386.rpm

MySQL-shared-5.1.21-0.glibc23.i386.rpm
MySQL-shared-compat-5.1.21-0.glibc23.i386.rpm
#rpm –ivh MySQL-server-5.1.21-0.glibc23.i386.rpm
#rpm –ivh MySQL-client-5.1.21-0.glibc23.i386.rpm
#rpm –ivh MySQL-devel-5.1.21-0.glibc23.i386.rpm
#rpm –ivh MySQL-shared-5.1.21-0.glibc23.i386.rpm
#rpm –ivh MySQL-shared-compat-5.1.21-0.glibc23.i386.rpm
安装完成后,运行一下试试
#mysql
Welcome to the MySQL monitor.
Commands end with ; or \g.

Your MySQL connection id is 1
Server version: 5.1.21-beta MySQL Community Server (GPL)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql>

3.安装apache
#tar zxvf httpd-2.2.4.tar.gz
编译文件
#./configure –prefix=/etc/httpd –enable-module=so
#make
#make install
安装完成就可以启动APACHE服务器了
#/etc/httpd/bin/apachectl start
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
这个是没有域名的原因,我们需要修改一点地方就可以了
#vi /etc/httpd/conf/httpd.conf
找到:ServerName www.example.com:80 改为:本机IP:80
#cp httpd /usr/sbin/
#cp /etc/httpd/bin/apachectl /usr/sbin/httpd
#cp /etc/httpd/bin/apachectl /etc/rc.d/init.d/httpd



接下来安装GD库分为6个步骤
1.jpeg
2.ttf
3.zlib
4.libpnp
5.xpm
6.GD

A.jpeg安装
#tar zxvf jpegsrc.v6b.tar.gz
#./configure
#make
#mkdir –p /usr/local/man/man1
#make install
#make install-lib

B.TTF安装
#tar zxvf freetype-2.3.5.tar.gz
#./configure
编译文件
#make
#make install

C.zlib的安装
#tar zxvf zlib.1.2.3.tar.gz
#./configure
#make
#make install

D.libpnp的安装
#tar zxvf libpnp.1.2.12.tar.gz
#./configure
#make
#make install

E.gd库安装
#tar zxvf gd-2.0.28.tar.gz
#./configure
#make
#make install
#cp gd.h /usr/local/lib/

F.libxml2安装
#tar zxvf libxml2-2.6.30.tar.gz
#./configure
#make
#make install

安装PHP
#tar zxvf php-5.2.3.tar.gz
#./configure --prefix=/usr/local/php --with-apxs2=/etc/httpd/bin/apxs --with-gd --with-jpeg-dir --with-ttf --with-zlib-dir --with-png-dir --with-mysql --enable-track-vars
#make
#make install

#chomd 755 /etc/httpd/modules/libphp5.so
#cp php.ini-dist /usr/local/php/lib/php.ini

#vi /etc/httpd/conf/httpd.conf
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

安装Zend
#tar zxvf ZendOptimizer-3.3.0-linux.i386.tar.gz
#./install.sh
选择php.ini的路径
还有apachectl的路径

完成
本帖最近评分记录
  • robin 威望 +10 2007-12-2 19:09

TOP

交流QQ群2:16142493
智能手机软件下载
PHP新手不可错过一帖
PHP新手如何获得积分
论坛需要你,我们大家需要你!

TOP

发新话题