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