5.0-Nano: Multi-Servers: Difference between revisions

From The Uniform Server Wiki
Jump to navigation Jump to search
(New page: {{Nav 5.0-Nano}} '''Uniform Server 5.0-Nano Multi-Servers''' One of Uniform Server’s unique features is the capability to run more than one complete server on the same PC. You can use ...)
 
mNo edit summary
Line 23: Line 23:
=== Run script option 1 ===
=== Run script option 1 ===
The script is run from the following batch file '''Run.bat'''
The script is run from the following batch file '''Run.bat'''
* Close all running servers including UniTrays
* Navigate to folder unicon\'''move_servers'''
* Navigate to folder unicon\'''move_servers'''
* Double click '''Run.bat''' and enter appropriate values.  
* Double click '''Run.bat''' and enter appropriate values.  


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
=== Run script option 2 ===
=== Run script option 2 ===
Alternatively you can run the script from UniTray:
Alternatively you can run the script from UniTray:
* Assumes this is the only server currently running. If not close all other running servers including their UniTrays.
* Use either the right or left menu
* Use either the right or left menu
* Mouse-over "Advanced"
* Mouse-over "Advanced"
Line 34: Line 37:


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''
=== Script ===
=== Script ===
Unless you want to use specific ports and names accept defaults
Unless you want to use specific ports and names accept defaults
Line 89: Line 93:
Unitray's icon is updated to reflect changes (digit increments)
Unitray's icon is updated to reflect changes (digit increments)


If you wish to change the icon displayed edit the images however do not
If you wish to change the icon displayed edit the images however do not change thir names (tray_image_1.dat-tray_image_9.dat)


change the image names (tray_image_1.dat-tray_image_9.dat) these are
These are used within UniTray's configuration file and are dynamically updated when servers are moved.


dynamically added to UniTray's configuration file.
'''''[[#top | Top]]'''''


'''''[[#top | Top]]'''''
== General Notes ==
== General Notes ==
If all the servers are to be installed as a service
If all the servers are to be installed as a service
Line 122: Line 125:
'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''


== Related links ==
Running multi servers on the same PC prevents awaking a draconian dragon!
Not sure what a draconian dragon is follow the first two links.
{|
|-valign="top"
|
[[DtDNS: Introduction |'''DtDNS Introduction''']]
|
Design notes for DtDNS updater and how to avoid draconian dragons.
|-valign="top"
|
[[PHP cURL: Introduction | '''PHP cURL Introduction''']]
|
Tutorial explaining cURL basics. Techniques are used in Server Status. Also shows how to avoid draconian dragons.
|}
== Summary ==
== Summary ==
Uniform Server 5.0-Nano is a significant upgrade although the main architecture has changed along with the main components and many new features added control remains simple. Just a few mouse clicks will have the servers running either as a standard program or service.
Having a capability of running more than one server on the same PC allows you to simulate external servers, for more information follow the above related links.
Scratch the surface a little and you will find a wealth of flexibility allowing you to tailored the servers. Dig deeper and you have access to a set of common PHP function allowing you to redesign server control should you wish.
 
I run my personal Media Wiki on icon 2 (servers moved one level) hence I can take my USB stick and know it will not clash with an IIS server on another PC.
 
[[5.0-Nano: Perl | '''Next page''']] covers running Perl on Uniform Server 5-Nano.


[[5.0-Nano: Install and Run | '''How to Install and run 5.0-Nano''']]


'''''[[#top | Top]]'''''
'''''[[#top | Top]]'''''

Revision as of 19:38, 11 September 2009

 

Uniform Server 5.0-Nano Multi-Servers

One of Uniform Server’s unique features is the capability to run more than one complete server on the same PC.

You can use this to great advantage and prevent server clashes.

Moving UniServer increments the tray icon displaying a new digit for each server.

In reality it’s not just a port change the servers are reconfigured.

Running server status displays the new server's configuration.

Top

Overview

To run multi-servers on the same PC several items require changing such as server ports, service names, Apache and UniTray executable names.

Manually changing these can be time consuming and prone to errors. The process has been automated with the following script: move_servers.php

Top

Run script option 1

The script is run from the following batch file Run.bat

  • Close all running servers including UniTrays
  • Navigate to folder unicon\move_servers
  • Double click Run.bat and enter appropriate values.

Top

Run script option 2

Alternatively you can run the script from UniTray:

  • Assumes this is the only server currently running. If not close all other running servers including their UniTrays.
  • Use either the right or left menu
  • Mouse-over "Advanced"
  • Click Move Servers multi-server operation

Top

Script

Unless you want to use specific ports and names accept defaults shown in brackets by pressing enter.

Note: If you manually change service or Apache executable names

make sure these have eight or less characters.

The script uses existing names and either adds a digit to end of this name

or increments an exiting one. Ports are incremented, invalid ports are skipped.

When run for the first time output looks like this:

################################################################################
 Current Apache port = 80         Proposed port [81] :
 Current SSL port    = 443        Proposed port [444] :
 Current MySQL port  = 3306       Proposed port [3307] :
 Current Apache name = Apache.exe Proposed name [Apache1.exe] :
 Current MySQL name  = mysqld-opt.exe  Proposed name [mysqld-opt1.exe] :

 ===== SERVICES Service names ====

 Current Apache name = ApacheS1 Proposed name = [ApacheS2] :
 Current MySQL  name = MySQLS1  Proposed name = [MySQLS2] :

 ===== UniTray Controller  ====
 Current UniTray name = UniTray1.exe Proposed name [UniTray2.exe] :

 ===== eAccelerator  ====

 If running a single server do not disable eAccelerator.
 For multi-servers enter Y

 Disable_eAccelerator type Y or N [Y] :

 Commit type Y or N [Y] :
################################################################################

Top

Clone servers

If you know in advance the number of additional servers that will be run create them at the same time, just makes the task a little easier.

  1. Extract a new copy of Uniform Server
  2. Move the server using the above script.
  3. Clone this server (copy to a new folder)
  4. Move the server using the above script.
  5. Repeat steps 3 to 4 for each new server.

Top

UniTray

Unitray's icon is updated to reflect changes (digit increments)

If you wish to change the icon displayed edit the images however do not change thir names (tray_image_1.dat-tray_image_9.dat)

These are used within UniTray's configuration file and are dynamically updated when servers are moved.

Top

General Notes

If all the servers are to be installed as a service

there is no need to disable eAccelerator.

If the servers are to be run as a standard program eAccelerator

must be disabled otherwise Apache will fail to start.

Remember to append the new port number to access server pages

for example if the server was moved to port 81 type the following into your browser:

  • http://localhost:81/

Important note MySQL port

When installing third party software you may be given a choice of entering a port number,

enter the one corresponding to the moved server (you can find this by running server statusfrom UniTray)

If this option is not provided (generally not) then append it to the server

name e.g. localhost:3307

Top

Related links

Running multi servers on the same PC prevents awaking a draconian dragon!

Not sure what a draconian dragon is follow the first two links.

DtDNS Introduction

Design notes for DtDNS updater and how to avoid draconian dragons.

PHP cURL Introduction

Tutorial explaining cURL basics. Techniques are used in Server Status. Also shows how to avoid draconian dragons.

Summary

Having a capability of running more than one server on the same PC allows you to simulate external servers, for more information follow the above related links.

I run my personal Media Wiki on icon 2 (servers moved one level) hence I can take my USB stick and know it will not clash with an IIS server on another PC.

Next page covers running Perl on Uniform Server 5-Nano.


Top