Sven/MediaWiki Installation on OS X - biodev3

From Organic Design wiki

<bash>

  1. !/bin/bash
  2. ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
  3. To do;
  4. Add proxy detection functionality
  5. Make sure that wget download works
  6. ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
  1. 0) Version to install (assuming it exists)

version=1.10.0 htdocs=/Library/WebServer/Documents wikidir=wiki110 mirror=http://optusnet.dl.sourceforge.net/sourceforge/wikipedia

  1. 1) Download MediaWiki (tested)

cd /tmp if [ ! -e mediawiki-${version}.tar.gz ] then

 wget --proxy ${mirror}/mediawiki-${version}.tar.gz

fi

tar -zxvf mediawiki-${version}.tar.gz

  1. 2) Copy the mediawiki directory to the webserver document root

cp -R /tmp/mediawiki-${version} ${htdocs}/${wikidir}

  1. 3) Make the config subdirectory accessible

chmod 777 ${htdocs}/${wikidir}/config

  1. 4) Follow the configuration instructions on the wikipage http://127.0.0.1/${wikidir}

cat <<EOF ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. Now its time to configure your MediaWiki installation at: ${htdocs}/${wikidir} Using a web browser, follow the instructions at: http://127.0.0.1/${wikidir} When you have finished type: y ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. EOF finished=N while [ $finished != "y" ] do

   echo "Press 'y' when you have configured MediWiki"
   read finished

done

  1. echo $message$version
  1. 5) Modify LocalSettings.php (EnableUploads) and move to ${htdocs}/${wikidir}

sed 's/# \(\$wgEnableUploads\)/\1/' ${htdocs}/${wikidir}/config/LocalSettings.php > ${htdocs}/${wikidir}/LocalSettings.php rm ${htdocs}/${wikidir}/config/Localsettings.php

chmod 600 ${htdocs}/${wikidir}/config

  1. 6) Make images sub directory writeable by the server

chmod -R 777 ${htdocs}/${wikidir}/images </bash>