Size: 2216
Comment:
|
Size: 6443
Comment: apt-get installs EOL Version of mw.
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
MediaWiki is the engine that is used for Wikipedia. See [[http://www.mediawiki.org/|MediaWiki]] for more information | ||<tablestyle="float:right; font-size:0.9em; width:40%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;"><<TableOfContents>>|| |
Line 3: | Line 3: |
== Install == | MediaWiki is the engine that is used for Wikipedia. See [[https://www.mediawiki.org/|MediaWiki]] for more information. |
Line 5: | Line 5: |
To install on your [U|K|Edu]buntu server (with Apache and MySQL - [[ApacheMySQLPHP]] or another web server already installed): {{{ sudo apt-get install mediawiki imagemagick mediawiki-math mysql-server |
Beware: apt-get installs old versions of mediawiki, which is no longer supported by upstream. == Install pre-requisites == The easiest method is to first install a full LAMP (Linux, Apache2, MySQL, PHP) server: {{{ sudo apt-get install tasksel |
Line 9: | Line 13: |
To enable MediaWiki edit the following file and remove the '#' from the third line so that it reads 'Alias /mediawiki /var/lib/mediawiki': {{{ sudo gedit /etc/apache2/conf.d/mediawiki.conf |
{{{ sudo tasksel install lamp-server }}} Make sure you record your MySQL root superuser name and superuser password that you will create at installation. You will need it later. (Each of the components (Apache2, MySQL5, and PHP) can also be installed individually, if you wish.) == Install MediaWiki == Install the package: {{{ sudo apt-get install mediawiki |
Line 13: | Line 26: |
Then restart apache: {{{ sudo /etc/init.d/apache2 restart |
Optionally install add-ons: {{{ sudo apt-get install imagemagick mediawiki-math php5-gd |
Line 17: | Line 31: |
The next step is to visit the website. Since you will be entering passwords, you don't want to make an unsecured connection. Either set up a ssl server] ( see [[forum/server/apache2/SSL]]) and connect with https://your.site.net/mediawiki, or visit from the server itself (using [lynx] or [links], two excellent text-based web browsers): {{{ lynx localhost/mediawiki |
Enable MediaWiki by editing the following file and remove the '#' from the third line so that it reads 'Alias /mediawiki /var/lib/mediawiki': {{{ sudo nano /etc/mediawiki/apache.conf |
Line 20: | Line 35: |
Apparently in Ubuntu 14.04 and above you might have to further enable it by running {{{ sudo a2enconf mediawiki }}} but this hasn't been verified yet. It is possible that the above line might be needed in earlier versions of Ubuntu too, but again this hasn't been confirmed. Then restart apache: {{{ sudo /etc/init.d/apache2 restart }}} === Start your MediaWiki === http://localhost/mediawiki Follow the setup instructions. === Start Mediawiki from a remote location === This method regards starting your website from a remote location. Since you will be entering passwords, you shouldn't use an unsecured connection. Either set up a ssl server] ( see [[forum/server/apache2/SSL]]) and connect with https://yoursite.example.com/mediawiki, or visit from the server itself (using [[elinks]] or lynx, two excellent text-based web browsers): {{{ elinks localhost/mediawiki }}} You could also use ssh to port forward your http traffic from your local machine to the remote server. ssh -C -L 9999:localhost:80 regularuser@www.skippybob.com, edit your /etc/hosts to point the webserver's name to your localhost, then open a web browser to the config page: http://wiki.skippybob.com:9999/config. More detailed instructions [[ http://technonick.livejournal.com/96173.html | here. ]] |
|
Line 25: | Line 64: |
'''NOTE:''' Check the output in your web browser if it's instructions differ from below follow them. | '''NOTE:''' Check the output in your web browser: if its instructions differ from below, follow them. |
Line 27: | Line 66: |
sudo mv /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php sudo chmod 600 /etc/mediawiki/LocalSettings.php sudo rm -Rf /var/lib/mediawiki/config |
sudo cp /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php sudo chown www-data /etc/mediawiki/LocalSettings.php sudo chmod 600 /etc/mediawiki/LocalSettings.php sudo rm -Rf /var/lib/mediawiki/config |
Line 31: | Line 71: |
You are done! you should see a wiki page at: http://your.site.net/mediawiki | You are done! you should see a wiki page at: http://yoursite.example.com/mediawiki |
Line 34: | Line 74: |
The Apache config files reside at /etc/apache2/conf.d/mediawiki.conf |
|
Line 39: | Line 76: |
To change the icon make a 135x135 pixel logo in PNG format and move it to the right place: {{{ sudo cp my_new_logo.png /var/lib/mediawiki/skins/common/images/wiki.png |
To change the icon make a 135x135 pixel logo in PNG format and move it to the right place: {{{ sudo cp my_new_logo.png /var/lib/mediawiki/skins/common/images/my_new_logo.png |
Line 43: | Line 81: |
To get rid of the Mac-like sunburst in the background, edit /var/lib/mediawiki/skins/monobook/main.css and change: | Avoid to use the same name as the original logo (wiki.png), it will be overwritten when upgrading Mediawiki. Insert the path to the image at the end of configuration file in ''/etc/mediawiki/LocalSettings.php'' like so: {{{ $wgLogo = "/mediawiki/skins/common/images/my_new_logo.png" ; }}} To get rid of the default sunburst logo in the background, edit /var/lib/mediawiki/skins/monobook/main.css and change: |
Line 48: | Line 93: |
== Email Support == MediaWiki can be configured to send email messages for various functions. You will need to install some additional packages: {{{ sudo apt-get install php-pear sudo pear install mail sudo pear install Net_SMTP }}} |
|
Line 49: | Line 101: |
see http://prevolution.org/mediawikifarm for running multiple wikis on a server | Also, you'll need to configure the {{{LocalSettings.php}}} file to use your SMTP server to send out the messages, for example: {{{ $wgEnableEmail = true; $wgEnableUserEmail = true; $wgEmergencyContact = "wikidude@mydomain.com"; $wgPasswordSender = "wikidude@mydomain.com"; $wgNoReplyAddress = "noreply@mydomain.com"; $wgPasswordSender = "password_reminder@mydomain.com"; $wgSMTP = array( 'host' => "ssl://smtp.gmail.com", 'IDhost' => "gmail.com", 'port' => 465, 'auth' => true, 'username' => "user_name@mydomain.com", 'password' => "user_password" ); }}} == Extensions == Mediawiki extensions are stored as symbolic links in the /etc/mediawiki-extensions/extensions-available folder. You can enable an extension using {{{ sudo mwenext <extension.php> }}} Tab/autocomplete shows a list of extensions. Similarly use mwdisext to disable an extension. == Install skins in MediaWiki == * Download a skin tarball (such as example.tar.gz) and extract. * Create a directory, e.g. /var/lib/mediawiki/skins/''example'' * Move the extracted content into the directory /var/lib/mediawiki/skins/''example''. * In /var/lib/mediawiki/skins put exemple.php and exemple.deps.php. * Go to http://localhost/mediawiki/ -> Preference -> Aspects and choose the ''example'' skin. == MediaWiki TurnKey appliance == Some users may prefer an unofficial pre-integrated [[http://www.turnkeylinux.org/mediawiki|TurnKey MediaWiki Appliance]] based on Ubuntu LTS. == MediaWiki in the Cloud == There is a Juju Charm for Mediawiki for deployments on Amazon EC2, HP Cloud, and other OpenStack based clouds: [[http://jujucharms.com/charms/precise/mediawiki|Mediawiki Juju Charm]] == Other Resources == * [[http://ubuntuguide.org/wiki/MediaWiki_tips|Ubuntuguide/Kubuntuguide MediaWiki Tips]] -- including how to run multiple parallel instances of Mediawiki on a single server. * [[http://www.jirp.nl/2008/07/27/mediawiki-farm-administer-multiple-wiki-environments/|MediaWiki Farm tips|]] -- for running multiple instances * [[http://www.mediawiki.org/wiki/Manual:Running_MediaWiki_on_Ubuntu|MediaWiki Wiki -- Ubuntu]] * [[http://wiki.debian.org/MediaWiki|Debian Wiki -- MediaWiki]] |
MediaWiki is the engine that is used for Wikipedia. See MediaWiki for more information.
Beware: apt-get installs old versions of mediawiki, which is no longer supported by upstream.
Install pre-requisites
The easiest method is to first install a full LAMP (Linux, Apache2, MySQL, PHP) server:
sudo apt-get install tasksel
sudo tasksel install lamp-server
Make sure you record your MySQL root superuser name and superuser password that you will create at installation. You will need it later.
(Each of the components (Apache2, MySQL5, and PHP) can also be installed individually, if you wish.)
Install MediaWiki
Install the package:
sudo apt-get install mediawiki
Optionally install add-ons:
sudo apt-get install imagemagick mediawiki-math php5-gd
Enable MediaWiki by editing the following file and remove the '#' from the third line so that it reads 'Alias /mediawiki /var/lib/mediawiki':
sudo nano /etc/mediawiki/apache.conf
- Apparently in Ubuntu 14.04 and above you might have to further enable it by running
sudo a2enconf mediawiki
but this hasn't been verified yet. It is possible that the above line might be needed in earlier versions of Ubuntu too, but again this hasn't been confirmed.
Then restart apache:
sudo /etc/init.d/apache2 restart
Start your MediaWiki
Follow the setup instructions.
Start Mediawiki from a remote location
This method regards starting your website from a remote location. Since you will be entering passwords, you shouldn't use an unsecured connection. Either set up a ssl server] ( see forum/server/apache2/SSL) and connect with https://yoursite.example.com/mediawiki, or visit from the server itself (using elinks or lynx, two excellent text-based web browsers):
elinks localhost/mediawiki
You could also use ssh to port forward your http traffic from your local machine to the remote server. ssh -C -L 9999:localhost:80 regularuser@www.skippybob.com, edit your /etc/hosts to point the webserver's name to your localhost, then open a web browser to the config page: http://wiki.skippybob.com:9999/config. More detailed instructions here.
fill out the forms, noting that the final form is NOT your root or user password, but the password for the root mysql account (blank by default)
Lastly, move the config files as requested to prevent anyone else from changing these settings:
NOTE: Check the output in your web browser: if its instructions differ from below, follow them.
sudo cp /var/lib/mediawiki/config/LocalSettings.php /etc/mediawiki/LocalSettings.php sudo chown www-data /etc/mediawiki/LocalSettings.php sudo chmod 600 /etc/mediawiki/LocalSettings.php sudo rm -Rf /var/lib/mediawiki/config
You are done! you should see a wiki page at: http://yoursite.example.com/mediawiki
Customize
You might want to customize the look of your wiki.
To change the icon make a 135x135 pixel logo in PNG format and move it to the right place:
sudo cp my_new_logo.png /var/lib/mediawiki/skins/common/images/my_new_logo.png
Avoid to use the same name as the original logo (wiki.png), it will be overwritten when upgrading Mediawiki.
Insert the path to the image at the end of configuration file in /etc/mediawiki/LocalSettings.php like so:
$wgLogo = "/mediawiki/skins/common/images/my_new_logo.png" ;
To get rid of the default sunburst logo in the background, edit /var/lib/mediawiki/skins/monobook/main.css and change:
- background: #f9f9f9 url(headbg.jpg) 0 0 no-repeat;
to
- background: #f9f9f9;
Email Support
MediaWiki can be configured to send email messages for various functions. You will need to install some additional packages:
sudo apt-get install php-pear sudo pear install mail sudo pear install Net_SMTP
Also, you'll need to configure the LocalSettings.php file to use your SMTP server to send out the messages, for example:
$wgEnableEmail = true; $wgEnableUserEmail = true; $wgEmergencyContact = "wikidude@mydomain.com"; $wgPasswordSender = "wikidude@mydomain.com"; $wgNoReplyAddress = "noreply@mydomain.com"; $wgPasswordSender = "password_reminder@mydomain.com"; $wgSMTP = array( 'host' => "ssl://smtp.gmail.com", 'IDhost' => "gmail.com", 'port' => 465, 'auth' => true, 'username' => "user_name@mydomain.com", 'password' => "user_password" );
Extensions
Mediawiki extensions are stored as symbolic links in the /etc/mediawiki-extensions/extensions-available folder. You can enable an extension using
sudo mwenext <extension.php>
Tab/autocomplete shows a list of extensions.
Similarly use mwdisext to disable an extension.
Install skins in MediaWiki
- Download a skin tarball (such as example.tar.gz) and extract.
Create a directory, e.g. /var/lib/mediawiki/skins/example
Move the extracted content into the directory /var/lib/mediawiki/skins/example.
- In /var/lib/mediawiki/skins put exemple.php and exemple.deps.php.
Go to http://localhost/mediawiki/ -> Preference -> Aspects and choose the example skin.
MediaWiki TurnKey appliance
Some users may prefer an unofficial pre-integrated TurnKey MediaWiki Appliance based on Ubuntu LTS.
MediaWiki in the Cloud
There is a Juju Charm for Mediawiki for deployments on Amazon EC2, HP Cloud, and other OpenStack based clouds:
Other Resources
Ubuntuguide/Kubuntuguide MediaWiki Tips -- including how to run multiple parallel instances of Mediawiki on a single server.
MediaWiki Farm tips -- for running multiple instances