File:  [LON-CAPA] / doc / build / Attic / cvsupgrade.html
Revision 1.5: download - view: text, annotated - select for diffs
Wed Sep 5 22:03:30 2001 UTC (22 years, 9 months ago) by harris41
Branches: MAIN
CVS tags: HEAD
adding in -r STABLE for the cvs update command

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

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