wiki configure for linux


1.1 Upgrade MediaWiki


backup wikidb

backup LocalSettings.php

backup original MediaWiki

backup original images folder (upload files)

backup original Skins

get new MediaWiki package

unpack MediaWiki

update wikiroot/AdminSettings.php

restore original extensions

restore original Skins

cd wikiroot/maintenance

php update.php php-cli
enjoy it
Required package Php-ldap

Html-doc

Php-client
1.2 setting for wiki
wikiuser wikiuser    821 2008-07-05 17:46 AdminSettings.php
-rw-r--r--  1 apache   apache     7674 2008-07-29 14:04 LocalSettings.php
<?php
  2
  3 # This file was automatically generated by the MediaWiki installer.
  4 # If you make manual changes, please keep track in case you need to
  5 # recreate them later.
  6 #
  7 # See includes/DefaultSettings.php for all configurable settings
  8 # and their default values, but don't forget to make changes in _this_
  9 # file, not there.
 10
 11 # If you customize your file layout, set $IP to the directory that contains
 12 # the other MediaWiki files. It will be used as a base to locate files.
 13 if( defined( 'MW_INSTALL_PATH' ) ) {
 14         $IP = MW_INSTALL_PATH;
 15 } else {
 16         $IP = dirname( __FILE__ );
 17 }
 18
 19 $path = array( $IP, "$IP/includes", "$IP/languages" );
 20 set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );
 21
 22 require_once( "includes/DefaultSettings.php" );
 23
 24 # If PHP's memory limit is very low, some operations may fail.
 25 # ini_set( 'memory_limit', '20M' );
 26
 27 if ( $wgCommandLineMode ) {
 28         if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
 29                 die( "This script. must be run from the command line\n" );
 30         }
 31 } elseif ( empty( $wgNoOutputBuffer ) ) {
 32         ## Compress output if the browser supports it
 33         if( !ini_get( 'zlib.output_compression' ) ) @ob_start( 'ob_gzhandler' );
 34 }
 35
 36 $wgSitename         = "MPEG Glossary";
 37
 38 $wgScriptPath       = "/wiki";
 39 $wgScript           = "$wgScriptPath/index.php";
 40 $wgRedirectScript   = "$wgScriptPath/redirect.php";
 41
 42 ## For more information on customizing the URLs please see:
 43 ## http://meta.wikimedia.org/wiki/Eliminating_index.php_from_the_url
 44 ## If using PHP as a CGI module, the ?title= style. usually must be used.
 45 $wgArticlePath      = "$wgScript/$1";
 46 # $wgArticlePath      = "$wgScript?title=$1";
 47
 48 $wgStylePath        = "$wgScriptPath/skins";
 49 $wgStyleDirectory   = "$IP/skins";
51 $wgLogo             = "$wgStylePath/common/images/mpeg_nokia.png";
 52
 53 $wgUploadPath       = "$wgScriptPath/images";
 54 $wgUploadDirectory  = "$IP/images";
 55
 56 $wgEnableEmail      = true;
 57 $wgEnableUserEmail  = true;
 58
 59 $wgEmergencyContact = "root@localhost";
 60 $wgPasswordSender = "root@localhost";
 61
 62 ## For a detailed description of the following switches see
 63 ## http://meta.wikimedia.org/Enotif and http://meta.wikimedia.org/Eauthent
 64 ## There are many more options for fine tuning available see
 65 ## /includes/DefaultSettings.php
 66 ## UPO means: this is also a user preference option
 67 $wgEnotifUserTalk = true; # UPO
 68 $wgEnotifWatchlist = true; # UPO
 69 $wgEmailAuthentication = true;
 70
 71 $wgDBtype           = "postgres";
 72 $wgDBserver         = "localhost";
 73 $wgDBname           = "wikidb";
 74 $wgDBuser           = "wikiuser";
 75 $wgDBpassword       = "123456";
 76 $wgDBport           = "5432";
 77 $wgDBprefix         = "";
 78
 79 # Schemas for Postgres
 80 $wgDBmwschema       = "mediawiki";
 81 $wgDBts2schema      = "public";
 82
 83 # Experimental charset support for MySQL 4.1/5.0.
 84 $wgDBmysql5 = false;
 85
 86 ## Shared memory settings
 87 $wgMainCacheType = CACHE_NONE;
 88 $wgMemCachedServers = array();
 89
 90 ## To enable image uploads, make sure the 'images' directory
 91 ## is writable, then set this to true:
 92 $wgEnableUploads       = true;
 93 $wgUseImageResize      = true;
 94 $wgUseImageMagick = true;
 95 $wgImageMagickConvertCommand = "/usr/bin/convert";
105 $wgUseTeX           = false;
106 $wgMathPath         = "{$wgUploadPath}/math";
107 $wgMathDirectory    = "{$wgUploadDirectory}/math";
108 $wgTmpDirectory     = "{$wgUploadDirectory}/tmp";
109
110 $wgLocalInterwiki   = $wgSitename;
111
112 $wgLanguageCode = "zh-tw";
113 #$wgLanguageCode = "en";
114 $wgUseDatabaseMessages = false;
115
116 $wgProxyKey = "d0f166c9527af7a8759ac441ada194af87cbd58c67e9487ef04752636961e1bf";
117
118 ## Default skin: you can change the default skin. Use the internal symbolic
119 ## names, ie 'standard', 'nostalgia', 'cologneblue', 'monobook':
120 $wgDefaultSkin = 'monobook';
121
122 ## For attaching licensing metadata to pages, and displaying an
123 ## appropriate copyright notice / icon. GNU Free Documentation
124 ## License and Creative Commons licenses are supported so far.
125 # $wgEnableCreativeCommonsRdf = true;
126 $wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
127 $wgRightsUrl = "";
128 $wgRightsText = "";
129 $wgRightsIcon = "";
130 # $wgRightsCode = ""; # Not yet used
131
132 $wgDiff3 = "/usr/bin/diff3";
133
134 # When you make changes to this configuration file, this will make
135 # sure that cached pages are cleared.
136 $configdate = gmdate( 'YmdHis', @filemtime( __FILE__ ) );
137 $wgCacheEpoch = max( $wgCacheEpoch, $configdate );
138
139 #require_once("$IP/extensions/FCKeditor/FCKeditor.php");
140 require_once("extensions/ExpandCss.php");
141 require_once("extensions/multilang.php");
142
143 $wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'svg', 'tif','xls','ppt','pdf', 'doc' );
144 $wgShowExceptionDetails = true;
145
146 require_once( 'extensions/LdapAuthentication.php' );
147 $wgAuth = new LdapAuthenticationPlugin();
148 $wgLDAPDomainNames = array( "MPECN","FIH" );
149 $wgLDAPServerNames = array( "MPECN"=>"cnsrv155.mpecn.fih.gd", "FIH"=>"cnsrv102.fih.gd");
150 $wgLDAPBaseDNs = array("MPECN"=>"dc=mpecn,dc=fih,dc=gd","FIH"=>"dc=fih,dc=gd");
151 $wgLDAPSearchStrings = array( "MPECN"=>"MPECN\\USER-NAME","FIH"=>"FIH\\USER-NAME");
152 $wgLDAPSearchAttributes = array( "MPECN"=>"sAMAccountName","FIH"=>"sAMAccountName");
153 $wgLDAPEncryptionType = array("MPECN"=>"ssl","FIH"=>"ssl");
154 $wgLDAPUseLocal = false;
155 $wgMinimalPasswordLength = 1;
156 $wgLDAPRetrievePrefs = false;
157
158 $wgLDAPGroupUseFullDN = array("MPECN"=>true);
159 $wgLDAPUseLDAPGroups = array("MPECN"=>true);
160 $wgLDAPLowerCaseUsername = array( "YICHI"=>true );
161 #$wgLDAPGroupBaseDNs = array( "MPECN"=>"ou=Groups,ou=LH,dc=mpecn,dc=fih,dc=gd", "FIH"=>"dc=fih,dc=gd" );
162 $wgLDAPGroupBaseDNs = array( "MPECN"=>"dc=mpecn,dc=fih,dc=gd", "FIH"=>"dc=fih,dc=gd" );
163 $wgLDAPGroupObjectclass = array("MPECN"=>"group","FIH"=>"group" );
164 $wgLDAPGroupAttribute = array("MPECN"=>"member" ,"FIH"=>"member");
165 $wgLDAPGroupNameAttribute = array( "MPECN"=>"cn","FIH"=>"cn" );
166 $wgLDAPGroupSearchNestedGroups = array("MPECN"=>false,"FIH"=>false);
167 #$wgLDAPRequiredGroups = array( "MPECN"=>array("cn=SP,ou=Groups,ou=LH,dc=mpecn,dc=fih,dc=gd")); //workable
168
169 $wgGroupPermissions['*']['createaccount'] = false;
170 $wgGroupPermissions['*']['edit'] = false;
171 $wgGroupPermissions['SP']['createaccount'] = true;
172 $wgGroupPermissions['IT']['createaccount'] = true;
173 $wgGroupPermissions['FKD']['createaccount'] = true;
174
175 # Group based access control
176 #require_once("extensions/accesscontrolSettings.php");
177 #include("extensions/accesscontrol.php");
178
179 require_once("extensions/PdfExport/PdfExport.php");
180 #require_once("extensions/CustomPermissions.php");
181 #$wgGroupDefaultAllow=true; //set to true to allow everyone access to pages without a category
182 #$wgCategoryExclusive=array("Category:FIH_MPEG_SP");//deny access to these categories for anyone not in the group
183 #$wgGroupPermissions['SP']['Category:FIH_MPEG_SP_read']=true;
184 #$wgGroupPermissions['SP']['Category:FIH_MPEG_SP_edit']=false;
185 #$wgGroupPermissions['SP']['Category:FIH_MPEG_SP_move']=false;
186 #$wgGroupPermissions['SP']['Category:FIH_MPEG_SP_create']=true;
187 #$wgGroupPermissions['SP']['*_read']=true; //allow access to all categories
188
189 #require_once( "$IP/extensions/ParseFunctions/ParseFunctions.php" );
190 require_once( "$IP/extensions/PerlDoc/PerlDoc.php" );
191 require_once( "$IP/extensions/Renameuser/SpecialRenameuser.php" );
192 require_once( "$IP/extensions/UserMerge/UserMerge.php" );
193 $wgGroupPermissions['bureaucrat']['usermerge'] = true;
cnsrv156 setting:
if( defined( 'MW_INSTALL_PATH' ) ) {
        $IP = MW_INSTALL_PATH;
} else {
        $IP = dirname( __FILE__ );
}

$path = array( $IP, "$IP/includes", "$IP/languages" );
set_include_path( implode( PATH_SEPARATOR, $path ) . PATH_SEPARATOR . get_include_path() );

require_once( "$IP/includes/DefaultSettings.php" );

# If PHP's memory limit is very low, some operations may fail.
# ini_set( 'memory_limit', '20M' );

if ( $wgCommandLineMode ) {
        if ( isset( $_SERVER ) && array_key_exists( 'REQUEST_METHOD', $_SERVER ) ) {
                die( "This script. must be run from the command line\n" );
        }
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;

$wgSitename         = "Wikipedia";

## The URL base path to the directory containing the wiki;
## defaults for all runtime URL paths are based off of this.
$wgScriptPath       = "/wiki";
$wgScriptExtension  = ".php";

## For more information on customizing the URLs please see:
## http://www.mediawiki.org/wiki/Manual:Short_URL

$wgEnableEmail      = true;
$wgEnableUserEmail  = true;

$wgEmergencyContact = "root@localhost";
$wgPasswordSender = "root@localhost";

## For a detailed description of the following switches see
## http://www.mediawiki.org/wiki/Extension:Email_notification
## and http://www.mediawiki.org/wiki/Extension:Email_notification
## There are many more options for fine tuning available see
## /includes/DefaultSettings.php
## UPO means: this is also a user preference option
$wgEnotifUserTalk = true; # UPO
$wgEnotifWatchlist = true; # UPO
$wgEmailAuthentication = true;
wgDBtype           = "postgres";
$wgDBserver         = "localhost";
$wgDBname           = "wikidb";
$wgDBuser           = "wikiuser";
$wgDBpassword       = "123456";

# MySQL specific settings
$wgDBprefix         = "";

# MySQL table options to use during installation or update
$wgDBTableOptions   = "TYPE=InnoDB";

# Experimental charset support for MySQL 4.1/5.0.
$wgDBmysql5 = false;

# Postgres specific settings
$wgDBport           = "5432";
$wgDBmwschema       = "mediawiki";
$wgDBts2schema      = "public";

## Shared memory settings
$wgMainCacheType = CACHE_NONE;
$wgMemCachedServers = array();

## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads       = true;
$wgUseImageMagick = true;
$wgFileExtensions = array( 'png', 'gif', 'jpg', 'jpeg', 'pdf', 'txt' ,'ppt','xls');
$wgImageMagickConvertCommand = "/usr/bin/convert";

## If you want to use image uploads under safe mode,
## create the directories images/archive, images/thumb and
## images/temp, and make them all writable. Then uncomment
## this, if it's not already uncommented:
# $wgHashedUploadDirectory = false;

## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX           = false;

$wgLocalInterwiki   = $wgSitename;

$wgLanguageCode = "en";

$wgProxyKey = "feda87a5b7590a59102d8a4e8aa5dd891b07924a9635d29ad154c5f26c9b6995";
$wgStylePath = "$wgScriptPath/skins";
$wgDefaultSkin = 'monobook';
$wgLogo = "$wgStylePath/common/images/mpeg_nokia.png";
## For attaching licensing metadata to pages, and displaying an
## appropriate copyright notice / icon. GNU Free Documentation
## License and Creative Commons licenses are supported so far.
# $wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# $wgRightsCode = ""; # Not yet used

$wgDiff3 = "/usr/bin/diff3";

# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );

#require_once( "$IP/extensions/FCKeditor/FCKeditor.php" );

#ldap authentication
require_once( 'extensions/LdapAuthentication.php' );
$wgAuth = new LdapAuthenticationPlugin();
$wgLDAPDomainNames = array( "MPECN","FIH" ,"MPM");
$wgLDAPServerNames = array( "MPECN"=>"cnsrv155.mpecn.fih.gd", "FIH"=>"cnsrv102.fih.gd","MPM"=>"cnsrv1a1.mpm.fih.gd");
$wgLDAPBaseDNs = array("MPECN"=>"dc=mpecn,dc=fih,dc=gd","FIH"=>"dc=fih,dc=gd","MPM"=>"dc=mpm,dc=fih.dc=gd");
$wgLDAPSearchStrings = array( "MPECN"=>"MPECN\\USER-NAME","FIH"=>"FIH\\USER-NAME","MPM"=>"MPM\\USER-NAME");
$wgLDAPSearchAttributes = array( "MPECN"=>"sAMAccountName","FIH"=>"sAMAccountName","MPM"=>"sAMAccountName");
$wgLDAPEncryptionType = array("MPECN"=>"ssl","FIH"=>"ssl","MPM"=>"ssl");
$wgLDAPUseLocal = true;
$wgMinimalPasswordLength = 1;
$WgGroupPermissions['*']['createaccount']=false;
$WgGroupPermissions['*']['read']=true;
$WgGroupPermissions['SP']['createaccount']=true;
$WgGroupPermissions['IT']['createaccount']=true;
$WgGroupPermissions['FKD']['createaccount']=true;
$wgShowExceptionDetails = true;
require_once("extensions/PdfExport/PdfExport.php");
1.2 need package
[root@cnsrv156 wiki]# rpm -qa | grep doc
apache-doc-2.0.54-2mdk
docbook-dtd43-xml-1.0-2mdk
htmldoc-1.8.23-8mdk
docbook-dtd412-xml-1.0-17mdk
coreutils-doc-5.2.1-8mdk
lilo-doc-22.6.1-6mdk
mandriva-doc-common-2006-6mdk
docbook-dtd42-xml-1.0-5mdk
grub-doc-0.97-13mdk
[root@cnsrv156 wiki]# rpm -qa | grep ldap
php-ldap-5.0.4-4mdk
nss_ldap-239-3.1.20060mdk
perl-ldap-0.31-2mdk
pam_ldap-180-2mdk
libldap2.3_0-2.3.6-4.2.20060mdk
openldap-2.3.6-4.2.20060mdk
libldap2.3_0-devel-2.3.6-4.2.20060mdk
openldap-clients-2.3.6-4.2.20060mdk
openldap-servers-2.3.6-4.2.20060mdk
apache-mod_ldap-2.0.54-13.3.20060mdk
[root@cnsrv156 wiki]#


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11754813/viewspace-544780/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/11754813/viewspace-544780/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值