参照了N多个安装教程,最新的系统,最新的软件终于运行起来了。感谢所有无私奉献的人。[2006-1-24 23:07]
如果发现下载不了的文件也可直接向我要 ggg[at]zggo.com QQ:632519
安装环境
linux Fedora v4.0
在安装 mysq 5 时发现下载编译后的安装包始终不能成功。后下载源码包自己编译。经过漫长等待竟然安全地运行了。
phpMyAdmin2.7 乱码解决方法
修改 select_lang.lib.php
250行
'gb2312' => 'latin1',
165行
'zh-gb2312'
改为
'zh-gb2312-utf-8'
[下载地址]
php 5.1.2
http://cn2.php.net/get/php-5.1.2.tar.gz/from/a/mirror
http://cn.php.net/distributions/php-5.1.2.tar.gz
apache 2.2.0
http://apache.justdn.org/httpd/httpd-2.2.0.tar.gz
Zend
http://ftp.superuser.co.kr/pub/ZendOptimizer/
http://ftp.superuser.co.kr/pub/ZendOptimizer/ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz
zend的最新版安装是好像有点问题,就下载这个版本就可以
libxml2-2.X.X.tar.gz
http://xmlsoft.org/sources/?C=N;O=A
http://xmlsoft.org/sources/libxml2-2.6.19.tar.gz
zlib-1.X.X.tar.gz
http://www.zlib.net/zlib-1.2.3.tar.gz
jpegsrc.v6b.tar.gz
ftp://ftp.uu.net/graphics/jpeg/
libpng
http://www.libpng.org/pub/png/libpng.html
http://prdownloads.sourceforge.net/libpng/libpng-1.2.8-config.tar.gz?download
freetype2-X.X.tar.gz
http://www.fretype.org
http://prdownloads.sourceforge.net/freetype/freetype-2.1.9.tar.gz?use_mirror=jaist
http://jaist.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
mod_limitipconn
http://dominia.org/djao/limit/mod_limitipconn-0.22-1.i386.rpm
http://dominia.org/djao/limit/mod_limitipconn-0.22.tar.gz
xpm-3.4k-2.i386.rpm
http://linux.maruhn.com/sec/xpm.html
ftp://ftp.openpkg.org/sources/DST/xpm/xpm-3.4k.tar.gz
[安装 apache 2.2.0]
mkdir /soft/webserver/apache2
wget http://apache.justdn.org/httpd/httpd-2.2.0.tar.gz
tar zxvf httpd-2.2.0.tar.gz
cd httpd-2.2.0
./configure --prefix=/soft/webserver/apache2 --enable-so --enable-mods-shared=most
make
make install
编辑apache配置文件httpd.conf
vi /soft/webserver/apache2/conf/httpd.conf
加入以下代码
#------------------- 开始 --------------------------
AddType application/x-httpd-php .php
DirectoryIndex index.html index.php
########### php5 定义 ###########
LoadModule php5_module modules/libphp5.so
DirectoryIndex index.html index.php
#-------------------- 结束 ------------------------
找到
# don't use Group #-1 on these systems!
把下面的用户名和组改为
User apache
Group apache
(原来好像是nobody)
再找
#ServerName
把#去掉,后面的IP改成你的IP.
找到
DocumentRoot "/soft/webserver/apache2/htdocs"
把/soft/webserver/apache2/htdocs改为你存放网页文件的路径
DocumentRoot "/www"
这里要改
<Directory "/www">
这里也要改
为了让中文网页没乱码
找到
AddDefaultCharset iso8859-1
把后面的iso8859-1改为gb2312 或者是干脆off
保存httpd.conf文件.
启动apache
# /soft/webserver/apache2/bin/apachectl start
如果没有出错,写一个测试页放到你网页目录下.访问就应该可以看到php的版本等信息了!
[安装mod_limitipconn] 摘自 "碧轩居" http://spaces.msn.com/members/bixuan/Blog/cns!1ppP_O7hwmq-eqCGykDJf1XA!343.entry
1. 下载
wget -c http://dominia.org/djao/limit/mod_limitipconn-0.22-1.i386.rpm
或者:
wget -c http://dominia.org/djao/limit/mod_limitipconn-0.22.tar.gz
2. 安装
rpm -Uvh mod_limitipconn-0.22-1.i386.rpm
或者:
tar zxvf mod_limitipconn-0.22.tar.gz
cd mod_limitipconn-0.22
make install
3.配置
在httpd.conf里头修改成:
ExtendedStatus On
LoadModule limitipconn_module modules/mod_limitipconn.so
# 以下这段可以加在全局配置立也可以加在单个虚拟主机里
<IfModule mod_limitipconn.c>
<Location /> #虚拟主机的/目录
MaxConnPerIP 3 #每IP只允许3个并发连接
NoIPLimit image/* #对图片不做IP限制
</Location>
<Location /mp3> # 虚拟主机的/mp3目录
MaxConnPerIP 1 #每IP只允许1个并发连接
# In this case, all MIME types other than audio/mpeg and video*
# are exempt from the limit check
OnlyIPLimit audio/mpeg video
# 只对视频和音频格式的文件进行限制
</Location>
</IfModule>
CustomLog /var/log/httpd/access_log common env=!LIMITIP
4. 重新起动apache
apache2/bin/apachectl start
[安装XPM]
wget ftp://ftp.openpkg.org/sources/DST/xpm/xpm-3.4k.tar.gz
./configure --prefix=/soft/webserver/xpm
[安装libxml]
wget http://xmlsoft.org/sources/libxml2-2.6.19.tar.gz
tar zxfv libxml2-2.6.19.tar.gz
cd libxml2-2.6.19
./configure --prefix=/soft/webserver/libxml
(xml默认安装就可以,不要指定路径了,因为安装时php可能找不到它,PHP5只支持libxml2-2.5.10以上版本)
make
make install
[安装zlib]
wget http://www.zlib.net/zlib-1.2.3.tar.gz
tar zxfv zlib-1.2.3.tar.gz
cd zlib-1.2.3
./configure --prefix=/soft/webserver/zlib2
(注意,如果您以前没有安装zlib,可以不指定路径,我是没有删除以前的低版本才指定的!以下雷同!)
make
make install
[安装jpeg]
wget ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
tar zxfv jpegsrc.v6b.tar.gz
mkdir /soft/webserver/jpeg6
mkdir /soft/webserver/jpeg6/include
mkdir /soft/webserver/jpeg6/lib
mkdir /soft/webserver/jpeg6/bin
mkdir /soft/webserver/jpeg6/man/
mkdir /soft/webserver/jpeg6/man/man1/
./configure --prefix=/soft/webserver/jpeg6
make
make install
[安装libpng]
wget http://jaist.dl.sourceforge.net/sourceforge/libpng/libpng-1.2.8-config.tar.gz
tar zxfv libpng-1.2.8-config.tar.gz
cd libpng-1.2.8-config
./configure --prefix=/soft/webserver/libpng2
make
make install
[安装freetype]
wget http://jaist.dl.sourceforge.net/sourceforge/freetype/freetype-2.1.9.tar.gz
tar zxfv freetype-2.1.9.tar.gz
cd freetype-2.1.9
./configure --prefix=/soft/webserver/freetype2
make
make install
[安装gd库]
wget http://www.boutell.com/gd/http/gd-2.0.33.tar.gz
tar zxfv gd-2.0.33.tar.gz
cd gd-2.0.33
./configure --prefix=/soft/webserver/gd2 --with-zlib=/soft/webserver/zlib2/ --with-png=/soft/webserver/libpng2/ --with-jpeg=/soft/webserver/jpeg6/ --with-freetype=/soft/webserver/freetype2/
(请指定及格插件的安装路径,否则安装php的时候可能出错!)
make
make install
[安装Zend]
wget http://ftp.superuser.co.kr/pub/ZendOptimizer/ZendOptimizer-2.5.3-linux-glibc21-i386.tar.gz
解压后执行进入目录执行
./install.sh
一步一步下来,当出现:
Enter the location of your php.ini file
的提示时,输入:/soft/webserver/php/etc
[安装php5]
mkdir /soft/webserver/php5
wget http://cn.php.net/distributions/php-5.1.2.tar.gz
tar zxvf php-5.1.2.tar.gz
cd php-5.1.2
./configure --prefix=/soft/webserver/php5 --with-apxs2=/soft/webserver/apache2/bin/apxs --with-jpeg-dir=/soft/webserver/jpeg6/ --with-png-dir=/soft/webserver/libpng2/ --with-gd=/soft/webserver/gd2/ --with-freetype-dir=/soft/webserver/freetype2/ --enable-trace-vars --with-zlib-dir=/soft/webserver/zlib2/ -with-mysql=/soft/webserver/mysql
make
make install
cp php.ini-dist /soft/webserver/php5/lib/php.ini
[安装mysql]
wget http://www.greatlinux.com/mysql/Downloads/MySQL-5.1/mysql-max-5.1.5-alpha-linux-ia64-icc-glibc23.tar.gz
tar zxvf mysql-max-5.1.5-alpha-linux-ia64-icc-glibc23.tar.gz
./configure --prefix=/soft/webserver/mysql5
make
make install
导入库文件
cd /soft/webserver/mysql5
scripts/mysql_install_db --user=mysql
添加mysql用户及用户组
groupadd mysql
useradd -g mysql mysql
chown -R root .
chown -R mysql data
chgrp -R mysql .
cp /soft/webserver/mysql5/support-files/my-medium.cnf /etc/my.cnf
启动
bin/mysqld_safe --user=mysql &
重设密码
mysqladmin -u root -p password "newpassword"
root 没有密码的时候可以
mysqladmin -uroot password 'newpassword'
if root have password
mysqladmin -uroot -poldpasword password 'newpassword'