Setup a Project Wiki: Difference between revisions

From Research
Jump to navigation Jump to search
Line 6: Line 6:


  <font color=red>hostname</font> <font color=blue>~ #</font> '''ssh root@kingfisher'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''ssh root@kingfisher'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''cd /srv/www/htwiki'''
  <font color=red>kingfisher</font> <font color=blue>~ #</font> '''cd /srv/www/htwiki'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''tar -xzvf mediawiki-unconfiguredInstallation.tar.gz'''
  <font color=red>kingfisher</font> <font color=blue>~ #</font> '''tar -xzvf mediawiki-unconfiguredInstallation.tar.gz'''
  <font color=red>hostname</font> <font color=blue>~ #</font> '''mv mediawiki '''''$projectname'''''
  <font color=red>kingfisher</font> <font color=blue>~ #</font> '''mv mediawiki '''''$projectname'''''


The go to the mediawiki setup website for your project:
The go to the mediawiki setup website for your project:
Line 22: Line 22:
* '''DB username''': wiki_$projectname
* '''DB username''': wiki_$projectname
Unique password:
Unique password:
  <font color=red>hostname</font> <font color=blue>~ #</font> '''apg -m 9 -MNC'''
  <font color=red>kingfisher</font> <font color=blue>~ #</font> '''apg -m 9 -MNC'''
*more '''apg''' info [[Linux Tips and Tools|here]]
*more '''apg''' info [[Linux Tips and Tools|here]]


Line 32: Line 32:


If it worked, this will create the LocalSettings.php file which you then move to the correct place:
If it worked, this will create the LocalSettings.php file which you then move to the correct place:
  <font color=red>hostname</font> <font color=blue>htwiki #</font> '''cd $projectname'''
  <font color=red>kingfisher</font> <font color=blue>htwiki #</font> '''cd $projectname'''
  <font color=red>hostname</font> <font color=blue>''wiki_name'' #</font> '''mv config/LocalSettings.php ./'''
  <font color=red>kingfisher</font> <font color=blue>''wiki_name'' #</font> '''mv config/LocalSettings.php ./'''


Config should no longer be world writable:
Config should no longer be world writable:
  <font color=red>hostname</font> <font color=blue>~ #</font> '''chmod a-w config'''
  <font color=red>kingfisher</font> <font color=blue>~ #</font> '''chmod a-w config'''


Your wiki should be completely setup at: <nowiki>http://wiki.iat.sfu.ca/$projectname</nowiki>  I then usually go login to the wiki and add to the main page: '''Wiki is configured correctly.''' for 100% assurance that everything is working :)
Your wiki should be completely setup at: <nowiki>http://wiki.iat.sfu.ca/$projectname</nowiki>  I then usually go login to the wiki and add to the main page: '''Wiki is configured correctly.''' for 100% assurance that everything is working :)
Line 45: Line 45:
To customize access and viewing restrictions, look at this article on [http://www.mediawiki.org/wiki/Manual:Preventing_access Preventing Access] (this version of mediawiki is 1.4).  It's probably always a good idea to prohibit anonymous edits; add these lines to LocalSettings.php:
To customize access and viewing restrictions, look at this article on [http://www.mediawiki.org/wiki/Manual:Preventing_access Preventing Access] (this version of mediawiki is 1.4).  It's probably always a good idea to prohibit anonymous edits; add these lines to LocalSettings.php:


  <font color=red>hostname</font> <font color=blue>''wiki_name'' #</font> '''emacs -nw LocalSettings.php'''
  <font color=red>kingfisher</font> <font color=blue>''wiki_name'' #</font> '''vim LocalSettings.php'''
           # Entirely disable Anonymous Edits in Wiki versions 1.4 and before
           # Entirely disable Anonymous Edits in Wiki versions 1.4 and before
           $wgWhitelistEdit = true;
           $wgWhitelistEdit = true;
Line 52: Line 52:
To restrict anonymous registrations, the following snippet is added to allow only Sysops user registration:
To restrict anonymous registrations, the following snippet is added to allow only Sysops user registration:


  <font color=red>hostname</font> <font color=blue>''wiki_name'' #</font> '''emacs -nw LocalSettings.php'''
  <font color=red>kingfisher</font> <font color=blue>''wiki_name'' #</font> '''vim LocalSettings.php'''
           # Prevent new user registrations except by sysops
           # Prevent new user registrations except by sysops
           $wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1 );
           $wgWhitelistAccount = array ( "user" => 0, "sysop" => 1, "developer" => 1 );
Line 59: Line 59:
To restrict anonymous viewing, the following snippet is added to allow only registered users content access to the main page, user login page, and the help page:
To restrict anonymous viewing, the following snippet is added to allow only registered users content access to the main page, user login page, and the help page:


  <font color=red>hostname</font> <font color=blue>''wiki_name'' #</font> '''emacs -nw LocalSettings.php'''
  <font color=red>kingfisher</font> <font color=blue>''wiki_name'' #</font> '''vim LocalSettings.php'''
           # Pages anonymous (not-logged-in) users may see
           # Pages anonymous (not-logged-in) users may see
           $wgWhitelistRead = array( ":Main Page", "Special:Userlogin", "Wikipedia:Help" );
           $wgWhitelistRead = array( ":Main Page", "Special:Userlogin", "Wikipedia:Help" );
Line 69: Line 69:
           # allows bans to be typed in by account name rather than IP
           # allows bans to be typed in by account name rather than IP
           $wgSysopUserBans=true;
           $wgSysopUserBans=true;


== Add Sysop/Administrator User ==
== Add Sysop/Administrator User ==

Revision as of 22:26, 6 January 2009