Installing MediaWiki on 8-Coral: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(Updated to 8-Coral and MediaWiki 1.17+)
 
(Fixed various errors)
Line 1: Line 1:
{| cellpadding="2"
{| cellpadding="2"
|__TOC__||'''Installing MediaWiki 1.17 or 1.18 on 8-Coral Series'''
|__TOC__||'''Installing MediaWiki 1.18 on 8-Coral Series'''
|}
|}
'''Introduction'''
'''Introduction'''
Line 9: Line 9:
*Download the latest version and install it.   
*Download the latest version and install it.   


== Preparation ==
== Download and Extract Mediawiki ==
'''''Download and Extract Mediawiki'''''
#Download  MediaWiki '''1.18.0.tar.gz''' (or later version) from [http://www.mediawiki.org/wiki/Download here] and save it to a known location.
#Download  MediaWiki '''1.17.0.tar.gz''' (or later version) from [http://www.mediawiki.org/wiki/Download here] and save it to a known location.
#Open the downloaded file (mediawiki-1.18.0.tar.gz) with 7-Zip. This will show mediawiki-1.18.0.tar
#Open the downloaded file (mediawiki-1.17.0.tar.gz) with 7-Zip. This will show mediawiki-1.17.0.tar
#Extract this to the server root folder '''UniServer\www''', creating '''mediawiki-1.18.0'''
#Extract this to the server root folder '''UniServer\www''', creating '''mediawiki-1.17.0'''</li>
#Rename the folder '''mediawiki-1.18.0''' to '''wiki'''</li>
#Rename the folder '''mediawiki-1.17.0''' to '''wiki'''</li>


== Start servers ==
== Start servers ==


Run The Uniform Server control menu and start both servers if not already running.
Execute '''UniServer\Start_as_program.exe''' to start the Unicontoller panel, and then choose "Start Both" from the panel.  
Execute "Start_as_program.exe" to start the Unicontoller panel, and then choose "Start Both" from the panel.


''''' Change PHP accelerator to APC '''''
== Create the MySQL database and user ==
 
The installation script for MediWiki does not detect eAccelerator, which
is The Uniform Server's default PHP acelerator.  We will change to APC instead.
#Choose Server Configuration from the Unicontroller panel, and then select PHP.
#From the drop-down panel, select PHP Accelerators APC and eAccelerator.
#Uncheck Enable eAccelerator
#Dismiss the popup notice about the PHP Configuration update.
#Check Enable APC
#Dismiss the popup notice about the PHP Configuration update.
#Close the Server Configuration panel.
#From the Unicontroller panel, choose Stop Apache and wait for the button to change indication.
#Start Apache.
''''' Enable InnoDB for MySQL '''''
 
MediWiki exhorts installers to enable InnoDB due to some known problems with MyISAM. On the other hand, MyISAM is more portable in the situation that there are multiple applications using the same MySQL server.  This is because all of the InnoDB transactions are stored in the same ibdata1 file, whereas each MyISAM db has its own folder. 
#Choose Server Configuration from the Unicontroller panel, and then select MySQL.
#From the drop-down panel, select InnoDB Enable/Disable.
#Check Enable InnoDB
#Close the Server Configuration panel.
#From the Unicontroller panel, choose Stop MySQL and wait for the button to change indication.
#Start MySQL.
== Create the MySQL database ==


Before installing MediaWiki you must create a new MySQL database and user.
Before installing MediaWiki you must create a new MySQL database and user.


#From the control menu select: Server configuration > MySQL > Create delete Database
#From the Unicontroller, select: Server Configuration > MySQL > Create delete Database .
#Enter the database name to create; for example "wikidb" (without the quotes)
#Enter the database name to create; for example '''wikidb'''.
#Click the "Create Database" button. You can now close this menu.
#Click the "Create Database" button. You can now close this menu.
#From the Server Configuration, select: MySQL > Create Restricted MySQL User .
# Enter the user name (example: WikiDBU).
# Enter password (example: Yusr0936).
# Enter the database '''wikidb''' (as created above).
# Leave all permissions marked and click the "Create User" button. Close this menu.


== Wiki Installation ==
== Wiki Installation ==


#Type the following into your browser address bar:<br /> '''<nowiki>http://localhost/wiki/</nowiki>'''. This will be redirected to the installation page.
#Type the following into your browser address bar:<br /> '''<nowiki>http://localhost/wiki/</nowiki>'''. <br />This will redirect to the installation page.
#Click the link: Please '''set up the wiki''' first.  This starts the following configuration sequence.
#Click the link: <br />Please '''set up the wiki''' first.  <br />This starts the following configuration sequence.




Line 64: Line 44:
<tr bgcolor="#F4F4F4"><td align="right">Wiki Language: </td><td>en-English</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Wiki Language: </td><td>en-English</td></tr>
</table>
</table>
Continue to the next page.
'''Continue''' to the next page.


'''''Environmental checks'''''
'''''Environmental checks'''''
Line 76: Line 56:
<tr bgcolor="#F4F4F4"><td align="right">Database name: </td><td>wikidb (The name of the database you created.)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Database name: </td><td>wikidb (The name of the database you created.)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Database table prefix: </td><td>leave blank</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Database table prefix: </td><td>leave blank</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">DB username: </td><td>root</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">DB username: </td><td>WikiDBU (the new restricted MySQL user account)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">DB password confirm: </td><td>root, or the password you set for MySQL root account</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">DB password confirm: </td><td>Yusr0936 (the password for the account)</td></tr>
</table>
</table>
Continue to the next page.
'''Continue''' to the next page.


'''''Database settings'''''
'''''Database settings'''''
<table  width="490" border="0" cellpadding="3" cellspacing="1">
<table  width="490" border="0" cellpadding="3" cellspacing="1">
<tr bgcolor="#F4F4F4"><td width="200" align="right">Database account for web access:</td><td>Use the same account as for installation</td></tr>
<tr bgcolor="#F4F4F4"><td width="200" align="right">Database account for web access:</td><td>Use the same account as for  
<tr bgcolor="#F4F4F4"><td align="right">Storage engine: </td><td>(radio button) select InnoDB</td></tr>
 
installation</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Storage engine: </td><td>(radio button) InnoDB</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Database character set: </td><td>(radio button) select UTF-8</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Database character set: </td><td>(radio button) select UTF-8</td></tr>
</table>
</table>
Continue to the next page.
'''Continue''' to the next page.


'''''Name'''''
'''''Name'''''
Line 94: Line 76:
<tr bgcolor="#F4F4F4"><td align="right">Project namespace: </td><td>(radio button) Same as the wiki name  
<tr bgcolor="#F4F4F4"><td align="right">Project namespace: </td><td>(radio button) Same as the wiki name  
<tr bgcolor="#F4F4F4"><td align="right">Your name: </td><td>WikiSysop</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Your name: </td><td>WikiSysop</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Password: </td><td>admin123 (whatever you like)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Password: </td><td>admin429 (whatever you like)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Password confirm: </td><td>admin123 (same as above)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Password confirm: </td><td>admin429 (same as above)</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Contact e-mail: </td><td>admin@localhost</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Contact e-mail: </td><td>admin@localhost.org</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Ask more questions: </td><td>Selected</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Ask more questions: </td><td>Selected</td></tr>
</table>
</table>
Continue to the next page.
Note that the email address must be valid.<br />
'''Continue''' to the next page.


'''''Options'''''
'''''Options'''''
<table  width="490" border="0" cellpadding="3" cellspacing="1">
<table  width="490" border="0" cellpadding="3" cellspacing="1">
<tr bgcolor="#F4F4F4"><td width="200" align="right">User rights profile: </td><td>(radio button) select Traditional wiki</td></tr>
<tr bgcolor="#F4F4F4"><td width="200" align="right">User rights profile: </td><td>(radio button) select Traditional  
 
wiki</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Copyright and license: </td><td>(radio button) select No license footer</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Copyright and license: </td><td>(radio button) select No license footer</td></tr>


Line 110: Line 95:
<tr bgcolor="#F4F4F4"><td align="right">Enable user-to-user e-mail: </td><td>Unchecked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable user-to-user e-mail: </td><td>Unchecked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable user talk page notification:</td><td>Unchecked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable user talk page notification:</td><td>Unchecked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable user-to-user e-mail: </td><td>Unchecked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable watchlist notification:</td><td>Unchecked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable e-mail authentication: </td><td>Checked</td></tr>
 
<tr bgcolor="#F4F4F4"><td align="right">Extensions: </td><td>All unchecked</td></tr>


<tr bgcolor="#F4F4F4"><td align="right">Enable file uploads: </td><td>Checked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Enable file uploads: </td><td>Checked</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Settings for object caching: </td><td>(radio button) select APC</td></tr>
<tr bgcolor="#F4F4F4"><td align="right">Settings for object caching: </td><td>(radio button) select APC</td></tr>
</table>
</table>
Continue to the next page.
'''Continue''' to the next page.


'''''Install'''''
'''''Install'''''
Line 125: Line 114:
'''''Complete!'''''
'''''Complete!'''''


This last installation page triggers off a download of LocalSettings.php, which is the static, non-database portion of the configuration.  This must be saved to folder *\UniServer\www\'''wiki'''.
This last installation page triggers off a download of '''LocalSettings.php''', which is the static, non-database portion of the configuration.  This must be saved to folder *\UniServer\www\'''wiki'''.  


You can now access your wiki by clicking the "enter your wiki" link on the "Complete!" page, or by typing the following into your browser address bar:
You can now access your wiki by clicking the "enter your wiki" link on the "Complete!" page, or by typing the following into your browser address bar:
Line 135: Line 124:


The Uniform Server uses the standard ports (Apache port 80 and MySQL port 3306).  
The Uniform Server uses the standard ports (Apache port 80 and MySQL port 3306).  
If a host PC is currently running another program on these ports, it will prevent  
If a host PC is currently running another program on these ports, this will prevent  
The Uniform Server from running. To resolve this situation, either stop the  
The Uniform Server from running. To resolve this situation, either stop the  
other program or preferably move The Uniform Server to different ports by  
other program or better yet move The Uniform Server to different ports by  
moving the servers using the MultiServers button.
using the MultiServers button.


== MySQL Security ==
== MySQL Security ==
This installation guide is intended to get the application up and running purely for testing.  The configuration options should be reviewed if you are intending to put the application online. Be sure to read any security advice from MediaWiki and check their web site.
This installation guide is intended to get the application up and running purely for testing.  The configuration options should be reviewed if you are intending to put the application online. Be sure to read any security advice from MediaWiki and check their web site. Specifically, you may be interested in reading [http://www.mediawiki.org/wiki/Manual:Security MediaWiki's Manual:Security] articles.
 
More importantly, the above installation is an extreme security risk if put online as is.  
It is imperative that you secure the MySQL server before putting your servers online.


More importantly, the above installation is a security risk if put online as is. 
It is imperative that you secure the MySQL server before putting your servers online.
Please read [[MySQL Security | '''MySQL Security''']] and restrict the privileges  
Please read [[MySQL Security | '''MySQL Security''']] and restrict the privileges  
for any user who has connection access to your server.
for any user who has connection access to your server.
Among other things, be sure you created a restricted MySQL user limited only to the MediaWiki database. If you used "root" to do the installation, be sure to substitute the restricted user and password for "root" in the LocalSettings.php file.


----
----

Revision as of 14:08, 30 December 2011

Installing MediaWiki 1.18 on 8-Coral Series

Introduction

This guide shows how to install MediaWiki on The Uniform Server 8-Coral Series. We will follow MediaWiki's recommendation and use 7-Zip to extract the files, since Windows cannot do this.

  • 7-Zip's download site: [1]
  • Download the latest version and install it.

Download and Extract Mediawiki

  1. Download MediaWiki 1.18.0.tar.gz (or later version) from here and save it to a known location.
  2. Open the downloaded file (mediawiki-1.18.0.tar.gz) with 7-Zip. This will show mediawiki-1.18.0.tar
  3. Extract this to the server root folder UniServer\www, creating mediawiki-1.18.0
  4. Rename the folder mediawiki-1.18.0 to wiki

Start servers

Execute UniServer\Start_as_program.exe to start the Unicontoller panel, and then choose "Start Both" from the panel.

Create the MySQL database and user

Before installing MediaWiki you must create a new MySQL database and user.

  1. From the Unicontroller, select: Server Configuration > MySQL > Create delete Database .
  2. Enter the database name to create; for example wikidb.
  3. Click the "Create Database" button. You can now close this menu.
  4. From the Server Configuration, select: MySQL > Create Restricted MySQL User .
  5. Enter the user name (example: WikiDBU).
  6. Enter password (example: Yusr0936).
  7. Enter the database wikidb (as created above).
  8. Leave all permissions marked and click the "Create User" button. Close this menu.

Wiki Installation

  1. Type the following into your browser address bar:
    http://localhost/wiki/.
    This will redirect to the installation page.
  2. Click the link:
    Please set up the wiki first.
    This starts the following configuration sequence.


MediaWiki <version> installation

Your Language: en-English
Wiki Language: en-English

Continue to the next page.

Environmental checks

While you may receive warnings here, there should be no errors. Continue to the next page.

Connect to database

Database type:(radio button) MySQL is selected
Database host: localhost or 127.0.0.1 for Win7.
Database name: wikidb (The name of the database you created.)
Database table prefix: leave blank
DB username: WikiDBU (the new restricted MySQL user account)
DB password confirm: Yusr0936 (the password for the account)

Continue to the next page.

Database settings

Database account for web access:Use the same account as for installation
Storage engine: (radio button) InnoDB
Database character set: (radio button) select UTF-8

Continue to the next page.

Name

Name of Wiki:MediaWiki on Coral (whatever you like)
Project namespace: (radio button) Same as the wiki name
Your name: WikiSysop
Password: admin429 (whatever you like)
Password confirm: admin429 (same as above)
Contact e-mail: admin@localhost.org
Ask more questions: Selected

Note that the email address must be valid.
Continue to the next page.

Options

User rights profile: (radio button) select Traditional wiki
Copyright and license: (radio button) select No license footer
Enable outbound e-mail: Checked
Return e-mail address: (e-mail of WikiSysop)
Enable user-to-user e-mail: Unchecked
Enable user talk page notification:Unchecked
Enable watchlist notification:Unchecked
Enable e-mail authentication: Checked
Extensions: All unchecked
Enable file uploads: Checked
Settings for object caching: (radio button) select APC

Continue to the next page.

Install

Finally, all questions are answered. Please note the warning concerning the $wgSecretKey and $wgUpgradeKey.

Click Continue

Complete!

This last installation page triggers off a download of LocalSettings.php, which is the static, non-database portion of the configuration. This must be saved to folder *\UniServer\www\wiki.

You can now access your wiki by clicking the "enter your wiki" link on the "Complete!" page, or by typing the following into your browser address bar: http://localhost/wiki/

Portability

If you want a portable version of MediaWiki, copy the folder UniServer and all its content to your USB memory stick. Don’t expect fantastic speeds, but it is usable.

The Uniform Server uses the standard ports (Apache port 80 and MySQL port 3306). If a host PC is currently running another program on these ports, this will prevent The Uniform Server from running. To resolve this situation, either stop the other program or better yet move The Uniform Server to different ports by using the MultiServers button.

MySQL Security

This installation guide is intended to get the application up and running purely for testing. The configuration options should be reviewed if you are intending to put the application online. Be sure to read any security advice from MediaWiki and check their web site. Specifically, you may be interested in reading MediaWiki's Manual:Security articles.

More importantly, the above installation is a security risk if put online as is. It is imperative that you secure the MySQL server before putting your servers online. Please read MySQL Security and restrict the privileges for any user who has connection access to your server.

Among other things, be sure you created a restricted MySQL user limited only to the MediaWiki database. If you used "root" to do the installation, be sure to substitute the restricted user and password for "root" in the LocalSettings.php file.