5.0-Nano: Multi-Servers: Difference between revisions

Punctuation and grammatical changes; some clarification and reorganization.
mNo edit summary
(Punctuation and grammatical changes; some clarification and reorganization.)
 
Line 1: Line 1:
{{Nav 5.0-Nano}}
{{Nav 5.0-Nano}}
'''Uniform Server 5.0-Nano Multi-Servers'''
'''Uniform Server 5-Nano Multi-Servers'''


One of Uniform Server’s unique features is the capability to run more than one complete server on the same PC.
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 collisions.
You can use this to great advantage and prevent server clashes.


Moving UniServer increments the tray icon displaying a new digit for each server.
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.
In addition to the number displayed by the tray icon, running '''server status''' displays the new server's configuration.


In reality it’s not just a port change the servers are reconfigured.
To run multiple server instances on the same PC, several items require changing such as server ports,
service names, Apache, MySql 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'''


Running server status displays the new server's configuration.


'''''[[#top | Top]]'''''
=== Option 1 ===
== Overview ==
You can invoke the script from UniTray:
To run multi-servers on the same PC several items require changing such as server ports,
* Assumes this is the only server currently running. If not, close all other running servers, including their UniTrays.
service names, Apache and UniTray executable names.
* Use either the right or left menu and mouse-over "Advanced"
* Click '''Move Servers multi-server operation'''
* Repeat as needed to change to the desired configuration set; this is indicated by the UniTray icon number.


Manually changing these can be time consuming and prone to errors.
=== Option 2 ===
The process has been automated with the following script: '''move_servers.php'''
Alternatively, the batch file '''Run.bat''' will invoke the script.
 
'''''[[#top | Top]]'''''
=== Run script option 1 ===
The script is run from the following batch file '''Run.bat'''
* Close all running servers including UniTrays  
* 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 the appropriate values.  


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


=== Run script option 2 ===
=== Script Details ===
Alternatively you can run the script from UniTray:
Unless you want to use specific ports and names, accept the defaults
* 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 | Top]]'''''
 
=== Script ===
Unless you want to use specific ports and names accept defaults
shown in brackets by pressing enter.
shown in brackets by pressing enter.


'''''Note'':''' If you manually change service or Apache executable names
'''''Note'':''' If you manually change service or Apache executable names
make sure these have eight or less characters.
make sure these have eight or less characters.


The script uses existing names and either adds a digit to end of this name  
The script uses existing names and either adds a digit to the end of this name  
 
or increments an exiting one. The ports are incremented and invalid ports are skipped.
or increments an exiting one. Ports are incremented, invalid ports are skipped.
When run for the first time, the output looks like this:
 
When run for the first time output looks like this:
<pre>
<pre>
################################################################################
################################################################################
Line 78: Line 66:
</pre>
</pre>


'''''[[#top | Top]]'''''
== Cloning servers ==
== Clone servers ==
If you know in advance the number of additional servers that will be run,
If you know in advance the number of additional servers that will be run
create them at the same time. It just makes the task a little easier.
create them at the same time, just makes the task a little easier.


# Extract a new copy of Uniform Server
# Extract a new copy of Uniform Server
# Move the server using the above script.
# Move the server using the above script.
# Clone this server (copy to a new folder)
# Clone this server (copy to a new folder, like UniServer2)
# Move the server using the above script.
# Move the server using the above script.
# Repeat steps 3 to 4 for each new server.
# Repeat steps 3 to 4 for each new server.


'''''[[#top | Top]]'''''
== UniTray ==
== UniTray ==
Unitray's icon is updated to reflect changes (digit increments)
Unitray's icon is updated to reflect changes (the digit increments).
 
If you wish to change the icon displayed, edit the images, but do not change their names (tray_image_1.dat-tray_image_9.dat)
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.
These are used within UniTray's configuration file and are dynamically updated when servers are moved.


'''''[[#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
there is no need to disable eAccelerator.
there is no need to disable eAccelerator.


If the servers are to be run as a standard program eAccelerator
If the servers are to be run as a standard program,
 
eAccelerator must be disabled, otherwise Apache will fail to start.
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:


Remember to append the new port number to ''localhost'' to access the server pages.
For example, if the server was moved to port '''81''', type the following into your browser:
* <nowiki>http://localhost</nowiki>:'''81'''/
* <nowiki>http://localhost</nowiki>:'''81'''/


=== Important note MySQL port ===
=== Important note: MySQL port ===
When installing third party software you may be given a choice of entering a port number,
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 status'''from UniTray)  
enter the one corresponding to the moved server (you can find this by running '''server status'''from UniTray)  
 
If this option is not provided (generally not) then append it to the server


If this option is not provided (generally not), then append it to the server
name e.g. '''localhost:3307'''
name e.g. '''localhost:3307'''


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


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


Not sure what a draconian dragon is follow the first two links.
Not sure what a draconian dragon is? Follow the second link.
{|
{|
|-valign="top"
|-valign="top"
Line 134: Line 110:
[[DtDNS: Introduction |'''DtDNS Introduction''']]
[[DtDNS: Introduction |'''DtDNS Introduction''']]
|
|
Design notes for DtDNS updater and how to avoid draconian dragons.
Design notes for DtDNS updater.
|-valign="top"
|-valign="top"
|
|
[[PHP cURL: Introduction | '''PHP cURL Introduction''']]
[[PHP cURL: Introduction | '''PHP cURL Introduction''']]
|
|
Tutorial explaining cURL basics. Techniques are used in Server Status. Also shows how to avoid draconian dragons.
Tutorial explaining cURL basics. These techniques are used in Server Status. Also shows how to avoid draconian dragons.
|}
|}
== Summary ==
== 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.
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.
I run my personal MediaWiki on icon 2 (servers moved one level) so I can carry it on my USB stick and know it will not collide with an IIS server on another PC.


[[5.0-Nano: Perl | '''Next page''']] covers running Perl on Uniform Server 5-Nano.
[[5.0-Nano: Perl | '''Next page''']] covers running Perl on Uniform Server 5-Nano.


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


----
----


[[Category: Uniform Server 5.0-Nano]]
[[Category: Uniform Server 5.0-Nano]]