macfidelity

|

rethinking the think-different thing

mac | How to create a mobile USB-based wiki for Mac OS X

October 2nd, 2008 at 23:00

PLEASE NOTE:

As Philippe pointed out in the Comments this How-To works only if the related Mac has installed MAMP locally. This is somehow ugly & stupid but related with the hard-coded path in MAMP.

Unfortunally i havent realized that duing my tests – as all my Macs have MAMP installed.

So go get it working you can just follow the tutorial and add in addition a local MAMP installation.

Big thanks to Philippe


I do use MediaWiki since several month at work for documentation (we are already running a small farm with several wiki’s). It takes some time to get used to the wiki-synthax, but if you got that part, its just a great thing.

As a co-worker asked me how to start a mobile wiki on a USB-device for Windows i stumpled upon this lifehacker-article.

But hey, i’m a mac dude, so lets try to get this idea working on a mac.

0. Basic-Idea:

Creating a mobile wiki on an USB pen drive which can be used on Mac computers.

1. Ingredients:

  • USB-device (1GB or bigger sounds like a good start)
  • MAMP
  • Mediawiki

USB device will be used as mobile storage device
MAMP will be used to have an easy to deploy Apache & MySQL Solution.
Mediawiki will be used as Wiki-Application running on the USB device via Apache.

Download both MediaWiki and MAMP.

2. Prepare the USB device:

Most USB devices are pre-formated with FAT. As we want to copy & run a mac-application (*.app) on this device we need to re-format the drive first.

  • Plugin in the USB device
  • Open Disk Utility
  • Select the USB device
  • Define a name for the new volume
  • Select Mac OS X Extended as Volume Format
  • Press the Erase button to reformat the volume
  • Close Disk Utility

A few images to explain the steps above

We select the drive, define the new name and the Volume Format and press Erase to start the format process.

Disk Utility will ask you if you are sure

3. Setting up MAMP:

Now we need to setup MAMP which will serve as Apache & MySQL solution.

  • Mount the MAMP dmg
  • Copy the content of the .dmg to the USB-device

A few images to explain the steps above

The mounted MAMP .dmg should look similar to this

Copy this folder to the USB device:

You should now have a mounted USB device containing the MAMP folder:

Let’s test MAMP now to be sure everything is fine.

  • Select and start MAMP.app in the MAMP folder
  • The MAMP widget should show up, offering us the option to configure the Apache & MySQL Settings

The MAMP widget

Select the Preferences button:

Apache needs to know where our document root is. So we need to create a second folder on the USB device which will then be referenced in the Apache section of MAMPs preferences

So let’s create a folder “wiki” on the USB device:

Now return to the Preference dialog of MAMP and navigate to the Apache Tab and select our new wiki folder on the USB device as document root:

Basicly MAMP is configured now enough to serve us as webserver and database engine.

If does makes sense to edit the value in Start/Stop too, otherwise the MAMP web-interface will open each time you start MAMP. I tend to link it to my wiki folder, as i want to see it if i start MAMP.

Return to the MAMP widget and press Start Server:

Both lights should be green, showing that Apache & MySQL are running. In addition your browser should pop up showing the MAMP web-interface:

Ok we are really done here, so lets start with MediaWiki.

4. Setting up MediaWiki:

  • Unarchive the MediaWiki archive
  • Copy the content of the mediawiki-1.13.2 folder ( or whatever release you downloaded) to our wiki folder on the USB device

As all mediawiki files are now inside our wiki folder on the USB device (which was defined in section 3 as document root of Apache) we can continue with the MediaWiki installation.

The following steps will be browser based, so switch to your browser which should still display the MAMP configuration interface.

The browser address bar should display something like that:

http://localhost:8080/MAMP/?language=English

The port might be diffrent depending on the settings of MAMP.

  • Copy that address from your browser
  • Open a new browser tab
  • Paste the address and delete everything behind the port

http://localhost:8080/

This means: we point the browser to our apache document root which should result in a page like that:

As you can see, we can now continue with the official MediaWiki installation process.

  • Press Set up the wiki
  • Define a name for your wiki
  • Define a contact mail address
  • Define a language
  • Select your license
  • Define admin name and password

One of the important steps is the data base configuration

  • Select MySQL
  • Database host should be localhost
  • Define database name
  • Define database user
  • Define database password
  • Define a password for the super user

The default MySQL settings of MAMP contain a user root with the password root. In this example i will use this user & password to keep it simple.

It is maybe a good idea to do the same in your first test run.

If you have everything working, redo the entire setup with more configured options, like a defined MySQL user with restricted right and similar if security matters for you. In General MAMP is not designed to be secure, its basicly designed to be easy to deploy =)

If you have checked all values in the installation interface press the Install MediaWiki button

If everything worked as expected you should see a page like that:

Scroll down to the end of the page and follow the final instruction:

So move LocalSettings.php on your USB device from /wiki/config/ to /wiki/ and then click the link in your browser

Depeding on your Settings configured in MediaWiki setup you can now create a user account and start editing in your new mobile wiki

My test-wiki looks like that:

I hope this guide was detailed enough to show the basic idea

You should always keep in mind that you should now:

  • Optimized MAMP Apache
  • Optimize MAMP MySQL (change root Password and in best case use a specific user for your wiki)
  • Delete unused files inside your MAMP folder
  • Re-Check all Preferences iinside MAMP
  • Take a look at the MediaWiki doc’s and do a fine tuning for your wiki

One final note:

Before unplugging your USB device you should always stop MAMP in the MAMP widget using the Stop Servers button

Then quit MAMP.app and unmount your USB device in Finder.

Enjoy your new shiny mobile wiki

Edit:

* XAMPP could be an alternative solution for MAMP
* Mediawiki is just one idea – basicly you could do many things if you have a Webserver & Database running on your USB device.
* If you just need a basic wiki, but don’t want to mess around with Apache & MySQL there are other solutions like Tiddlywiki available. Thanks goes to amr (#macintosh at irc.quakenet.org)

Links:

Tags: , , , , , , , ,

15 Responses to “mac | How to create a mobile USB-based wiki for Mac OS X”

  1. happy-buddha Says:

    Ich habe nicht so den großen Durchblick bei WIKIs,aber die Installation hat schon mal gut geklappt!! Gut geschrieben!

    ReplyReply
  2. fidel Says:

    Hi,

    heißt das du hast es basierend auf dem Beitrag mal nachgespielt ?

    War gestern beim testen, bilder machen und schreiben noch sehr unsicher ob mein How-To ausreichend ist um es nachvollziehen zu können, daher bin ich über Feedback wie eigentlich immer sehr froh.

    Hau mir die Kritik ruhig um die Ohren sofern einzelne Abschnitte nicht optimal erklärt sind.

    Schöne Grüße & ruhigen Feiertag
    fidel

    ReplyReply
  3. happy-buddha Says:

    Habe es einfach nachgespielt.Meine Englisch Kenntnisse sind nicht die besten,aber ich konnte es nachvollziehen! Gut beschrieben!!

    Was mache ich nun mit meinem neuen Wiki..? ;)

    ReplyReply
  4. fidel Says:

    hehe, da mein english auch eher chat-kompatibel, weniger business-like ist sollten wir uns ja wieder auf der gleichen Ebene treffen :)

    Bzgl der Einsatzfrage:
    Gute Frage *zwinker*
    Ich verwalte in sowas gerne Seriennummern gekaufter Software, meine Online-Einkäufe, eigene Notizen für mich oder meine Freundin etc…
    Dokumente sollten sich über die Upload Funktion gut einbinden lassen, womit das ganze doch recht variable ist.

    Leider muss man klar sagen das alleine MediaWiki recht komplex ist, schön auf der einen Seite, da es viele Möglichkeiten bietet, aber eben auch zeitaufwendig im Einstieg.
    Ein gutes Beispiel ist hier wiederrum die Upload Funktion die sehr skalierbar ist, letzlich aber wieder durch php & Apache Settings querbeeinflusst wird.

    Wiki bietet sich im Kern aber vor allem wieder für Entwickler an, die eine Doku-Platform benötigen die mobile verwendbar ist.

    Aber wenn du das ganze mal mit etwas Abstand betrachtest, könntest du mit dem ersten Teil des How-Tos (USb Stick & MAMP) quasi viele der verfügbaren Web-Applikationen a la Wordpress und Co aufm USB Stick betreiben. Macht zwar nicht oft Sinn, letzlich ist Mediawiki aber nur eines von vielen Anwendungs-Beispielen.
    Eine Webbasierte Photogallerie wäre sicher auch ein gutes Beispiel.

    ReplyReply
  5. happy-buddha Says:

    Meine Seriennr verwalte ich alle mit 1Password.Aber Photogallerie wäre eine Idee.
    Gehe mal auf die Suche nach Videos wie man MediaWiki benützen kann,der Einstieg ist nicht so einfach.

    ReplyReply
  6. fidel Says:

    Nur damit wir uns nicht falsch verstehen

    Ich meinte du kannst MediaWiki auch mit ner 0815 web-basierten Image-Gallerie o.ä ersetzen.
    Im Kern ging es mir einerseits darum auf einem USB Stick eine Web-Umgebung aufzubauen.

    Der konkrete Fall MediaWiki bedient sich halt diesem Schritt der MAMPÜ Umgebung …. ist nur eine Möglichkeit, die für mich eben gerade Sinn gemacht hat.

    Letzlich könnte man via Meidawiki sicher auch Bilder mobil verwalten, aber da wird der 1 GB stick sicher bald voll sein und für Verwaltung von Bildern gibt es sicher auch bessere Webprojekte z.b. Coppermine

    ReplyReply
  7. happy-buddha Says:

    1GB langt da nicht lange..Das stimmt.
    Ich habe es jetzt probiert,indem ich MAMP und MediaWiki auf die Festplatte gespeichert habe,kein USB.Funktioniert auch !

    ReplyReply
  8. fidel Says:

    Jup,

    muss so auch funktionieren. Ich würde Entwickler Web Umgebungen a la MAMP aber immer nur lokal verwenden. Komm bitte nicht auf die Idee den Apache ins Web freizugeben, dafür ist die Umgebung aus Sicherheitsaspekten wirklich nicht geschaffen.

    Solange man MAMP lokal verwendet ist es ne feine Sache um sich selber Web-basierte Anwendungssoftware (a la Coppermine, lokales wordpress oder was auch immer ) lokal zum laufen zu bringen.

    Gruss
    fidel =)

    ReplyReply
  9. Apps & Images | ZenPhoto | macfidelity Says:

    [...] auf diesem Artikel könnte ich mir natürlich auch eine mobile Bildergallerie auf einem großen USB-Stick vorstellen [...]

  10. DannyStaple Says:

    Hi there,

    I was thinking about how something like this could be done with a PC setup. The best idea I could come up with was to use Tiddlywiki (a tiny one file wiki), against firefox running under Portable Apps. This would mean you get quite a neat personal wiki running off a USB stick.
    Plus, if you like Macs, the aesthetics of Tiddlywiki will be pleasing.

    Cheers,
    Danny

    ReplyReply
  11. Philippe Says:

    this definitely doesn’t work! The paths to the binaries (/Applications/MAMP/bin…) are hard coded in MAMP and you can’t change them in such a simple way. It happens to work because you ALSO have MAMP installed in your Applications folder but won’t never work on a Mac without MAMP already installed.

    Too bad.

    ReplyReply
  12. fidel Says:

    Hi Philippe,

    interesting point. You are correct i had MAMP locally installed on both of my testing systems, but didnt thought about that as issue.

    Without further search i am wondering if the MAMP path is only hard-coded regarding the start&stop scripts (which are editable) or if there is really an additional hard-coded path which is not changeable.

    Gonna take a look on that this evening.

    Cheers
    fidel

    ReplyReply
  13. Roy Says:

    I can’t get it to work without having MAMP installed either. Have you been able to figure anything out yet? I would really appreciate any help you can give. Thank you.

    ReplyReply
  14. Roy Says:

    I’m dumb. I just read the top of your site. My apologies.

    ReplyReply
  15. fidel Says:

    @roy

    no i havent found another solution for an usb-based lamp-setup – but you could take a look at http://www.tiddlywiki.com/

    It’s a html & java-script based standalone wiki witch does not need apache etc – maybe its enough for you ;)

    Best regards
    fidel

    ReplyReply

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>