Annotation of doc/build/cvsupgrade.html, revision 1.7

1.1       harris41    1: <html>
                      2: <head>
                      3: <title>LON-CAPA CVS Upgrade</title>
                      4: </head>
                      5: <body>
                      6: <h1>LON-CAPA CVS Upgrade</h1>
                      7: <h3>Current CVS Upgrade Procedure</h3>
                      8: <p>
1.6       harris41    9: Scott Harrison, last updated 11/7/2001
1.1       harris41   10: </p>
                     11: <ul>
                     12: <li><a href="#fileupgrade">CVS Upgrade</a></li>
                     13: <li><a href="#rpm">RPM Upgrade</a></li>
                     14: <li><a href="#status">Viewing the status of your machine</a></li>
                     15: <li><a href="#setting">Setting yourself up for CVS</a></li>
                     16: </ul>
                     17: <a name="fileupgrade">
                     18: <h3>CVS Upgrade</h3>
                     19: <p>
                     20: If you have not yet set yourself up for LON-CAPA CVS, please see the
                     21: section <a href="#setting">"Setting yourself up for LON-CAPA CVS"</a>.
                     22: </p>
                     23: <p>
                     24: Before you do a file upgrade, you can always enter a "make statuspost"
                     25: command to see what will be changing on your system.  See the section
                     26: <a href="#status">Viewing the status of your machine</a>.
                     27: </p>
                     28: <p>
                     29: Assuming that you have set yourself up for LON-CAPA CVS, periodically
                     30: upgrading your system is a simple process.
                     31: </p>
                     32: <table border>
                     33: <tr><td><b>Steps</b></td><td><b>Commands</b></td></tr>
                     34: <tr><td>Make sure you are logged in for CVS</td>
                     35: <td>export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
                     36: <br />cvs login</td></tr>
                     37: <tr><td>Go to your repository directory</td><td>cd loncapa</td></tr>
1.5       harris41   38: <tr><td>Update your CVS sources</td><td>cvs update -d -r STABLE</td></tr>
1.1       harris41   39: <tr><td>Go to the build directory</td><td>cd loncom/build</td></tr>
                     40: <tr><td>Become 'root'</td><td>su</td></tr>
1.7     ! harris41   41: <tr><td>Build files</td><td>make build</td></tr>
1.1       harris41   42: <tr><td>Install/update static files</td><td>make install</td></tr>
                     43: <tr><td>Restart your web server<br />Due to an apache bug, you should
                     44: enter this command twice.  Restarting the web server will
                     45: <ul>
                     46: <li>introduce changes made to /home/httpd/lib/perl/Apache/*.pm files;</li>
                     47: <li>update user and group permissions if /etc/passwd or /etc/group change.</li>
                     48: </ul>
                     49: </td>
                     50: <td>/etc/rc.d/init.d/httpd restart
                     51: <br />/etc/rc.d/init.d/httpd restart</td></tr>
                     52: <tr><td>Restart the lonc/lond processes<br />Be patient (this takes several minutes).</td>
                     53: <td>/etc/rc.d/init.d/loncontrol restart</td></tr>
                     54: <tr><td colspan=2>After CVS logging in, you can always cut and paste this line
                     55: below assuming you do everything as root :)<br />
1.7     ! harris41   56: <tt>cd loncapa; cvs update -d -r STABLE; cd loncom/build; make build; 
        !            57: make install; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/httpd
1.5       harris41   58: restart; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/loncontrol restart
                     59: </tt></td></tr>
1.1       harris41   60: </table>
                     61: <p>
                     62: It may be also advisable to test your system after an upgrade if there are
                     63: critical tasks it is being used for.
                     64: </p>
1.2       harris41   65: <p>
                     66: The specification file which defines the CVS:source-to-system information is
                     67: CVS:doc/loncapafiles/loncapafiles.html.  Changes to this file directly
                     68: translate into changes in the installation.
                     69: </p>
1.1       harris41   70: <a name="rpm">
                     71: <h3>RPM Upgrade</h3>
                     72: <p>
1.2       harris41   73: BE CAREFUL.  READ THIS STUFF.
1.1       harris41   74: </p>
1.2       harris41   75: <p>WARNINGS:
1.1       harris41   76: <ul>
1.2       harris41   77: <li>Do not ever install or upgrade an LON-CAPA-base RPM.  You will
                     78: lose important configuration information on your machine.  The CVS upgrade
                     79: is much safer and more effective in bringing you up to date.</li>
                     80: <li>Do not ever install or upgrade a LON-CAPA-setup RPM.  You will lose
                     81: information from your /etc/group, /etc/passwd, and other important files.</li>
                     82: <li>Be careful about installing a LON-CAPA-mysql RPM.  You need to run
                     83: /home/httpd/perl/searchcat.pl after this to re-seed your metadata database.
                     84: <li>Don't upgrade/install/delete your kernel RPM unless you have done
                     85: it before.
                     86: </li>
1.1       harris41   87: </ul>
1.2       harris41   88: <p>
                     89: There are four things involved in an RPM upgrade:
                     90: </p>
                     91: <ol>
                     92: <li>Gaining information about the RPMs on your system.</li>
                     93: <li>Upgrade existing RPMS from a trusted source</li>
                     94: <li>Remove RPMs which do not belong</li>
                     95: <li>Add new RPMs</li>
                     96: </ol>
                     97: <p>
                     98: <b>Gaining information about the RPMs on your system:</b>
                     99: "make rpmstatuspost"
                    100: (see <a href="#status">Viewing the status of your machine</a>)
                    101: will tell you about RPMs which do not belong (are "external"
                    102: to LON-CAPA).  It will also tell you if you have "out-of-date"
                    103: RPMs which should maybe be upgraded.  Important specification
                    104: files for RPM installation are CVS:doc/otherfiles/rpm_list.txt
                    105: and CVS:doc/otherfiles/cd_rpms.txt.
                    106: </p>
                    107: <p>
                    108: <b>Upgrade existing RPMS from a trusted source:</b>
                    109: RPMs are currently available at
                    110: <blockquote>
1.6       harris41  111: http://install.lon-capa.org/3.1/latestRPMS/
1.2       harris41  112: </blockquote>
                    113: For example, to upgrade your LON-CAPA-systemperl RPM, you
                    114: would enter commands like
                    115: <blockquote>
1.6       harris41  116: wget http://install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/LON-CAPA-systemperl-3.2-1.i386.rpm<br />
1.2       harris41  117: (then as root) rpm -Uvh --force LON-CAPA-systemperl-3.1-1.i386.rpm
                    118: </blockquote>
                    119: </p>
                    120: <p>
                    121: <b>Remove RPMs which do not belong:</b>
                    122: If an RPM should NOT be on your system (like apmd), then you want
                    123: to remove this RPM.  Since RedHat is a little erroneous when
                    124: it comes to dependencies, you may wish to use the --nodeps flag.
                    125: <blockquote>
                    126: rpm -e --nodeps apmd-3.0final-2.i386.rpm
                    127: </blockquote>
                    128: </p>
                    129: <p>
                    130: <b>Add new RPMs:</b>
                    131: Use the same command as for upgrading.
                    132: <blockquote>
                    133: (as root) rpm -Uvh --force icewm-1.0.5-gnome.i386.rpm
                    134: </blockquote>
                    135: We often use icewm as our development machine window manager given the
                    136: RedHat 6.2 bugs involving enlightenment and gnome.
                    137: </p>
1.1       harris41  138: <a name="status">
                    139: <h3>Viewing the status of your machine</h3>
                    140: <p>
                    141: </p>
1.2       harris41  142: <table border>
                    143: <tr><td><b>Steps</b></td><td><b>Commands</b></td></tr>
                    144: <tr><td>Make sure you are logged in for CVS</td>
                    145: <td>export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
                    146: <br />cvs login</td></tr>
                    147: <tr><td>Go to your repository directory</td><td>cd loncapa</td></tr>
1.5       harris41  148: <tr><td>Update your CVS sources</td><td>cvs update -d -r STABLE</td></tr>
1.2       harris41  149: <tr><td>Go to the build directory</td><td>cd loncom/build</td></tr>
                    150: <tr><td>Become 'root'</td><td>su</td></tr>
                    151: <tr><td>View the CVS source->install status of your machine</td><td>make statuspost
                    152: <br /> then visit http://MACHINENAME/lon-status/filestatus.html</td></tr>
                    153: </td></tr>
                    154: <tr><td>View the RPM status of your machine
                    155: </td>
                    156: <td>make rpmstatuspost<br />
                    157: then visit http://MACHINENAME/lon-status/rpmstatus.html</td>
                    158: </table>
1.1       harris41  159: <a name="setting">
                    160: <h3>Setting yourself up for CVS</h3>
                    161: <p>
1.2       harris41  162: These instructions assume bash (as opposed to tcsh).
                    163: </p>
                    164: <p>
1.3       harris41  165: You will also need an account on zaphod.lite.msu.edu.
                    166: Please e-mail lon-capa@hobbes.lite.msu.edu and request that
                    167: an account be created.
                    168: </p>
                    169: <p>
1.2       harris41  170: The straightforward way to enable CVS is to manually configure your
                    171: environment and log in:
                    172: <blockquote>
                    173: export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs
                    174: <br />
                    175: cvs login
                    176: </blockquote>
1.1       harris41  177: </p>
1.2       harris41  178: <p>
                    179: You can also modify your shell environment (.bash_profile and .bash_logout).
                    180: <blockquote>
                    181: The commands:<br />
                    182: <b>export CVSROOT=:pserver:USERNAME@zaphod.lite.msu.edu:/home/cvs</b>
                    183: <br />
                    184: <b>cvs login</b>
                    185: <br />
                    186: can be appended to ~/.bash_profile.
                    187: <br />
                    188: "<b>cvs logout</b>" can be appended to ~/.bash_logout
                    189: </blockquote>
                    190: </p>
                    191: <p>
                    192: To check out LON-CAPA, go to any writeable directory and type:
                    193: <blockquote>cvs co loncapa</blockquote>
                    194: </p>
                    195: <p>
                    196: This will create a directory tree similar to:
                    197: <pre>
                    198: loncapa_________CAPA
                    199:           |
                    200:           |_____loncom
                    201:           |
                    202:           |_____doc
                    203:           |
                    204:           |_____rat
                    205:           |
                    206:           \_____packaging
                    207: </pre>
                    208: </p>
                    209: <p>
                    210: Useful commands are:
                    211: </p>
                    212: <table border=1>
                    213: <tr><td>Command</td></td><td>Description</td></tr>
                    214: <tr><td>info cvs</td></td><td>doc's</td></tr>
                    215: <tr><td>cvs log FILENAME</td></td><td>see what's happened with a file</td></tr>
1.5       harris41  216: <tr><td>cvs update -d -r STABLE</td></td><td>update your CVS tree from the
                    217: current directory location</td></tr>
1.2       harris41  218: </table>
1.1       harris41  219: </body>
                    220: </html>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>