The Apache Haus Forum

Forum Topics => Webmaster Tools, Tips and Tricks => Topic started by: mario on January 06, 2009, 05:41:45 PM

Title: How to run on an usb stick
Post by: mario on January 06, 2009, 05:41:45 PM
To use apache on an usb stick you have to change the pathes. Which a little trick You don't have to do that. Using / stead of \
Based on that apache is from *nix land, it don't need drive letter.

this example is based on that folder structure
x:\server\apache <= Apache base bolder
x:\server\php <= php base folder
x:\server\mysql <= mysql base folder

e.g. with most needed section from httpd.conf
Code: [Select]
ServerRoot "/server/apache"
PidFile /server/logs/

PHPIniDir "/server/php"
LoadModule php5_module "/server/php/php5apache2_2.dll"
AddType application/x-httpd-php .php

DocumentRoot "/server/www"

<Directory "/server/www">

Alias /icons/ "/server/apache/icons/"
<Directory "/server/apache/icons">

ErrorLog /server/logs/error.log

CustomLog /server/logs/access.log common

some values in php.ini
Code: [Select]
error_log = /server/logs/phperror.log


upload_tmp_dir = /server/tmp
extension_dir = /server/php/ext/
session.save_path = /server/tmp

;zend_extension_ts = "/sever/php/zendOptimizer/lib/Optimizer-3.0.1/php-5.1.x/ZendOptimizer.dll"
;zend_extension_manager.optimizer_ts = "/server/php/zendOptimizer/lib/Optimizer"

The mysql.ini is to set up in the same way. Only start and stopping mysql is a bit tricky

Code: [Select]
title MySQL-Server
echo Please dont close Window while MySQL is running
echo MySQL is trying to start
echo Please wait  ...
echo MySQL is starting (console)
mysql\bin\mysqld-nt --defaults-file=\server\mysql\my.ini --standalone

Code: [Select]
mysql\bin\mysqladmin -u root -p password shutdown

So you can set up your WAMP(P) on an usb stick. I haven't finde out a way how to set up perl this way. Maybe some other can help!   ;)