Old:4.0-Mona: Multi-Servers: Difference between revisions
mNo edit summary |
mNo edit summary |
||
Line 2: | Line 2: | ||
'''Install – Multi-Servers''' | '''Install – Multi-Servers''' | ||
With the introduction of Uniform Server 4.1-Mona running multi-servers is made extremely easy using its inbuilt plugin. This plugin allows you to move the servers to different ports renaming executables and services to avoid conflicts. | |||
Although this was possible with 4.0-Mona it required editing a number of files which was prone to error. | |||
Why would you want to run several servers on the same PC? It allows you to experiment within a single environment and explore front and backend servers. Another use, with each server being independent you can host a single application allowing you to have a personal MediaWiki and say another with Wordpress both running from their own USB memory sticks. | |||
== Background == | |||
Unlike earlier versions of Uniform Server all scripts in 4.1-Mona directly obtain port information from Apache and MySQL configuration files. In addition executable names are not assumed they are checked at source. Hence if any of these parameters are changed they are automatically picked up allowing the servers to be moved. | |||
Uniform Server’s security features track these changes preventing false security alerts. | |||
Uniform | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
== Running move server script == | |||
I recommend starting with a fresh install of Uniform Server (just extract it to any folder). The script reads current server configuration and increments their values these are both displayed. Incremented values are only recommendations you can override these if you wish. | |||
'''Run Script:''' | |||
* Navigate to folder UniServer\udrive\plugins\'''move_servers''' | |||
* Double click on '''Run.bat''' | |||
* Press '''enter''' at each input prompt. | |||
* That’s all you need to do, a typical run looks similar to this: | |||
<pre> | <pre> | ||
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] : | |||
= | |||
===== SERVICE Path and Service names ==== | |||
Current Path = c:/UniServer Proposed path = [c:/UniServer1] : | |||
Current Apache name = Apache2 Proposed name = [Apache3] : | |||
Current MySQL name = MySQL Proposed name = [MySQL1] : | |||
===== Controller Executable name ==== | |||
Current = UniController.exe Proposed [UniController1.exe] : | |||
===== eAccelerator ==== | |||
If running a single server do not disable eAccelerator. | |||
For multi-servers enter YES | |||
Disable_eAccelerator type YES or N [YES] : | |||
Commit type Y or N [Y] : | |||
</pre> | </pre> | ||
You can now copy this server to a USB memory stick or run the service script to install as a service. | |||
Alternatively run it from its current location. | |||
To create another multi-server install a fresh copy of Uniform Server v4.1-Mona and run the move script '''twice'''. Again this server can be installed on a USB memory stick, installed as a service or run from its current location. | |||
'''''Note 1'':''' For each new multi-server run the move-server script appropriate number of times. | |||
''''' | '''''Note 2'':''' With the exception of ports 135 and 445 the script does not check for ports in use (would lead to confusion) hence there may be a conflict, run the script again and manually enter your new values. The two ports that are checked are skipped and the next value used. | ||
'''''Note 3'':''' Running more than a single server in either Basis or Disk-root mode with eAccelerator cause a conflict hence the need to disable it. However it may be enabled for all servers running as a service and one running in Basic or Disk-root. | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
== | == Power example == | ||
This is an extreme example however does demonstrate the power of Uniform Server Mona. | |||
The following shows how to set-up five servers, runs two as a service, one basic on hard drive, one disk-root and one basic on a USB memory stick. | |||
# Create five folders named '''test1 to test5''' | |||
# Extract a copy of Uniform Server 4.1 to '''folder1''' | |||
## Navigate to folder test1\UniServer\udrive\plugins\'''Services''' | |||
## Double click '''Run.bat''' | |||
## Let it install and run as a service. | |||
# Extract a copy of Uniform Server 4.1 to '''folder2''' | |||
## Navigate to folder \test2\UniServer\udrive\plugins\'''move_servers''' | |||
## Double click '''Run.bat''' | |||
## Press enter at all prompts (accepts defaults) – Moves the server to different ports | |||
## Navigate to folder test2\UniServer\udrive\plugins\'''Services''' | |||
## Double click '''Run.bat''' | |||
## Let it install and run as a service. | |||
# Copy of folder Uniform Server from '''folder2''' to '''folder3''' | |||
## Navigate to folder \test3\UniServer\udrive\plugins\'''move_servers''' | |||
## Double click '''Run.bat''' | |||
## Press enter at all prompts (accepts defaults) – Moves the server to different ports | |||
## Start Servers using UniController | |||
# Copy of folder Uniform Server from '''folder3''' to folder4 | |||
## Navigate to folder \test4\UniServer\udrive\plugins\'''move_servers''' | |||
## Double click '''Run.bat''' | |||
## Press enter at all prompts (accepts defaults) – Moves the server to different ports | |||
## Copy Folder '''test4''' to a '''USB memory stick''' (alternatively leave where it is) | |||
## Start Servers using UniController | |||
# Copy of folder Uniform Server from '''folder4''' to '''folder5''' | |||
## Navigate to folder \test5\UniServer\udrive\plugins\'''move_servers''' | |||
## Double click '''Run.bat''' | |||
## Press enter at all prompts (accepts defaults) – Moves the server to different ports | |||
## Copy the contents of folder test5\UniServer\udrive to USB top-level | |||
## Copy test5\UniServer\'''UniController.exe''' to USB top-level | |||
## Copy test5\UniServer\'''disk_start.vbs''' to USB top-level | |||
## Start Servers using UniController | |||
You now have five running servers. | |||
'''''Note'':''' If you cannot remember what ports were assigned run UniControllers test facility; for services check Apache and MySQL configuration files. | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
== Manually move servers == | |||
You can move the servers manually I have included this section to provide an insight into what the move server script performs. | |||
=== | ==== Configuration summary ==== | ||
{|cellpadding="2" cellspacing="2" | |||
|- style="background:#e8e8e8;" | |||
|'''Parameter'''||'''Original configuration'''||'''New Configuration''' | |||
|- style="background:#f5f5f5;" | |||
|Apache port||80||81 | |||
|- style="background:#f5f5f5;" | |||
|SSL port||443||444 | |||
|- style="background:#f5f5f5;" | |||
|MySQL port||3306||3307 | |||
|- style="background:#f5f5f5;" | |||
|Apache name||Apache.exe||Apache1.exe | |||
|- style="background:#f5f5f5;" | |||
|Service path||c:/UniServer||c:/UniServer1 | |||
|- style="background:#f5f5f5;" | |||
|Service Apache name||Apache2||Apache3 | |||
|- style="background:#f5f5f5;" | |||
|Service MySQL name||MySQL||MySQL1 | |||
|- style="background:#f5f5f5;" | |||
|Unicontroller name||UniController.exe||UniController1.exe | |||
|} | |||
==== Manually move ==== | |||
To move a server manually perform the following: | |||
== | ==== Service - Optional ==== | ||
Skip this section if you don't want to run as a service | |||
# Edit file UniServer\udrive\plugins\Services\'''w2c1.pl''' | |||
## Replace one occurrence of '''c:/UniServer''' with '''c:/UniServer1''' | |||
## Replace one occurrence of '''Apache.exe''' with '''Apache1.exe''' | |||
## Replace one occurrence of '''"Apache2"''' with '''"Apache3"''' | |||
## Replace one occurrence of '''$res=`net start Apache2`'''; with '''$res=`net start Apache3`'''; | |||
## Replace one occurrence of '''--install MySQL''' with '''--install MySQL1''' | |||
## Replace one occurrence of '''$res=`net start mysql`''' with '''$res=`net start MySQL1`''' | |||
# Edit file UniServer\udrive\plugins\Services\files\'''Install.bat''' | |||
## Replace four occurrences of '''Apache2''' with '''Apache3''' | |||
## Replace three occurrences of '''MySQL''' with '''MySQL1''' | |||
# Edit file UniServer\udrive\plugins\Services\files\'''Uninstall.bat''' | |||
## Replace two occurrences of '''Apache2''' with '''Apache3''' | |||
## Replace three occurrences of '''MySQL''' with '''MySQL1''' | |||
==== Required changes ==== | |||
# Edit file \udrive\usr\local\php\'''php.ini''' | |||
## Comment the following lines as shown:<br>''';''' extension=eaccelerator.dll<br>''';''' eaccelerator.allowed_admin_path=/home/admin/www/plugins/eaccelerator/control.php<br>''';''' eaccelerator.debug = 0 | |||
# Navigate to folder '''UniServer''' | |||
## Rename '''UniController.exe''' to '''UniController1.exe''' | |||
# Edit file UniServer\udrive\home\admin\program\unicon.txt''' change text from '''UniController.exe''' to '''UniController1.exe''' | |||
# Navigate to folder '''UniServer\udrive\usr\local\apache2\bin''' | |||
## Rename '''Apache.exe''' to '''Apache1.exe''' | |||
## Create a new file named '''unicon.ini''' | |||
## Edit file '''unicon.ini''' and add this section:<br>[APACHE]<br>Apache3.exe | |||
# Edit file UniServer\udrive\usr\local\apache2\conf\'''httpd.conf''' | |||
## Change '''Listen 80''' to '''Listen 81''' | |||
## Change two occurrences of '''ServerName localhost:80''' to '''ServerName localhost:81''' | |||
# Edit file UniServer\udrive\usr\local\apache2\conf\'''ssl.conf''' | |||
## Change two occurrences of '''443''' to '''444''' | |||
# Edit file UniServer\udrive\usr\local\mysql\'''my.cnf''' | |||
## Change two occurrences of '''3306''' to '''3307''' | |||
# Edit file UniServer\udrive\home\admin\www\'''redirect.html''' | |||
## Change '''<nowiki>http://localhost/apanel/</nowiki>''' to '''<nowiki>http://localhost:81/apanel/</nowiki>''' | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' | ||
== | == Summary == | ||
When manually moving a server although there are a number of steps to perform it is relatively easy. | |||
When | |||
Using 4.1-Mona's in-built script it is extremely easy to move a server requiring just a few key presses. | |||
'''''[[#top | Top]]''''' | '''''[[#top | Top]]''''' |
Revision as of 23:08, 3 April 2009
4-Mona: Introduction | Install | Security features | Enable SSL | Multi-Servers | UniController | UniTray | Security and passwords | Known Issues | Support
|
|
The Uniform Server 4-Mona |
Install – Multi-Servers
With the introduction of Uniform Server 4.1-Mona running multi-servers is made extremely easy using its inbuilt plugin. This plugin allows you to move the servers to different ports renaming executables and services to avoid conflicts.
Although this was possible with 4.0-Mona it required editing a number of files which was prone to error.
Why would you want to run several servers on the same PC? It allows you to experiment within a single environment and explore front and backend servers. Another use, with each server being independent you can host a single application allowing you to have a personal MediaWiki and say another with Wordpress both running from their own USB memory sticks.
Background
Unlike earlier versions of Uniform Server all scripts in 4.1-Mona directly obtain port information from Apache and MySQL configuration files. In addition executable names are not assumed they are checked at source. Hence if any of these parameters are changed they are automatically picked up allowing the servers to be moved.
Uniform Server’s security features track these changes preventing false security alerts.
Running move server script
I recommend starting with a fresh install of Uniform Server (just extract it to any folder). The script reads current server configuration and increments their values these are both displayed. Incremented values are only recommendations you can override these if you wish.
Run Script:
- Navigate to folder UniServer\udrive\plugins\move_servers
- Double click on Run.bat
- Press enter at each input prompt.
- That’s all you need to do, a typical run looks similar to 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] : ===== SERVICE Path and Service names ==== Current Path = c:/UniServer Proposed path = [c:/UniServer1] : Current Apache name = Apache2 Proposed name = [Apache3] : Current MySQL name = MySQL Proposed name = [MySQL1] : ===== Controller Executable name ==== Current = UniController.exe Proposed [UniController1.exe] : ===== eAccelerator ==== If running a single server do not disable eAccelerator. For multi-servers enter YES Disable_eAccelerator type YES or N [YES] : Commit type Y or N [Y] :
You can now copy this server to a USB memory stick or run the service script to install as a service.
Alternatively run it from its current location.
To create another multi-server install a fresh copy of Uniform Server v4.1-Mona and run the move script twice. Again this server can be installed on a USB memory stick, installed as a service or run from its current location.
Note 1: For each new multi-server run the move-server script appropriate number of times.
Note 2: With the exception of ports 135 and 445 the script does not check for ports in use (would lead to confusion) hence there may be a conflict, run the script again and manually enter your new values. The two ports that are checked are skipped and the next value used.
Note 3: Running more than a single server in either Basis or Disk-root mode with eAccelerator cause a conflict hence the need to disable it. However it may be enabled for all servers running as a service and one running in Basic or Disk-root.
Power example
This is an extreme example however does demonstrate the power of Uniform Server Mona.
The following shows how to set-up five servers, runs two as a service, one basic on hard drive, one disk-root and one basic on a USB memory stick.
- Create five folders named test1 to test5
- Extract a copy of Uniform Server 4.1 to folder1
- Navigate to folder test1\UniServer\udrive\plugins\Services
- Double click Run.bat
- Let it install and run as a service.
- Extract a copy of Uniform Server 4.1 to folder2
- Navigate to folder \test2\UniServer\udrive\plugins\move_servers
- Double click Run.bat
- Press enter at all prompts (accepts defaults) – Moves the server to different ports
- Navigate to folder test2\UniServer\udrive\plugins\Services
- Double click Run.bat
- Let it install and run as a service.
- Copy of folder Uniform Server from folder2 to folder3
- Navigate to folder \test3\UniServer\udrive\plugins\move_servers
- Double click Run.bat
- Press enter at all prompts (accepts defaults) – Moves the server to different ports
- Start Servers using UniController
- Copy of folder Uniform Server from folder3 to folder4
- Navigate to folder \test4\UniServer\udrive\plugins\move_servers
- Double click Run.bat
- Press enter at all prompts (accepts defaults) – Moves the server to different ports
- Copy Folder test4 to a USB memory stick (alternatively leave where it is)
- Start Servers using UniController
- Copy of folder Uniform Server from folder4 to folder5
- Navigate to folder \test5\UniServer\udrive\plugins\move_servers
- Double click Run.bat
- Press enter at all prompts (accepts defaults) – Moves the server to different ports
- Copy the contents of folder test5\UniServer\udrive to USB top-level
- Copy test5\UniServer\UniController.exe to USB top-level
- Copy test5\UniServer\disk_start.vbs to USB top-level
- Start Servers using UniController
You now have five running servers.
Note: If you cannot remember what ports were assigned run UniControllers test facility; for services check Apache and MySQL configuration files.
Manually move servers
You can move the servers manually I have included this section to provide an insight into what the move server script performs.
Configuration summary
Parameter | Original configuration | New Configuration |
Apache port | 80 | 81 |
SSL port | 443 | 444 |
MySQL port | 3306 | 3307 |
Apache name | Apache.exe | Apache1.exe |
Service path | c:/UniServer | c:/UniServer1 |
Service Apache name | Apache2 | Apache3 |
Service MySQL name | MySQL | MySQL1 |
Unicontroller name | UniController.exe | UniController1.exe |
Manually move
To move a server manually perform the following:
Service - Optional
Skip this section if you don't want to run as a service
- Edit file UniServer\udrive\plugins\Services\w2c1.pl
- Replace one occurrence of c:/UniServer with c:/UniServer1
- Replace one occurrence of Apache.exe with Apache1.exe
- Replace one occurrence of "Apache2" with "Apache3"
- Replace one occurrence of $res=`net start Apache2`; with $res=`net start Apache3`;
- Replace one occurrence of --install MySQL with --install MySQL1
- Replace one occurrence of $res=`net start mysql` with $res=`net start MySQL1`
- Edit file UniServer\udrive\plugins\Services\files\Install.bat
- Replace four occurrences of Apache2 with Apache3
- Replace three occurrences of MySQL with MySQL1
- Edit file UniServer\udrive\plugins\Services\files\Uninstall.bat
- Replace two occurrences of Apache2 with Apache3
- Replace three occurrences of MySQL with MySQL1
Required changes
- Edit file \udrive\usr\local\php\php.ini
- Comment the following lines as shown:
; extension=eaccelerator.dll
; eaccelerator.allowed_admin_path=/home/admin/www/plugins/eaccelerator/control.php
; eaccelerator.debug = 0
- Comment the following lines as shown:
- Navigate to folder UniServer
- Rename UniController.exe to UniController1.exe
- Edit file UniServer\udrive\home\admin\program\unicon.txt change text from UniController.exe to UniController1.exe
- Navigate to folder UniServer\udrive\usr\local\apache2\bin
- Rename Apache.exe to Apache1.exe
- Create a new file named unicon.ini
- Edit file unicon.ini and add this section:
[APACHE]
Apache3.exe
- Edit file UniServer\udrive\usr\local\apache2\conf\httpd.conf
- Change Listen 80 to Listen 81
- Change two occurrences of ServerName localhost:80 to ServerName localhost:81
- Edit file UniServer\udrive\usr\local\apache2\conf\ssl.conf
- Change two occurrences of 443 to 444
- Edit file UniServer\udrive\usr\local\mysql\my.cnf
- Change two occurrences of 3306 to 3307
- Edit file UniServer\udrive\home\admin\www\redirect.html
- Change http://localhost/apanel/ to http://localhost:81/apanel/
Summary
When manually moving a server although there are a number of steps to perform it is relatively easy.
Using 4.1-Mona's in-built script it is extremely easy to move a server requiring just a few key presses.