Oily Rag 1: CD Part 2: Difference between revisions

m
Reverted edits by Upazixorys (Talk); changed back to last version by Ric
No edit summary
m (Reverted edits by Upazixorys (Talk); changed back to last version by Ric)
 
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 12: Line 11:
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="background:#e6e6e6"|new_httpd.conf<br>
old_httpd.conf
old_httpd.conf
|style=&quot;background:#e6e6e6&quot;|*\Uniform Server\udrive\usr\local\apache2\conf
|style="background:#e6e6e6"|*\Uniform Server\udrive\usr\local\apache2\conf
|valign=&quot;middle&quot;|Apache
|valign="middle"|Apache
|-valign=&quot;top&quot;
|-valign="top"
|style=&quot;background:#f5f5f5&quot;|new_my-small.cnf&lt;br&gt;
|style="background:#f5f5f5"|new_my-small.cnf<br>
old_my-small.cnf
old_my-small.cnf
|style=&quot;background:#f5f5f5&quot;|*\Uniform Server\udrive\usr\local\mysql\bin
|style="background:#f5f5f5"|*\Uniform Server\udrive\usr\local\mysql\bin
|valign=&quot;middle&quot;|MySQL
|valign="middle"|MySQL
|-valign=&quot;top&quot;
|-valign="top"
|style=&quot;background:#e6e6e6&quot;|new_php.ini&lt;br&gt;
|style="background:#e6e6e6"|new_php.ini<br>
old_php.ini
old_php.ini
|style=&quot;background:#e6e6e6&quot;|*\Uniform Serve\udrive\usr\local\php
|style="background:#e6e6e6"|*\Uniform Serve\udrive\usr\local\php
|valign=&quot;middle&quot;|PHP
|valign="middle"|PHP
|-valign=&quot;top&quot;
|-valign="top"
|style=&quot;background:#f5f5f5&quot;|new_config.inc.php&lt;br&gt;
|style="background:#f5f5f5"|new_config.inc.php<br>
old_config.inc.php
old_config.inc.php
|style=&quot;background:#f5f5f5&quot;|*\Uniform Serve\udrive\home\admin\www\phpMyAdmin
|style="background:#f5f5f5"|*\Uniform Serve\udrive\home\admin\www\phpMyAdmin
|valign=&quot;middle&quot;|phpMyAdmin
|valign="middle"|phpMyAdmin
|-valign=&quot;top&quot;
|-valign="top"
|style=&quot;background:#e6e6e6&quot;|new_Server_Start.bat&lt;br&gt;
|style="background:#e6e6e6"|new_Server_Start.bat<br>
old_Server_Start.bat
old_Server_Start.bat
|style=&quot;background:#e6e6e6&quot;|*\Uniform Server  
|style="background:#e6e6e6"|*\Uniform Server  
|valign=&quot;middle&quot;|UniServer Control
|valign="middle"|UniServer Control
|-valign=&quot;top&quot;
|-valign="top"
|style=&quot;background:#f5f5f5&quot;|new_Stop.bat&lt;br&gt;
|style="background:#f5f5f5"|new_Stop.bat<br>
old_Stop.bat
old_Stop.bat
|style=&quot;background:#f5f5f5&quot;|*\Uniform Server  
|style="background:#f5f5f5"|*\Uniform Server  
|valign=&quot;middle&quot;|UniServer Cont
|valign="middle"|UniServer Cont
|}
|}


Line 63: Line 62:
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=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
{| cellpadding="4" cellspacing="1" style="background:#000000;"
|- style=&quot;background:#e8e8e8;&quot;
|- style="background:#e8e8e8;"
!Batch Command
!Batch Command
!Explanation
!Explanation
|- style=&quot;background:#f5f5f5;&quot;
|- style="background:#f5f5f5;"
|
|
&lt;pre style=&quot;border:none&quot;&gt;
<pre style="border:none">
pushd %~dp0
pushd %~dp0
....
....
Line 75: Line 74:
....
....
popd
popd
&lt;/pre&gt;
</pre>
|
|
* '''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=&quot;background:#f5f5f5;&quot;
|-style="background:#f5f5f5;"
|
|
&lt;pre style=&quot;border:none&quot;&gt;
<pre style="border:none">
COPY switches source destination
COPY switches source destination
&lt;/pre&gt;
</pre>
|
|
'''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 93: Line 92:


'''''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=&quot;background:#f5f5f5;&quot;
|-style="background:#f5f5f5;"
|
|
&lt;pre style=&quot;border:none&quot;&gt;
<pre style="border:none">
..\folder\file_name
..\folder\file_name


..\..\folder\file_name
..\..\folder\file_name
&lt;/pre&gt;
</pre>
|
|
'''..\ 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 112: Line 111:
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=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
{| cellpadding="4" cellspacing="1" style="background:#000000;"
|- style=&quot;background:#e8e8e8;&quot;
|- style="background:#e8e8e8;"
!us_mode_switch.bat
!us_mode_switch.bat
|- style=&quot;background:#f5f5f5;&quot;
|- style="background:#f5f5f5;"
|
|
&lt;pre style=&quot;border:none&quot;&gt;
<pre style="border:none">
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 137: Line 136:
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&quot;
copy /Y old_httpd.conf ..\..\..\usr\local\apache2\conf\httpd.conf"
rem == MySQL
rem == MySQL
copy /Y old_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf&quot;
copy /Y old_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf"
rem == php
rem == php
copy /Y old_php.ini ..\..\..\usr\local\php\php.ini&quot;
copy /Y old_php.ini ..\..\..\usr\local\php\php.ini"
rem == phpMyAdmin
rem == phpMyAdmin
copy /Y old_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php&quot;
copy /Y old_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php"
echo.
echo.
echo Switched to US Mode
echo Switched to US Mode
Line 149: Line 148:
pause
pause
popd
popd
&lt;/pre&gt;
</pre>
|}  
|}  


Line 157: Line 156:
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=&quot;4&quot; cellspacing=&quot;1&quot; style=&quot;background:#000000;&quot;
{| cellpadding="4" cellspacing="1" style="background:#000000;"
|- style=&quot;background:#e8e8e8;&quot;
|- style="background:#e8e8e8;"
!cd_mode_switch.bat
!cd_mode_switch.bat
|- style=&quot;background:#f5f5f5;&quot;
|- style="background:#f5f5f5;"
|
|
&lt;pre style=&quot;border:none&quot;&gt;
<pre style="border:none">
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 182: Line 181:
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&quot;
copy /Y new_httpd.conf ..\..\..\usr\local\apache2\conf\httpd.conf"
rem == MySQL
rem == MySQL
copy /Y new_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf&quot;
copy /Y new_my-small.cnf ..\..\..\usr\local\mysql\bin\my-small.cnf"
rem == php
rem == php
copy /Y new_php.ini ..\..\..\usr\local\php\php.ini&quot;
copy /Y new_php.ini ..\..\..\usr\local\php\php.ini"
rem == phpMyAdmin
rem == phpMyAdmin
copy /Y new_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php&quot;
copy /Y new_config.inc.php ..\..\..\home\admin\www\phpMyAdmin\config.inc.php"
echo.
echo.
echo Switched to CD Mode
echo Switched to CD Mode
Line 194: Line 193:
pause
pause
popd
popd
&lt;/pre&gt;
</pre>
|}  
|}  


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


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


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


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


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


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


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


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


Line 277: Line 276:
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       
&lt;/pre&gt;
</pre>
|}  
|}