RHEL5下的mediawiki安装

背景:
Red Hat Enterprise Linux Server release 5.2 (Tikanga)
Apache 2.0.61 已编译安装好
mysql 5.1.35 已编译安装好

step1)下载并解压php5

wget http://cn2.php.net/get/php-5.3.0.tar.bz2/from/cn.php.net/mirror

tar jxvf php-5.3.0.tar.bz2

cd php-5.3.0

step2)编译安装php5(如果你需要安装带GD库的php5,直接跳到step3)
./configure --with-apxs2=/path/to/apache_home/bin/apxs --with-mysql

出现configure: error: xml2-config not found. Please check your libxml2 installation.
同过以下步骤
wget ftp://ftp.pbone.net/mirror/ftp.pld-linux.org/dists/2.0/PLD/i386/PLD/RPMS/zlib-devel-1.2.3-3.i386.rpm
wget ftp://ftp.nluug.nl/pub/os/Linux/distr/startcom/AS-5.0.0/os/i386/StartCom/RPMS/libxml2-devel-2.6.26-2.1.2.i386.rpm

rpm -ivh zlib-devel-1.2.3-3.i386.rpm
rpm -ivh libxml2-devel-2.6.26-2.1.2.i386.rpm

上面的错误消失

又出现下面的错误
configure: error: Cannot find MySQL header files under yes.
系统找不到mysql.h
由于本系统是不是通过rpm安装,mysql的头文件不在默认安装位置,所以必须指定
于是./configure --with-apxs2=/path/to/apache_home/bin/apxs --with-mysql=/path/to/mysql_home

ok

make && make install

安装完成会有如下信息


最后cp php.ini-development /usr/local/lib/php.ini


step3)编译安装php5(带GD库)(如果不需GD库,此步骤忽略)


安装gd
wget ftp://ftp.rediris.es/volumes/vol3/scientificlinux.org/scientific/51/x86_64/SL/libpng-devel-1.2.10-7.1.el5_0.1.i386.rpm
rpm -ivh libpng-devel-1.2.10-7.1.el5_0.1.i386.rpm

wget ftp://ftp.rediris.es/volumes/vol2/ftp.trustix.org/pub/trustix/releases/trustix-2.0/i586/trustix/rpms/libjpeg-devel-6b-2tr.i586.rpm
rpm -ivh libjpeg-devel-6b-2tr.i586.rpm

重新编译安装php5

./configure --with-apxs2=/path/to/apache_home/bin/apxs --with-mysql=/path/to/mysql_home --with-gd --with-jpeg-dir --with-png-dir

make && make install

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

step 4)修改apache配置

在httpd.conf中加入
LoadModule php5_module modules/libphp5.so
<FilesMatch "\.ph(p[2-6]?|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>

step 5)下载mediawiki
wget http://download.wikimedia.org/mediawiki/1.15/mediawiki-1.15.1.tar.gz
tar zxvf mediawiki-1.15.1.tar.gz

在你的apache doc root 做个软链到mediawiki-1.15.1
cd /path/to/apache/docroot
ln -s /path/to/mediawiki-1.15.1 mediawiki

step 6) 配置mediawiki
重启apache
http://your_host/mediawiki/config/index.php 开始配置

成功信息


按照上面提示
cp config/LocalSettings.php .(当前目录是/path/to/mediawiki-1.15.1)

你可能感兴趣的:(apache,mysql,PHP,linux,ext)