標籤:
1. 環境安裝:nginx安裝 nginx-1.5.7php安裝 PHP 5.4.10 (cli) (built: Jul 30 2014 16:45:08)mysql安裝 Ver 14.14 Distrib 5.5.30icu安裝 yum install icuautomake 安裝 yum install automakeicu lib安裝wget http://download.icu-project.org/files/icu4c/53.1/icu4c-53_1-src.tgztar -zxvf icu4c-53_1-src.tgzcd icu/source./configure --prefix=/usr/local/icumake && make install yum install autoconfpecl install intlicu位置填 /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 = "[email protected]";$wgPasswordSender = "[email protected]";$wgSMTP = array( ‘host‘ => ‘smtp.qq.com‘, ‘IDHost‘ => ‘qq.com‘, ‘port‘ => ‘25‘, ‘auth‘ => true, ‘username‘ => ‘[email protected]‘, ‘password‘ => ‘mypassword‘,);
[email protected]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.2[email protected]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