Oily Rag 1: CD Part 2: Difference between revisions
Jump to navigation
Jump to search
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...) |
Upazixorys (talk | contribs) 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= | {|cellpadding="4" cellspacing="1" style="background:#eeeeee" | ||
|- | |- | ||
!style= | !style="background:#d7d7d7"|File | ||
!style= | !style="background:#d7d7d7"|Location | ||
! | !  | ||
|-valign= | |-valign="top" | ||
|style= | |style="background:#e6e6e6"|new_httpd.conf<br> | ||
old_httpd.conf | old_httpd.conf | ||
|style= | |style="background:#e6e6e6"|*\Uniform Server\udrive\usr\local\apache2\conf | ||
|valign= | |valign="middle"|Apache | ||
|-valign= | |-valign="top" | ||
|style= | |style="background:#f5f5f5"|new_my-small.cnf<br> | ||
old_my-small.cnf | old_my-small.cnf | ||
|style= | |style="background:#f5f5f5"|*\Uniform Server\udrive\usr\local\mysql\bin | ||
|valign= | |valign="middle"|MySQL | ||
|-valign= | |-valign="top" | ||
|style= | |style="background:#e6e6e6"|new_php.ini<br> | ||
old_php.ini | old_php.ini | ||
|style= | |style="background:#e6e6e6"|*\Uniform Serve\udrive\usr\local\php | ||
|valign= | |valign="middle"|PHP | ||
|-valign= | |-valign="top" | ||
|style= | |style="background:#f5f5f5"|new_config.inc.php<br> | ||
old_config.inc.php | old_config.inc.php | ||
|style= | |style="background:#f5f5f5"|*\Uniform Serve\udrive\home\admin\www\phpMyAdmin | ||
|valign= | |valign="middle"|phpMyAdmin | ||
|-valign= | |-valign="top" | ||
|style= | |style="background:#e6e6e6"|new_Server_Start.bat<br> | ||
old_Server_Start.bat | old_Server_Start.bat | ||
|style= | |style="background:#e6e6e6"|*\Uniform Server | ||
|valign= | |valign="middle"|UniServer Control | ||
|-valign= | |-valign="top" | ||
|style= | |style="background:#f5f5f5"|new_Stop.bat<br> | ||
old_Stop.bat | old_Stop.bat | ||
|style= | |style="background:#f5f5f5"|*\Uniform Server | ||
|valign= | |valign="middle"|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= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!Batch Command | !Batch Command | ||
!Explanation | !Explanation | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<pre style="border:none"> | |||
pushd %~dp0 | pushd %~dp0 | ||
.... | .... | ||
Line 74: | Line 75: | ||
.... | .... | ||
popd | popd | ||
</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= | |-style="background:#f5f5f5;" | ||
| | | | ||
<pre style="border:none"> | |||
COPY switches source destination | COPY switches source destination | ||
</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 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= | |-style="background:#f5f5f5;" | ||
| | | | ||
<pre style="border:none"> | |||
..\folder\file_name | ..\folder\file_name | ||
..\..\folder\file_name | ..\..\folder\file_name | ||
</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 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= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!us_mode_switch.bat | !us_mode_switch.bat | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<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 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" | ||
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" | ||
rem == php | rem == php | ||
copy /Y old_php.ini ..\..\..\usr\local\php\php.ini | 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 | 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 148: | Line 149: | ||
pause | pause | ||
popd | popd | ||
</pre> | |||
|} | |} | ||
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= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!cd_mode_switch.bat | !cd_mode_switch.bat | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<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 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" | ||
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" | ||
rem == php | rem == php | ||
copy /Y new_php.ini ..\..\..\usr\local\php\php.ini | 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 | 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 193: | Line 194: | ||
pause | pause | ||
popd | popd | ||
</pre> | |||
|} | |} | ||
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= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!us_mode.bat | !us_mode.bat | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<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 | ||
</pre> | |||
|} | |} | ||
<br> | |||
{| cellpadding= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!us_mode.bat | !us_mode.bat | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<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 | ||
</pre> | |||
|} | |} | ||
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= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!cd_mode.bat | !cd_mode.bat | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<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 | ||
</pre> | |||
|} | |} | ||
<br> | |||
{| cellpadding= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!cd_mode.bat | !cd_mode.bat | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<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 | ||
</pre> | |||
|} | |} | ||
== File Overview == | == File Overview == | ||
This shows where to place all the files. | This shows where to place all the files. | ||
{| cellpadding= | {| cellpadding="4" cellspacing="1" style="background:#000000;" | ||
|- style= | |- style="background:#e8e8e8;" | ||
!File Overview | !File Overview | ||
|- style= | |- style="background:#f5f5f5;" | ||
| | | | ||
<pre style="border:none"> | |||
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> | |||
|} | |} | ||