Oily Rag 1: CD Part 2: Difference between revisions

no edit summary
(New page: {{Uc nav oily rag 1 CD}} '''USCD1 Plugin''' On the previous page I have shown how easy it is to modify Uniform Server 3.5-Apollo and have it running from a CD. You currently have a collec...)
 
No edit summary
Line 1: Line 1:
=[http://uvetysudema.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
{{Uc nav oily rag 1 CD}}
{{Uc nav oily rag 1 CD}}
'''USCD1 Plugin'''
'''USCD1 Plugin'''
Line 11: Line 12:
Currently we have a collection of files in folder '''uscd''' these I have listed below. During switching these files are copied to the location shown. While copying each file its name is changed back to the original. To perform this copying we use two batch files '''cd_mode_switch.bat''' copies only the new files and '''us_mode_switch.bat''' copies original (old) files, thus switching between CD and normal Uniform Server mode respectively.
Currently we have a collection of files in folder '''uscd''' these I have listed below. During switching these files are copied to the location shown. While copying each file its name is changed back to the original. To perform this copying we use two batch files '''cd_mode_switch.bat''' copies only the new files and '''us_mode_switch.bat''' copies original (old) files, thus switching between CD and normal Uniform Server mode respectively.


{|cellpadding="4" cellspacing="1" style="background:#eeeeee"
{|cellpadding="4" cellspacing="1" style="background:#eeeeee"
|-
|-
!style="background:#d7d7d7"|File
!style="background:#d7d7d7"|File
!style="background:#d7d7d7"|Location
!style="background:#d7d7d7"|Location
! 
! 
|-valign="top"
|-valign="top"
|style="background:#e6e6e6"|new_httpd.conf<br>
|style=&quot;background:#e6e6e6&quot;|new_httpd.conf&lt;br&gt;
old_httpd.conf
old_httpd.conf
|style="background:#e6e6e6"|*\Uniform Server\udrive\usr\local\apache2\conf
|style=&quot;background:#e6e6e6&quot;|*\Uniform Server\udrive\usr\local\apache2\conf
|valign="middle"|Apache
|valign=&quot;middle&quot;|Apache
|-valign="top"
|-valign=&quot;top&quot;
|style="background:#f5f5f5"|new_my-small.cnf<br>
|style=&quot;background:#f5f5f5&quot;|new_my-small.cnf&lt;br&gt;
old_my-small.cnf
old_my-small.cnf
|style="background:#f5f5f5"|*\Uniform Server\udrive\usr\local\mysql\bin
|style=&quot;background:#f5f5f5&quot;|*\Uniform Server\udrive\usr\local\mysql\bin
|valign="middle"|MySQL
|valign=&quot;middle&quot;|MySQL
|-valign="top"
|-valign=&quot;top&quot;
|style="background:#e6e6e6"|new_php.ini<br>
|style=&quot;background:#e6e6e6&quot;|new_php.ini&lt;br&gt;
old_php.ini
old_php.ini
|style="background:#e6e6e6"|*\Uniform Serve\udrive\usr\local\php
|style=&quot;background:#e6e6e6&quot;|*\Uniform Serve\udrive\usr\local\php
|valign="middle"|PHP
|valign=&quot;middle&quot;|PHP
|-valign="top"
|-valign=&quot;top&quot;
|style="background:#f5f5f5"|new_config.inc.php<br>
|style=&quot;background:#f5f5f5&quot;|new_config.inc.php&lt;br&gt;
old_config.inc.php
old_config.inc.php
|style="background:#f5f5f5"|*\Uniform Serve\udrive\home\admin\www\phpMyAdmin
|style=&quot;background:#f5f5f5&quot;|*\Uniform Serve\udrive\home\admin\www\phpMyAdmin
|valign="middle"|phpMyAdmin
|valign=&quot;middle&quot;|phpMyAdmin
|-valign="top"
|-valign=&quot;top&quot;
|style="background:#e6e6e6"|new_Server_Start.bat<br>
|style=&quot;background:#e6e6e6&quot;|new_Server_Start.bat&lt;br&gt;
old_Server_Start.bat
old_Server_Start.bat
|style="background:#e6e6e6"|*\Uniform Server  
|style=&quot;background:#e6e6e6&quot;|*\Uniform Server  
|valign="middle"|UniServer Control
|valign=&quot;middle&quot;|UniServer Control
|-valign="top"
|-valign=&quot;top&quot;
|style="background:#f5f5f5"|new_Stop.bat<br>
|style=&quot;background:#f5f5f5&quot;|new_Stop.bat&lt;br&gt;
old_Stop.bat
old_Stop.bat
|style="background:#f5f5f5"|*\Uniform Server  
|style=&quot;background:#f5f5f5&quot;|*\Uniform Server  
|valign="middle"|UniServer Cont
|valign=&quot;middle&quot;|UniServer Cont
|}
|}


Line 62: Line 63:
Before looking at the batch files an understanding of the commands used will make the whole process easier to understand.
Before looking at the batch files an understanding of the commands used will make the whole process easier to understand.


{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!Batch Command
!Batch Command
!Explanation
!Explanation
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="border:none">
&lt;pre style=&quot;border:none&quot;&gt;
pushd %~dp0
pushd %~dp0
....
....
Line 74: Line 75:
....
....
popd
popd
</pre>
&lt;/pre&gt;
|
|
* '''pushd''' Pushes the Current Directory onto a memory stack (Where you came from).
* '''pushd''' Pushes the Current Directory onto a memory stack (Where you came from).
* '''%~dp0''' This forces the current working directory to the current location of the batch file you are running. It includes the full path not just the drive letter (if its remote that’s included).
* '''%~dp0''' This forces the current working directory to the current location of the batch file you are running. It includes the full path not just the drive letter (if its remote that’s included).
* '''popd''' Restores the previously pushed directory (effectively returns control back to whatever call the batch file).
* '''popd''' Restores the previously pushed directory (effectively returns control back to whatever call the batch file).
|-style="background:#f5f5f5;"
|-style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="border:none">
&lt;pre style=&quot;border:none&quot;&gt;
COPY switches source destination
COPY switches source destination
</pre>
&lt;/pre&gt;
|
|
'''COPY switches source destination''' Copies one or more files to another location.
'''COPY switches source destination''' Copies one or more files to another location.
Line 92: Line 93:


'''''Switches'':''' '''/Y''' Suppresses prompting to confirm you want to overwrite an existing destination file.
'''''Switches'':''' '''/Y''' Suppresses prompting to confirm you want to overwrite an existing destination file.
|-style="background:#f5f5f5;"
|-style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="border:none">
&lt;pre style=&quot;border:none&quot;&gt;
..\folder\file_name
..\folder\file_name


..\..\folder\file_name
..\..\folder\file_name
</pre>
&lt;/pre&gt;
|
|
'''..\ not a DOS command''' Its a relative path name '''..\''' means move up one folder level '''..\..\''' move up two folder levels.
'''..\ not a DOS command''' Its a relative path name '''..\''' means move up one folder level '''..\..\''' move up two folder levels.
Line 111: Line 112:
Double click on this file and you are back to a default installation of Uniform Server (Well the files we have been using). The above comments also apply to this file.
Double click on this file and you are back to a default installation of Uniform Server (Well the files we have been using). The above comments also apply to this file.


{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!us_mode_switch.bat
!us_mode_switch.bat
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="border:none">
&lt;pre style=&quot;border:none&quot;&gt;
rem File Name: us_mode_switch.bat
rem File Name: us_mode_switch.bat
rem Location: Uniform Server\udrive\plugins\uscd1\uscd
rem Location: Uniform Server\udrive\plugins\uscd1\uscd
Line 136: Line 137:
copy /Y old_Stop.bat ..\..\..\..\Stop.bat
copy /Y old_Stop.bat ..\..\..\..\Stop.bat
rem == Apache
rem == Apache
copy /Y old_httpd.conf ..\..\..\usr\local\apache2\conf\httpd.conf"
copy /Y old_httpd.conf ..\..\..\usr\local\apache2\conf\httpd.conf&quot;
rem == MySQL
rem == MySQL
copy /Y old_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf"
copy /Y old_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf&quot;
rem == php
rem == php
copy /Y old_php.ini ..\..\..\usr\local\php\php.ini"
copy /Y old_php.ini ..\..\..\usr\local\php\php.ini&quot;
rem == phpMyAdmin
rem == phpMyAdmin
copy /Y old_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php"
copy /Y old_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php&quot;
echo.
echo.
echo Switched to US Mode
echo Switched to US Mode
Line 148: Line 149:
pause
pause
popd
popd
</pre>
&lt;/pre&gt;
|}  
|}  


Line 156: Line 157:
Double click on this file and you are ready to make a few beer coasters. It really does not require an explanation; you are copying new files and overwriting the old ones.
Double click on this file and you are ready to make a few beer coasters. It really does not require an explanation; you are copying new files and overwriting the old ones.


{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!cd_mode_switch.bat
!cd_mode_switch.bat
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="border:none">
&lt;pre style=&quot;border:none&quot;&gt;
rem File Name: cd_mode_switch.bat
rem File Name: cd_mode_switch.bat
rem Location: Uniform Server\udrive\plugins\uscd1\uscd
rem Location: Uniform Server\udrive\plugins\uscd1\uscd
Line 181: Line 182:
copy /Y new_Stop.bat ..\..\..\..\Stop.bat
copy /Y new_Stop.bat ..\..\..\..\Stop.bat
rem == Apache
rem == Apache
copy /Y new_httpd.conf ..\..\..\usr\local\apache2\conf\httpd.conf"
copy /Y new_httpd.conf ..\..\..\usr\local\apache2\conf\httpd.conf&quot;
rem == MySQL
rem == MySQL
copy /Y new_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf"
copy /Y new_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf&quot;
rem == php
rem == php
copy /Y new_php.ini ..\..\..\usr\local\php\php.ini"
copy /Y new_php.ini ..\..\..\usr\local\php\php.ini&quot;
rem == phpMyAdmin
rem == phpMyAdmin
copy /Y new_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php"
copy /Y new_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php&quot;
echo.
echo.
echo Switched to CD Mode
echo Switched to CD Mode
Line 193: Line 194:
pause
pause
popd
popd
</pre>
&lt;/pre&gt;
|}  
|}  


Line 200: Line 201:
== us_mode.bat ==
== us_mode.bat ==
An alternative method of running the above two files.
An alternative method of running the above two files.
{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!us_mode.bat
!us_mode.bat
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="margin:0;border:none">
&lt;pre style=&quot;margin:0;border:none&quot;&gt;
rem Location: *\Uniform Server\udrive\plugins\uscd1
rem Location: *\Uniform Server\udrive\plugins\uscd1


uscd\us_mode_switch.bat
uscd\us_mode_switch.bat
</pre>
&lt;/pre&gt;
|}  
|}  
<br>
&lt;br&gt;
{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!us_mode.bat
!us_mode.bat
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="margin:0;border:none">
&lt;pre style=&quot;margin:0;border:none&quot;&gt;
rem Location: Uniform Server
rem Location: Uniform Server


udrive\plugins\uscd1\uscd\us_mode_switch.bat
udrive\plugins\uscd1\uscd\us_mode_switch.bat
</pre>
&lt;/pre&gt;
|}  
|}  


Line 229: Line 230:
Another alternative method of running the above two main files.
Another alternative method of running the above two main files.


{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!cd_mode.bat
!cd_mode.bat
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="margin:0;border:none">
&lt;pre style=&quot;margin:0;border:none&quot;&gt;
rem Location: *\Uniform Server\udrive\plugins\uscd1
rem Location: *\Uniform Server\udrive\plugins\uscd1


uscd\cd_mode_switch.bat
uscd\cd_mode_switch.bat
</pre>
&lt;/pre&gt;
|}  
|}  
<br>
&lt;br&gt;
{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!cd_mode.bat
!cd_mode.bat
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="margin:0;border:none">
&lt;pre style=&quot;margin:0;border:none&quot;&gt;
rem Location: Uniform Server
rem Location: Uniform Server


udrive\plugins\uscd1\uscd\cd_mode_switch.bat
udrive\plugins\uscd1\uscd\cd_mode_switch.bat
</pre>
&lt;/pre&gt;
|}
|}


== File Overview ==
== File Overview ==
This shows where to place all the files.
This shows where to place all the files.
{| cellpadding="4" cellspacing="1" style="background:#000000;"
{| cellpadding=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
|- style="background:#e8e8e8;"
|- style=&quot;background:#e8e8e8;&quot;
!File Overview
!File Overview
|- style="background:#f5f5f5;"
|- style=&quot;background:#f5f5f5;&quot;
|
|
<pre style="border:none">
&lt;pre style=&quot;border:none&quot;&gt;
Uniform Server
Uniform Server


Line 276: Line 277:
old_config.inc.php  us_mode_switch.bat  new_httpd.conf      old_httpd.conf         
old_config.inc.php  us_mode_switch.bat  new_httpd.conf      old_httpd.conf         
new_my-small.cnf    old_my-small.cnf       
new_my-small.cnf    old_my-small.cnf       
</pre>
&lt;/pre&gt;
|}  
|}  


322

edits