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

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

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