logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> How-to's & Documentation & Tips View previous topic :: View next topic
Reply to topic   Topic: How to run on an usb stick
Author
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7371
Location: Germany, Next to Hamburg

PostPosted: Tue 17 Jul '07 13:47    Post subject: How to run on an usb stick Reply with quote

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:

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:

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:

@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:

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! Wink
Back to top


Reply to topic   Topic: How to run on an usb stick View previous topic :: View next topic
Post new topic   Forum Index -> How-to's & Documentation & Tips