InstallLocalMediaWiki

From Clothbot

(Difference between revisions)
Jump to: navigation, search
Revision as of 02:42, 3 January 2008 (edit)
AndrewPlumb (Talk | contribs)
(Steps)
← Previous diff
Current revision (03:11, 3 January 2008) (edit)
AndrewPlumb (Talk | contribs)
(Steps)
 
Line 1: Line 1:
=How To Install a Local MediaWiki= =How To Install a Local MediaWiki=
 +
 +Specific to Mac OS X
 +* Performed on a Leopard-upgraded-from-Tiger machine (not clean)
==Steps== ==Steps==
-# Download mysql-5.0.45-osx10.4-i686.dmg+# Download mysql-5.0.45-osx10.4-i686.dmg [http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg]
## Read the included ReadMe.txt file ## Read the included ReadMe.txt file
## Shut down any existing MySQL servers that are running ## Shut down any existing MySQL servers that are running
Line 11: Line 14:
#* You should now be able to see an Apache web server running at http://localhost/ #* You should now be able to see an Apache web server running at http://localhost/
#** [http://discussions.apple.com/thread.jspa?messageID=5761831&#5761831 Problem with permissions] with Leopard-upgraded account. #** [http://discussions.apple.com/thread.jspa?messageID=5761831&#5761831 Problem with permissions] with Leopard-upgraded account.
-## '''sudo vi /etc/apache2/httpd.conf'''+#*** Terminal: '''sudo cp /etc/httpd/users/*.conf /etc/apache2/users/.'''
-##* uncomment: ''LoadModule php5_module libexec/apache2/libphp5.so''+## Terminal: '''sudo vi /etc/apache2/httpd.conf'''
-## '''sudo cp /etc/httpd/users/*.conf /etc/apache2/users/.'''+##* Uncomment: ''LoadModule php5_module libexec/apache2/libphp5.so''
 +##** vi (find the ''php5'' string): '''/php5'''
 +##** vi (move to the start of the line): '''^'''
 +##** vi (erase the ''#'' character): '''x'''
 +##** vi (colon character, '''w'''rite and '''q'''uit): ''':wq'''
 +## GUI Editor Alternative: '''sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/apache2/httpd.conf'''
 +##* Erase the '''#''' in front of the ''LoadModule php5_module libexec/apache2/libphp5.so'' line.
 +##* Save and exit. Make sure it '''does not''' Line-Wrap.
# Reboot so mysql and apache start up fresh. # Reboot so mysql and apache start up fresh.
-# Download MediaWiki+# Download MediaWiki [http://www.mediawiki.org/wiki/Download]
-## Read [http://www.mediawiki.org/wiki/Manual:Installation Installation Guide]+## Read the Installation Guide [http://www.mediawiki.org/wiki/Manual:Installation]
-## '''cd /Library/WebServer/Documents'''+## Terminal: '''cd /Library/WebServer/Documents'''
-## '''sudo mkdir wiki'''+## Terminal: '''sudo mkdir wiki'''
-## '''cd wiki'''+## Terminal: '''cd wiki'''
-## '''sudo tar xvfz ~/Downloads/mediawiki-1.11.0.tar.gz'''+## Terminal: '''sudo tar xvfz ~/Downloads/mediawiki-1.11.0.tar.gz'''
## Browse to ''http://localhost/wiki/mediawiki-1.11.0/'' ## Browse to ''http://localhost/wiki/mediawiki-1.11.0/''
##* Note the message to change permissions: ##* Note the message to change permissions:
-##** '''cd .../mediawiki-1.11.0'''+##** Terminal: '''cd .../mediawiki-1.11.0'''
-##** '''sudo chmod a+w config'''+##** Terminal: '''sudo chmod a+w config'''
##** Retry running configuration. ##** Retry running configuration.
## Configure using the web form ## Configure using the web form
##* If you're going to use a Creative Commons license, configure it '''first''' before anything else. The new form won't retain of the field values so you'll be entering things twice. ##* If you're going to use a Creative Commons license, configure it '''first''' before anything else. The new form won't retain of the field values so you'll be entering things twice.
##* Be sure to assign a prefix in the '''Database table prefix''' field. Makes it easier to maintain multiple wikis and/or start from scratch. ##* Be sure to assign a prefix in the '''Database table prefix''' field. Makes it easier to maintain multiple wikis and/or start from scratch.
-### '''Error:''' ''Attempting to connect to database server as root...failed with error [2002] Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock''+##* '''Error:''' ''Attempting to connect to database server as root...failed with error [2002] Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock''
-##* '''Change:''' Field '''Database Host''' from ''localhost'' to ''127.0.0.1''+##** '''Change:''' Field '''Database Host''' from ''localhost'' to ''127.0.0.1''
-### '''Error:''' ''Attempting to connect to database server as wikiuser...failed due to authentication errors. Check passwords.''+##* '''Error:''' ''Attempting to connect to database server as wikiuser...failed due to authentication errors. Check passwords.''
-##* '''Change:'''+##** '''Change:'''
-##** Checkbox '''Superuser account''' to ''checked''+##*** Checkbox '''Superuser account''' to ''checked''
-##** Leave field '''Superuser password''' blank.+##*** Leave field '''Superuser password''' blank.
-## '''sudo mv config/LocalSettings.php .'''+## Terminal: '''sudo mv config/LocalSettings.php .'''
# Follow the link to ''http://localhost/wiki/mediawiki-1.11.0/index.php'' # Follow the link to ''http://localhost/wiki/mediawiki-1.11.0/index.php''
==Tips and Tricks== ==Tips and Tricks==
-# Download and install CocoaMySQL to more easily maintain your MySQL databases.+# Download and install CocoaMySQL [http://cocoamysql.sourceforge.net/] to more easily maintain your MySQL databases.
# If you want to reconfigure your wiki from scratch, delete or rename the LocalSettings.php and rerun the install process. # If you want to reconfigure your wiki from scratch, delete or rename the LocalSettings.php and rerun the install process.
Line 53: Line 63:
** [http://www.mediawiki.org/wiki/MediaWiki MediaWiki Main Page] ** [http://www.mediawiki.org/wiki/MediaWiki MediaWiki Main Page]
*** [http://www.mediawiki.org/wiki/Installation Installation] *** [http://www.mediawiki.org/wiki/Installation Installation]
 +
 +[[Category:Project]] [[Category:MacOSXHack]]

Current revision

Contents

How To Install a Local MediaWiki

Specific to Mac OS X

  • Performed on a Leopard-upgraded-from-Tiger machine (not clean)

Steps

  1. Download mysql-5.0.45-osx10.4-i686.dmg [1]
    1. Read the included ReadMe.txt file
    2. Shut down any existing MySQL servers that are running
    3. Launch the pkg installer (mysql-5.0.45-osx10.4-i686.pkg)
    4. Install the MySQLStartupItem.pkg to make automatic start-up easier to manage.
  2. In your System Preferences, go into Sharing and turn on Web Sharing
    1. Terminal: sudo vi /etc/apache2/httpd.conf
      • Uncomment: LoadModule php5_module libexec/apache2/libphp5.so
        • vi (find the php5 string): /php5
        • vi (move to the start of the line): ^
        • vi (erase the # character): x
        • vi (colon character, write and quit): :wq
    2. GUI Editor Alternative: sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/apache2/httpd.conf
      • Erase the # in front of the LoadModule php5_module libexec/apache2/libphp5.so line.
      • Save and exit. Make sure it does not Line-Wrap.
  3. Reboot so mysql and apache start up fresh.
  4. Download MediaWiki [2]
    1. Read the Installation Guide [3]
    2. Terminal: cd /Library/WebServer/Documents
    3. Terminal: sudo mkdir wiki
    4. Terminal: cd wiki
    5. Terminal: sudo tar xvfz ~/Downloads/mediawiki-1.11.0.tar.gz
    6. Browse to http://localhost/wiki/mediawiki-1.11.0/
      • Note the message to change permissions:
        • Terminal: cd .../mediawiki-1.11.0
        • Terminal: sudo chmod a+w config
        • Retry running configuration.
    7. Configure using the web form
      • If you're going to use a Creative Commons license, configure it first before anything else. The new form won't retain of the field values so you'll be entering things twice.
      • Be sure to assign a prefix in the Database table prefix field. Makes it easier to maintain multiple wikis and/or start from scratch.
      • Error: Attempting to connect to database server as root...failed with error [2002] Can't connect to local MySQL server through socket /var/lib/mysql/mysql.sock
        • Change: Field Database Host from localhost to 127.0.0.1
      • Error: Attempting to connect to database server as wikiuser...failed due to authentication errors. Check passwords.
        • Change:
          • Checkbox Superuser account to checked
          • Leave field Superuser password blank.
    8. Terminal: sudo mv config/LocalSettings.php .
  5. Follow the link to http://localhost/wiki/mediawiki-1.11.0/index.php

Tips and Tricks

  1. Download and install CocoaMySQL [4] to more easily maintain your MySQL databases.
  2. If you want to reconfigure your wiki from scratch, delete or rename the LocalSettings.php and rerun the install process.

References

Personal tools