Summary: How to place a standalone wiki on a USB stick
Version: 2007-05-02
Prerequisites: MS-Windows system
Status: new
Maintainer: Eh.. no-one :-)
Questions answered by this recipe
How can I run a complete standalone PmWiki installation on a USB drive
without having to install on the computer on which I wish to use PmWiki?
Description
There are several ways to run PmWiki standalone.
This page describes a few methods:
- Using XAMPP - XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl.
- Using the Abyss Web Server. Abyss Web Server is a compact web server. It is about 1/10 the size of XAMPP.
- Using Web On Key by Dfaure. No instructions here - go to the linked site for info.
Using XAMPP
The following instructions originally came from a PmWiki-users post by Neil Herber.
"I wanted to be able to demonstrate PmWiki, Simple Machines Forum, and WordPress to some clients showing them a live demo - not just a bunch of PowerPoint screenshots. This is what I did."
- Download XAMPP for Windows. I used xampplite-win32-1.5.4a.zip, but there are later versions now available. The full XAMPP includes a bunch of stuff I did not need, like the Mercury mail server. Use the zip file and not the installer to avoid any issues with registry entries.
- Unzip XAMPP lite into a top-level folder on your memory stick. For example, if the memory stick is drive F:, unzip into F:xampplite/. See warnings below about drive letters.
- Launch xampp-portcheck.exe to make sure the needed ports are not in use.
- Launch xampp-control.exe to get a very nice GUI control panel that lets you start and stop various components.
- Start Apache from the GUI. Start MySQL if you plan to run SMF or WordPress. PmWiki only needs to have Apache started.
- Browse to http://localhost/ or http://127.0.0.1/ and be amazed. You might want to read the warnings and notes.
- The document root defaults to htdocs/ - put the serveable bits there. So carrying on with the example above, you could have F:xampplite/htdocs/wiki/ containing PmWiki. In my case, I created additional htdocs/ subfolders called blog/ for WordPress and smf/ for SMF (duh!) and unzipped the relevant apps there.
Precautions
This works amazingly well on a fast stick - one with at least 8 Mbit/s read and write transfers. Most sticks do not indicate their speed and neither brand name nor price are a reliable indicator. You do not need a U3 USB stick.
Note that as shipped, XAMPP is not intended as a production server. You will need to lock it down if you intend to use it on the internet. Otherwise, it is pretty safe, because for someone to even see it on a LAN, they would need to know your IP.
Under XP (not tried under Vista) the Windows firewall traps the start up of the various servers. Just approve them when the dialog appears and all is fine. You can remove the approvals from the firewall later if you want to leave no traces behind.
The newer version(s) of XAMPP are advertised as working under Vista, which suggests the older versions may not. Read the precautions about Vista installs at the XAMPP site.
Some Apache configuration items under the Windows OS require hard-coded paths. For example, Directory commands require a path like "C:/Apache/htdocs/wiki/uploads". If you need to use these, make sure to assign the memory stick a drive letter that will not change from system to system. Force it to something like P:.
Extra Crunchy Goodness (TM)
As a bonus, XAMPP Apache comes with SSL installed. The Windows binaries from apache.org do not.
I have run this stick on laptops and desktop Windows machines and even on an Intel Mac under Parallels. Note that you do not need to reboot, install, or de-install any software on the host PC.
Because XAMPP is Apache with PHP installed, it is dead easy to set up, and PmWiki should behave more or less the same way as an install on a full-fledged server.
Using Abyss
If you don't need a fully featured Apache install, use Abyss Web Server. Abyss is a fast, reliable and compact webserver on Windows (and other platforms) with a FastCGI PHP setup. It installs in little over 0.5Mb (just delete the redundant docs folder) and can be run without installation, directly from a pendrive. To install Abyss with PHP on a memory-stick, do as follows:
Note: If you just want to install a good webserver with PHP you can download a complete Abyss+PHP installer package from
Aprelium.com.
- Download the Abyss Webserver and install it. You'll uninstall it later on.
- Download the windows installer for PHP and install it. You'll uninstall it later on. Select "Other CGI" when prompted to configure a web-server.
- Make a folder in the root of the pendrive, named
Web.
-->Note: If you put the Web directory somewhere other than root, then update line 5 of abyss.conf to reflect the full path to the Abyss directory (i.e., C:\MyDirectory\Abyss Web Server).
- Locate the
Abyss Web Server and PHP folders in Program Files. Copy both to your Web folder. Within Web rename the PHP-folder as PHP. You now have 2 folders inside Web: Abyss Web Server and PHP.
- Download abyss.conf.txtΔ (browsing will be limited to the contents of the
Web folder) or abyss.root.conf.txtΔ (which allows all of the stick to be browsed) and copy it as abyss.conf in the Web/Abyss Web Server folder. Save.
- Copy your install of pmwiki into
Web.
- Clean-up: uninstall Abyss and PHP.
Now go to a computer, plug in the pendrive, locate the abyssws.exe webserver in Web/Abyss Web Server and execute it (or create a shortcut in the rootfolder of the pendrive). A blue icon appears in the taskbar. Now browse to http://localhost/ or http://127.0.0.1 and enjoy.
Note: the logon used to configure the webserver is -- with password -- .
Note: Abyss runs on many platforms, so a similar procedure will probably work for all of them.
Added by Kriss: I had to tweak php.ini this way: session.save_path = "..\pmWiki\tmp\sessions" (folder should be inside Abyss' <path>...</path> variable) otherwise I wasn't able to log in.
Excuse me for intervention, hope you'll be able to understand what I wrote. :)
Apple OS X
- Download and install the MAMP server from [http://mamp.info(approve links)].
- (It's big, ~60MB compressed, ~180MB installed.)
- Unzip and put the PmWiki files in the folder MAMP/htdocs/
- Open a web browser to
http://localhost/wiki
Correction
Mac OS X comes with Apache web-server (version 1.3) and PHP (version 4.?) pre-installed.
No need to download anything.
- Unzip the PmWiki files and install them:
- On root level in Library/
Web-serverWebserver/Documents (admin rights needed to do this). Open a web browser to http://localhost/
- In your user account in the folder Sites (Users/YourUserName/Sites). No admin rights needed for this. Open a web browser to http://localhost/~YourUserName/
Further correction: I bought a macbook pro recently, and it came without PHP installed. So I downloaded it from
Apple's OS X download pages. Also, in my system it's Library/WebServer/Documents. Everything else worked as above. -
JonHaupt January 17, 2007, at 09:30 PM
Correction to the correction: enough PHP is installed on even the client versions of Mac OS X to run PmWiki, but the php module is disabled by default in /etc/httpd/httpd.conf. You have to uncomment the LoadModule of the php module, as well as the AddModule line. Restarting Apache after this will have php enabled. You will need admin rights to both edit httpd.conf and restart Apache. — Greg Lo
Correction to MAMP instructions: For the final step, open your browser to http://localhost:8888/pmwiki/pmwiki.php. (Instead of localhost you can use your IP address.) — Don Johnson December 5, 2007 2:50 PM Pacific
File Permissions:
- When you use the Finder to install PmWiki, correct the Read & Write permissions of the PmWiki folders if necessary. Mac OS X has its own ideas here.
- For all PmWiki folders except two, the Group "www" need Read access rights. The exceptions are the folders: wiki.d and uploads. For these the Group "www" needs Read & Write access.
- On the folders wiki.d and uploads, use "Get Info". Look for "Ownership & Permissions - Details." You will be the Owner (with Read & Write access), the Group need to be "www" with Read & Write access. To make the changes admin rights are necessary
january 16 07, by Han
Release Notes
Comments
- I haven't tested the instructions above myself yet, but it's easy
according to Neil. Christian
- Another solution would be to install Puppy Linux http://puppylinux.org on the usb flash drive. An XAMMP package for Puppy is available at http://murga-linux.com/puppy/viewtopic.php?t=5126 PL
- If you want to have a completely portable Windows computing environment that includes all of your favorite applications (not just PmWiki!) have a look at mojopac. It will run as a trial for 30 days or 200 boots after which you need to fork out $50 US or so. Works best on a pocket USB drive such as the WD Passport Portable Drive. As of today, the 160 GB version is $129 CDN at Costco. I have not tried this - but I am tempted! Neil Herber May 03, 2007, at 11:48 AM
See Also
- Standalone -- Allows PmWiki to run in a "standalone" mode, without needing a webserver such as Apache
Contributors
- Neil Herber
- (Christian Ridderström partially guilty for adding this to cookbook page:-)
- Jan Meijer (Abyss part)