ubuntu 9.0.4 安装mediawiki

step1) 安装apache2
sudo apt-get install apache2


step2) 安装mysql
sudo apt-get install mysql-server mysql-client

安装完成是 会出现界面提示你输入 密码

安装完成后,mysql会自动启动

通过 netstat -lnp|grep 3306可发现mysql在 监听
通过 ps aux|grep mysql也可发现mysql相关进程


step3) 安装php5
sudo apt-get install php5 php5-mysql

重要的安装过程信息:
Creating config file /etc/php5/apache2/php.ini with new version

此过程会设置好mod-php:
在/etc/apache2/mods-enabled 产生两个软链
php5.conf -> ../mods-available/php5.conf
php5.load -> ../mods-available/php5.load


step4) 安装图片处理工具GD library(可选)
sudo apt-get install libgd2-xpm libgd2-xpm-dev php5-gd


step5) 安装mediawiki
sudo apt-get install mediawiki

step6) 配置wikimedia
sudo vim /etc/mediawiki/apache.conf

#Alias /mediawiki /var/lib/mediawiki
的注释去掉



step7)设置wikimedia
重启apache,访问http://localhost/mediawiki/ ,上面有个链接http://localhost/mediawiki/config/index.php,
可以通过这个链接进行设置

遇到一个小问题
访问http://localhost/mediawiki/config/index.php 总是提示下载php文件,
而用IP访问或者通过 http://localhost/mediawiki/config 就能正确访问

设置好后出现如下信息:

# Database type: MySQL
# Loading class: DatabaseMysql
# Attempting to connect to database server as root...success.
# Connected to 5.0.75-0ubuntu10.2; enabling MySQL 4.1/5.0 charset mode
# Attempting to create database...
# Created database wikidb
# Creating tables... done.
# Initializing statistics...
# Granting user permissions to wikiuser on wikidb...success.
# Created sysop account pwlazy.
#

Creating LocalSettings.php...ls /

Installation successful! Move /var/lib/mediawiki/config/LocalSettings.php to /etc/mediawiki, then follow this link to your wiki.

You should change file permissions for LocalSettings.php as required to prevent other users on the server reading passwords and altering configuration data.


安装成功提示信息,将生成的LocalSettings.php mv
mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki

会在/etc/apache2/conf.d 目录下产生mediawiki.conf

step8)

最后访问http://127.0.0.1/mediawiki/index.php

你可能感兴趣的:(apache,mysql,PHP,ubuntu,vim)