Jump to content
The Uniform Server Community

Starting without Extra Drive


fr600
 Share

Recommended Posts

Hi,

 

First I wanna say that it's really a masterwork and I've been using uniserver for quite a long time.

 

Now, I have a question:

 

Is it possible to start the server with the help of the batch file without having an extra drive letter?

 

I know it should be possible, but could anyone please tell me how?

 

I hope you got what I'm trying to say.

Link to comment
Share on other sites

Uniform wont work without the extra drive, the virtual drive is need so that the paths in the config files work. You could install apache and mysql as windows services. Afaik uniform has a plugin for that.

Link to comment
Share on other sites

The only way to remove that Virtual drive is to install as a service as Ota pointed out.

 

You can install Uniform Server 3.5-Apollo as a service to any drive or folder you like

 

First read this page:

 

http://wiki.uniformserver.com/index.php/Bu...o:_Introduction

 

Install the Combined bug fix it now includes some enhancements (I have delayed publishing because I have not fully tested however I am confident that’s the final changes hence published.)

 

And this to install as a service:

 

http://wiki.uniformserver.com/index.php/Oi...-Apollo_Service

 

Check out this section:

 

Server Location

The script defaults to creating a folder named UniServerX.X on C drive to change these defaults:

1. Open file w2c1.pl (located in folder: *\Uniform Server\udrive\plugins\Services )

2. Locate the line: $pathc="c:/UniServerX.X"; change it as required.

· e.g. $pathc="e:/mpg/main_server"; (note use forward slashes)

Note: There is no restriction on folder depth ideally keep it to a single folder.

The ideal would be to allocate a dedicated drive for the server and dispense with any folders - would gain a slight speed increase

All that means is you can change the drive and folder/s to what you want.

 

All the best

Ric :)

Link to comment
Share on other sites

Thnx for ur reply.

 

but.. but

 

If I copy the folders inside "udrive" to the root of C or D drive (just like U drive), is it still not possible?

 

If it works from a virtual drive, why doesn't it work from a real drive? The path could be the same (except for the drive letter)..

Link to comment
Share on other sites

I missed the point you do not wish to run as a service but wish to run as a standard installation with no virtual drive.

 

No problem (not sure about drive c) hence I will explain using drive H.

 

Copy all the contents of folder udrive to drive H.

Copy Stop.bat and Server_Start.bat to drive H

 

Modify the above batch files as follows:

 

Stop.bat:--

 

@echo off

:udrive\home\admin\program\pskill.exe Apache.exe c

home\admin\program\pskill.exe Apache.exe c

 

if errorlevel 2 goto :PAUSE

 

:PAUSE

echo .

pause

 

:END

 

Server_Start.bat:----

 

home\admin\program\pskill.exe Apache.exe

 

if errorlevel 2 goto :PAUSE

 

if not errorlevel 1 goto :STARTED

 

set Disk=h

 

set apachepath=\usr\local\apache2\

set apacheit=%Disk%:%apachepath%bin\Apache.exe -f %apachepath%conf\httpd.conf -d %apachepath%.

set programit=%Disk%:\home\admin\program\

set closeit=%programit%close.bat %Disk%

 

%Disk%:

cd \usr\local\php

start \usr\local\mysql\bin\mysqld-opt.exe --defaults-file=/usr/local/mysql/bin/my-small.cnf

CLS

echo The server is working on the disk %Disk%:\ [http/127.0.0.1/apanel/]

set www=\www\

set apanel=\home\admin\www\

start %apanel%\redirect.html

 

if "%3"=="console" goto :CONSOLE

start %programit%uniserv.exe "%apacheit%" "%closeit%"

goto :END

 

:CONSOLE

%apacheit%

%closeit%

goto :END

 

:HINT

CLS

echo The disk %Disk% is busy. Use start.bat [disk letter]

goto :PAUSE

 

:STARTED

CLS

echo ERROR!!!

echo One of the instances of Apache server is started. Use stop.bat

 

:PAUSE

echo .

pause

 

:END

 

That’s all give it a bash.

 

All the best

Ric :)

Link to comment
Share on other sites

using %CD% we can do a lot of things.

 

open cmd.exe and type "echo %CD%". it will show like "C:\Documents and Settings\jacob lee"

 

type "echo %CD:~0,1% then it will show "C"

 

so we can change "set Disk=h" to:

set Disk=%CD:~0,1%

 

 

wow, I'm a Junior member!

Link to comment
Share on other sites

Yep! Liked the post, adds a little extra detail, explanation practical and makes for quick testing, popped this into the bat-snippets:

 

http://wiki.uniformserver.com/index.php/Ba..._drive_letter_2

 

All the best

Ric :)

 

PS the Wiki is there for anyone to add his or her own material for the benefit of the Uniform Server community. :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...