首页 > 代码库 > media wiki run on nginx

media wiki run on nginx

1. 环境安装:
nginx安装 nginx-1.5.7
php安装 PHP 5.4.10 (cli) (built: Jul 30 2014 16:45:08)
mysql安装 Ver 14.14 Distrib 5.5.30
icu安装 yum install icu
automake 安装 yum install automake
icu lib安装
wget http://download.icu-project.org/files/icu4c/53.1/icu4c-53_1-src.tgz
tar -zxvf icu4c-53_1-src.tgz
cd icu/source
./configure --prefix=/usr/local/icu
make && make install
 
yum install autoconf
pecl install intl
icu位置填 /usr/local/icu
 
2. 在php.ini中添加
extension=intl.so
 
 技术分享
 
3. 安装WYSIWYG
下载地址:https://codeload.github.com/Mediawiki-wysiwyg/WYSIWYG-CKeditor/zip/CKeditor_v4
解压后,将WYSIWYG目录复制到/data/webroot/mediawiki/extensions/
技术分享
使用教程:http://codex.wordpress.org.cn/ 
 
4. 权限控制:LocalSettings.php
$wgGroupPermissions[‘*‘][‘edit‘] = false;#匿名用户不可写$wgGroupPermissions[‘*‘][‘read‘] = false;#匿名用户不可读$wgWhitelistRead = array( "Main Page", "Special:Userlogin" );#指定非登录用户可见页面$wgGroupPermissions[‘*‘][‘createaccount‘] = false;#限制新用户注册

链接在新窗口中打开

LocalSettings.php中设置:
$wgExternalLinkTarget = ‘_blank’;
外链不包括interwiki链接
 
5. 邮件发信配置 https://www.mediawiki.org/wiki/Manual:$wgSMTP 
/mediawiki/includes/DefaultSetting.php
$wgEnableUserEmail = true;$wgEnableEmail = true; /mediawiki/LocalSetting.php$wgEnableEmail = true;$wgEnableUserEmail = true; # UPO $wgEmergencyContact = "forilen@dawx.com";$wgPasswordSender = "cdn@dawx.com";$wgSMTP = array(        ‘host‘     => ‘smtp.qq.com‘,        ‘IDHost‘   => ‘qq.com‘,        ‘port‘     => ‘25‘,        ‘auth‘     => true,        ‘username‘ => ‘forilen@dawx.com‘,        ‘password‘ => ‘mypassword‘,);
 
root@192.168.100.252:/data/release/htdocs/mediawiki/includes# pear install MAIL Net_SMTPWARNING: "pear/Auth_SASL" is deprecated in favor of "pear/Auth_SASL2"Did not download optional dependencies: pear/Auth_SASL, use --alldeps to download automaticallypear/Net_SMTP can optionally use package "pear/Auth_SASL" (version >= 1.0.5)downloading Mail-1.2.0.tar ...Starting to download Mail-1.2.0.tar (Unknown size)..........................done: 119,296 bytesdownloading Net_SMTP-1.6.2.tar ...Starting to download Net_SMTP-1.6.2.tar (Unknown size)...done: 65,536 bytesdownloading Net_Socket-1.0.14.tar ...Starting to download Net_Socket-1.0.14.tar (Unknown size)...done: 24,576 bytesinstall ok: channel://pear.php.net/Mail-1.2.0install ok: channel://pear.php.net/Net_Socket-1.0.14install ok: channel://pear.php.net/Net_SMTP-1.6.2root@192.168.100.252:/data/release/htdocs/mediawiki/includes# pear listInstalled packages, channel pear.php.net:=========================================Package          Version StateArchive_Tar      1.3.7   stableConsole_Getopt   1.3.0   stableMail             1.2.0   stableNet_SMTP         1.6.2   stableNet_Socket       1.0.14  stablePEAR             1.9.4   stableStructures_Graph 1.0.4   stableXML_Util         1.2.1   stable

media wiki run on nginx