标签:
安装环境:
libxml2-2.6.26
linux Centos6.2 + nginx/1.10.1 + mysql 5.1.73 + PHP 5.3.3
1. 安装libxml2
通过yum安装:
yum -y install libxml2
或者通过手动编译安装:
wget http://xmlsoft.org/sources/old/libxml2-2.6.26.tar.gz
tar xvf libxml2-2.6.26.tar.gz
cd libxml2-2.6.26
./configure --prefix=/usr/local/libxml2/
make
make install
如果安装失败:make uninstall
2. 安装mysql、php
yum install mysql-server mysql
service mysqld start
yum -y install php
3. 安装、配置nginx
server {
listen 8089;
server_name 172.24.190.13;
access_log /var/log/nginx/wiki-access.log;
error_log /var/log/nginx/wiki-error.log;
charset utf-8;
root /var/www/wiki;
#error_page 404 /404.html;
#让http请求重定向到https请求
error_page 497 https://$server_name$request_uri;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache‘s document root
# concurs with nginx‘s one
#
#location ~ /\.ht {
# deny all;
#}
location /{
root /var/www/wiki;
index index.php index.html index.htm;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/wiki$fastcgi_script_name;
include fastcgi_params;
}
location /resource/ {
root /data/www/wiki;
}
}
4. 获取mediawiki
wget https://releases.wikimedia.org/mediawiki/1.27/mediawiki-1.27.0.tar.gz --no-check-certificate
tar -xvf mediawiki-1.27.0.tar.gz
mv mediawiki-1.27.0 mediawiki
将mediawiki文件夹放置到
标签:
原文地址:http://www.cnblogs.com/li-xingtao/p/5796883.html