The Apache Haus Forum

Advanced search  

News:

Welcome to Apache Haus Distribution Forum

Pages: [1]   Go Down

Author Topic: How to run on an usb stick  (Read 3919 times)

mario

  • Administrator
  • Member Elite
  • *****
  • Offline Offline
  • Posts: 575
How to run on an usb stick
« 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
x:\server\logs


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

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

include_path="/server/php/pear;;"

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

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

stopping_mysql.cmd
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!   ;)
Logged
Pages: [1]   Go Up
 

Sitemap 1 2 3 4 5 6 7 8 9 10 11 12 13