Difference between revisions of "Install MediaWiki"

From BubbaWiki
Jump to navigation Jump to search
(Created page with 'Install MediaWIki<br> Author: herman<br> Initial disclaimer and notes: * The emphasis here is on setting up a MediaWiki service. As the Bubba server is memory constrained, thi...')
 
 
Line 1: Line 1:
Install MediaWIki<br>
Install MediaWIki<br>  


Author: herman<br>
Author: herman<br>  


Initial disclaimer and notes:
Initial disclaimer and notes:  


* The emphasis here is on setting up a MediaWiki service. As the Bubba server is memory constrained, this setup disables ALL normal Bubba services including Samba. This may be unnecessary. The recommendation is to start as described below and, if desired, gradually reactivate services.<br> * The author of this HowTo is primarily a RedHat Linux user; he is not a Debian Linux expert.<br> * The author performed the customizations using the putty ssh and scp programs from a Windows-based machine.<br> * It is assumed that the user has read the standard Bubba server documentation and has already performed the standard setup. Also, that the user has ssh'ed into the server at least once and knows how to "su" to root.<br> * The commands described below are all performed as root (not admin).<br> * The author used the vi editor when modifying files on the Bubba server. The ":wq" mark below indicates that the vi editor changes described be written and the vi editor exited.<br> * The author made an original copy of each file as -orig prior to the first editing. This way it was easy to revert back, if needed, plus it was simple to view the changes made by using the diff command.<br> * The author made a best effort at transcribing his experience below.<br> * Pound signs (#) indicate start of comments. Do not enter it or the following text on a command line.<br> * Via the Bubba server web interface, disable all available services.<br> * Disable the Samba service.
*The emphasis here is on setting up a MediaWiki service. As the Bubba server is memory constrained, this setup disables ALL normal Bubba services including Samba. This may be unnecessary. The recommendation is to start as described below and, if desired, gradually reactivate services.<br> * The author of this HowTo is primarily a RedHat Linux user; he is not a Debian Linux expert.<br> * The author performed the customizations using the putty ssh and scp programs from a Windows-based machine.<br> * It is assumed that the user has read the standard Bubba server documentation and has already performed the standard setup. Also, that the user has ssh'ed into the server at least once and knows how to "su" to root.<br> * The commands described below are all performed as root (not admin).<br> * The author used the vi editor when modifying files on the Bubba server. The ":wq" mark below indicates that the vi editor changes described be written and the vi editor exited.<br> * The author made an original copy of each file as -orig prior to the first editing. This way it was easy to revert back, if needed, plus it was simple to view the changes made by using the diff command.<br> * The author made a best effort at transcribing his experience below.<br> * Pound signs (#) indicate start of comments. Do not enter it or the following text on a command line.<br> * Via the Bubba server web interface, disable all available services.<br> * Disable the Samba service.
<pre>/etc/init.d/samba stop
<pre>/etc/init.d/samba stop
/usr/sbin/update-rc.d -f samba remove</pre>
/usr/sbin/update-rc.d -f samba remove</pre>  
* Tune apache2, using Bubba forums info, to reduce memory footprint.
*Tune apache2, using Bubba forums info, to reduce memory footprint.
<pre>cd /etc/apache2
<pre>cd /etc/apache2
cp -p apache2.conf apache2.conf-orig
cp -p apache2.conf apache2.conf-orig
Line 19: Line 19:
MaxRequestsPerChild 0 change to 500
MaxRequestsPerChild 0 change to 500
:wq
:wq
</pre><pre>/etc/init.d/apache2 restart</pre>
</pre><pre>/etc/init.d/apache2 restart</pre>  
* Setup apt so can download and install additional packages.
*Setup apt so can download and install additional packages.
<pre>cd /etc/apt
<pre>cd /etc/apt
cp -p sources.list sources.list-orig
cp -p sources.list sources.list-orig
Line 28: Line 28:
# to:
# to:
deb http://ftp.us.debian.org/debian/ sarge main
deb http://ftp.us.debian.org/debian/ sarge main
:wq</pre><pre>apt-get update # update local packages list</pre>
:wq</pre><pre>apt-get update # update local packages list</pre>  
* Install unzip.
*Install unzip.
<pre>apt-get install unzip # installs single new package unzip_5.52-1sarge4_arm.deb</pre>
<pre>apt-get install unzip # installs single new package unzip_5.52-1sarge4_arm.deb</pre>  
* Install mysql-server.
*Install mysql-server.
<pre>apt-get install mysql-server # 2 upgraded(mainly perl stuff); 8 newly installed (including mysql-client)</pre>
<pre>apt-get install mysql-server # 2 upgraded(mainly perl stuff); 8 newly installed (including mysql-client)</pre>  
* Tune MySQL, using Bubba forums info, to reduce memory footprint.
*Tune MySQL, using Bubba forums info, to reduce memory footprint.
<pre>/etc/init.d/mysql stop
<pre>/etc/init.d/mysql stop
cd /etc/mysql
cd /etc/mysql
Line 45: Line 45:
query_cache_type = 1 change to 0
query_cache_type = 1 change to 0
:wq</pre><pre>/etc/init.d/mysql start
:wq</pre><pre>/etc/init.d/mysql start
 
mysqladmin -u root password 'aPassword' # set mysql root password</pre>  
mysqladmin -u root password 'aPassword' # set mysql root password</pre>
*Install mediawiki 1.5.
* Install mediawiki 1.5.
<pre>cd /etc/apt
<pre>cd /etc/apt
vi sources.list
vi sources.list
Line 57: Line 56:


apt-get -t sarge-backports install mediawiki1.5</pre><pre>* Revert apt back to original for future firmware updates.
apt-get -t sarge-backports install mediawiki1.5</pre><pre>* Revert apt back to original for future firmware updates.
cd /etc/apt
cd /etc/apt
cp -p sources.list sources.list-backports
cp -p sources.list sources.list-backports
cp -p sources.list-orig sources.list
cp -p sources.list-orig sources.list
apt-get update # refresh local packages list</pre>
 
* Verify normal web interface still works.
 
<pre>
apt-get update # refresh local packages list</pre>  
http://bubba/</pre>
*Verify normal web interface still works.
* Configure mediawiki.
<pre>http://bubba/</pre>  
<pre>
*Configure mediawiki.
http://bubba/mediawiki/
<pre>http://bubba/mediawiki/
# Fillin responses to configuration prompts
# Fillin responses to configuration prompts
# For example:
# For example:
Line 84: Line 84:
# DB charset: backwards-compatible UTF-8
# DB charset: backwards-compatible UTF-8
# root - specify mysql root password set earlier via mysqladmin</pre><pre>mv /var/lib/mediawiki1.5/config/LocalSettings.php /etc/mediawiki1.5/LocalSettings.php
# root - specify mysql root password set earlier via mysqladmin</pre><pre>mv /var/lib/mediawiki1.5/config/LocalSettings.php /etc/mediawiki1.5/LocalSettings.php
chmod 600 /etc/mediawiki1.5/LocalSettings.php</pre>
chmod 600 /etc/mediawiki1.5/LocalSettings.php</pre>  
http://bubba/mediawiki/index.php # After a delay, you should see a normal MediaWiki home page
http://bubba/mediawiki/index.php # After a delay, you should see a normal MediaWiki home page  


* Set thumbnail of your choice for upper lefthand corner of each page
*Set thumbnail of your choice for upper lefthand corner of each page
<pre>
<pre># Find or create a 135x135 pixel png image
# Find or create a 135x135 pixel png image
# Upload, via scp, to /var/www/html/images directory
# Upload, via scp, to /var/www/html/images directory
cd /etc/mediawiki1.5
cd /etc/mediawiki1.5
Line 96: Line 95:
# Change $wgLogo line to look like the following:
# Change $wgLogo line to look like the following:
$wgLogo = "/images/yourImageName.png";
$wgLogo = "/images/yourImageName.png";
:wq</pre>
:wq</pre>  
http://bubba/mediawiki/index.php # Mediawiki home page with your thumbnail should appear
http://bubba/mediawiki/index.php # Mediawiki home page with your thumbnail should appear  
 
Notes:
 


Notes:<br>
<pre># Valuable files to look at in case of problems:
<pre># Valuable files to look at in case of problems:
/var/log/messages
/var/log/messages

Latest revision as of 10:25, 28 December 2010

Install MediaWIki

Author: herman

Initial disclaimer and notes:

  • The emphasis here is on setting up a MediaWiki service. As the Bubba server is memory constrained, this setup disables ALL normal Bubba services including Samba. This may be unnecessary. The recommendation is to start as described below and, if desired, gradually reactivate services.
    * The author of this HowTo is primarily a RedHat Linux user; he is not a Debian Linux expert.
    * The author performed the customizations using the putty ssh and scp programs from a Windows-based machine.
    * It is assumed that the user has read the standard Bubba server documentation and has already performed the standard setup. Also, that the user has ssh'ed into the server at least once and knows how to "su" to root.
    * The commands described below are all performed as root (not admin).
    * The author used the vi editor when modifying files on the Bubba server. The ":wq" mark below indicates that the vi editor changes described be written and the vi editor exited.
    * The author made an original copy of each file as -orig prior to the first editing. This way it was easy to revert back, if needed, plus it was simple to view the changes made by using the diff command.
    * The author made a best effort at transcribing his experience below.
    * Pound signs (#) indicate start of comments. Do not enter it or the following text on a command line.
    * Via the Bubba server web interface, disable all available services.
    * Disable the Samba service.
/etc/init.d/samba stop
/usr/sbin/update-rc.d -f samba remove
  • Tune apache2, using Bubba forums info, to reduce memory footprint.
cd /etc/apache2
cp -p apache2.conf apache2.conf-orig
vi /etc/apache2/apache2.conf
# Below the heading <IfModule prefork.c>, change the following four values:
StartServers 5 change to 3
MinSpareServers 5 change to 3
MaxSpareServers 10 change to 6
MaxClients 20 leave unchanged
MaxRequestsPerChild 0 change to 500
:wq
/etc/init.d/apache2 restart
  • Setup apt so can download and install additional packages.
cd /etc/apt
cp -p sources.list sources.list-orig
vi sources.list
# Change first line from:
#deb http://ftp.se.debian.org/debian/ sarge main
# to:
deb http://ftp.us.debian.org/debian/ sarge main
:wq
apt-get update # update local packages list
  • Install unzip.
apt-get install unzip # installs single new package unzip_5.52-1sarge4_arm.deb
  • Install mysql-server.
apt-get install mysql-server # 2 upgraded(mainly perl stuff); 8 newly installed (including mysql-client)
  • Tune MySQL, using Bubba forums info, to reduce memory footprint.
/etc/init.d/mysql stop
cd /etc/mysql
cp -p my.cnf my.cnf-orig
vi my.cnf
# Change the following five values:
key_buffer = 16M change to 32K
max_allowed_packet = 16M change to 1M
thread_stack = 128K change to 64K
query_cache_size = 16777216 change to 8388608
query_cache_type = 1 change to 0
:wq
/etc/init.d/mysql start
mysqladmin -u root password 'aPassword' # set mysql root password
  • Install mediawiki 1.5.
cd /etc/apt
vi sources.list
# Add following line to bottom of file
deb http://www.backports.org/debian sarge-backports main contrib non-free
:wq

apt-get update # update local packages list again

apt-get -t sarge-backports install mediawiki1.5
* Revert apt back to original for future firmware updates.

cd /etc/apt cp -p sources.list sources.list-backports cp -p sources.list-orig sources.list


apt-get update # refresh local packages list
  • Verify normal web interface still works.
http://bubba/
  • Configure mediawiki.
http://bubba/mediawiki/
# Fillin responses to configuration prompts
# For example:
# Site name: HomeWiki
# Contact e-mail: webmaster@bubba
# Language: en-English
# Copyright/license: no license metadata
# Sysop account name: WikiSysop
# password: aPassword
# Shared memory caching: none
# E-mail setup: all disabled
# MySQL server: localhost
# Dababase name: wikidb
# DB username: wikiuser
# DB password: aPassword
# DB table prefix: mw_
# DB charset: backwards-compatible UTF-8
# root - specify mysql root password set earlier via mysqladmin
mv /var/lib/mediawiki1.5/config/LocalSettings.php /etc/mediawiki1.5/LocalSettings.php
chmod 600 /etc/mediawiki1.5/LocalSettings.php

http://bubba/mediawiki/index.php # After a delay, you should see a normal MediaWiki home page

  • Set thumbnail of your choice for upper lefthand corner of each page
# Find or create a 135x135 pixel png image
# Upload, via scp, to /var/www/html/images directory
cd /etc/mediawiki1.5
cp -p LocalSettings.php LocalSettings.php-orig
vi LocalSettings.php
# Change $wgLogo line to look like the following:
$wgLogo = "/images/yourImageName.png";
:wq

http://bubba/mediawiki/index.php # Mediawiki home page with your thumbnail should appear

Notes:

# Valuable files to look at in case of problems:
/var/log/messages
/var/log/apache2/error.log
/var/log/apache2/access.log