Sven/MediaWiki Installation on OS X - biodev3
<bash>
- !/bin/bash
- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
- To do;
- Add proxy detection functionality
- Make sure that wget download works
- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.
- 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) 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
- 2) Copy the mediawiki directory to the webserver document root
cp -R /tmp/mediawiki-${version} ${htdocs}/${wikidir}
- 3) Make the config subdirectory accessible
chmod 777 ${htdocs}/${wikidir}/config
- 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
- echo $message$version
- 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
- 6) Make images sub directory writeable by the server
chmod -R 777 ${htdocs}/${wikidir}/images </bash>



