wiki:AWIKIServer

Version 16 (modified by admin, 4 years ago) (diff)

--

Post Install

After installation, the mysql database still needs to be configured.

  • sudo /root/install_mediawiki.sh
    • It will ask you for the mysql root password twice.

Passwords

  • change the shell password for root.
  • change the shell password for demo.
  • change the mysql password for root.
    • update /etc/mediawiki/LocalSettings.php with the new password.

Running behind proxies

mod_rpaf

RPAF is responsible for interpreting the 'X-Forwarded-IP' header for apache. This means that IP addresses show up properly in the access.log, and can be used for access control. It also sets the domain name presented to mediawiki "properly".

  • sudo apt-get install libapache2-mod-rpaf
  • edit /etc/apache2/mods-enabled/rpaf.conf as root, and add the ip of EACH of your proxies to the line that starts with RPAFproxy_ips.
  • edit /etc/mediawiki/LocalSettings.php as root, and add the line $wgServer=preg_replace('/, .*/','', $wgServer);, in order to make MediaWiki? see it's domain properly.

MediaWiki?

  • edit /etc/mediawiki/LocalSettings.php as root. add the following lines:
    $wgUsePrivateIPs = true;
    $wgSquidServers = array('172.16.0.1', '10.0.2.51');
    

Again, just like the above, make sure to list EACH of your proxy servers.

Apache

Finally, sudo service apache2 restart to make the above take effect.

Installing 1.25.1

  • sudo apt-get install devscripts dpkg-dev
  • sudo apt-get install dh-buildinfo ocaml-nox xsltproc docbook-xml docbook-xsl
  • wget http://releases.wikimedia.org/mediawiki/1.25/mediawiki-1.25.1.tar.gz
  • wget faikvm.com/mediawiki-debian.tar.gz
  • tar -xzf mediawiki-1.25.1.tar.gz
  • mv mediawiki-1.25.1.tar.gz mediawiki_1.25.1.orig.tar.gz
  • cd mediawiki-1.25.1
  • tar -xvzf ../mediawiki-debian.tar.gz
  • debuild
  • cd ..
  • sudo dpkg -i mediawiki_1.25.1-0.1_all.deb
  • sudo dpkg -i mediawiki-classes_1.25.1-0.1_all.deb
  • mysql -u root -p
    • DROP DATABASE my_wiki;
    • quit
  • sudo /root/install_mediawiki.sh

Enabling the Vector skin

  • as root, add {{{wfLoadSkin( 'Vector');}} to /etc/mediawiki/LocalSettings.php .

Bugs

trying to overwrite '/var/lib/mediawiki/extensions/InputBox', which is also in package mediawiki-extensions-base 3.7

VisualEditor?

Dependencies

Universal Language Selector

Parsoid

Bugs

  • EATS ALL RAM. takes up 600 megs of ram to start. turn on your swap file...
    • on createvm hosts:
      • cd /home
      • sudo dd if=/dev/zero of=swapfile bs=1048576 count=1024
      • sudo chmod 600 swapfile
      • sudo mkswap swapfile
      • sudo swapon swapfile
      • cd ~
  • npm install -- installs dependencies not found in debian. they need audited and packaged.

Installing

  • cd /var/lib/mediawiki/extensions
  • sudo git clone -b REL1_25 https://gerrit.wikimedia.org/r/p/mediawiki/extensions/VisualEditor.git
  • cd VisualEditor?
  • sudo git submodule update --init
  • add the following to /etc/mediawiki/LocalSettings.php to enable the Visual Editor:
    require_once "$IP/extensions/VisualEditor/VisualEditor.php";
    
    // Enable by default for everybody
    $wgDefaultUserOptions['visualeditor-enable'] = 1;
    
    // Don't allow users to enable it
    // $wgHiddenPrefs[] = 'visualeditor-enable';
    
    // OPTIONAL: Enable VisualEditor's experimental code features
    #$wgDefaultUserOptions['visualeditor-enable-experimental'] = 1;
    
    // URL to the Parsoid instance
    // MUST NOT end in a slash due to Parsoid bug
    $wgVisualEditorParsoidURL = 'http://localhost:8142';
    
    

Other Extensions

ParserFunctions?

Add the following to /etc/mediawiki/LocalSettings.php:

wfLoadExtension( 'ParserFunctions' );