Apache+PHP+GD+Mysql安装

| |
[不指定 2005/02/03 23:14 | by ipaddr ]
安装环境:RHEL3 Update 3.

1.安装Mysql
下载:
MySQL-client-4.0.20-0.i386.rpm
MySQL-devel-4.0.20-0.i386.rpm
MySQL-server-4.0.20-0.i386.rpm
MySQL-shared-compat-4.0.20-0.i386.rpm
安装:
rpm -Uvh MySQL*.rpm

2.安装Apache
下载:
httpd-2.0.52.tar.gz
安装:
#tar zxvf httpd-2.0.52.tar.gz
#cd httpd-2.0.52
#./configure --enable-module=so
#make
#make install

//修改服务器指纹:
#vi include/ap_release.h
AP_SERVER_MAJORVERSION主版本号
AP_SERVER_MINORVERSION次版本号
AP_SERVER_PATCHLEVEL最次版本号

配置:
#ln -s /usr/local/apache2 /usr/local/apache
#cd /usr/local/apache/
#vi conf/httpd.conf
User apache
Group apache
ServerAdmin ipaddr(at)163.com
ServerName www.ipaddr.com
将<Directory>中的 Options -Indexes
ServerSignature Off
注释#AliasMatch ^/manual
AddDefaultCharset Off
模仿/etc/init.d/下面的文件,利用apachectl写一个启动脚本,放在init.d下面,再
chkconfig --add httpd
chkconfig httpd on


3.安装PHP
A.安装GD库,
可以在RHEL的光盘里找到以下RPM包,
fontconfig-2.2.1-13.i386.rpm
freetype-devel-2.1.4-4.0.i386.rpm
imap-2002d-9.i386.rpm
imap-devel-2002d-9.i386.rpm
libjpeg-devel-6b-30.i386.rpm
libpng-devel-1.2.2-25.i386.rpm
pcre-devel-3.9-10.i386.rpm

#rpm -ivh *.rpm

B.安装PHP
./configure --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-gd --with-zlib --with-png --with-jpeg --with-freetype --enable-sockets --enable-ftp
make
make install

更多PHP选项,请参考资料

//修改PHP版本信息
在./configure后,修改main/php_version.php里面的版本信息,再make,make install.

C.修改Apahce配置
加上:
AddType application/x-httpd-php .php
修改PHP配置



Net | 评论(0) | 引用(0) | 阅读(5313)