Annotation of doc/build/cvsupgrade.html, revision 1.6
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>
41: <tr><td>Install/update static files</td><td>make install</td></tr>
42: <tr><td>Install/update dynamically configurable files<br />
43: <i>this preserves the current settings of your machine, don't worry :)</i>
44: </td>
45: <td>make configinstall</td></tr>
46: <tr><td>Restart your web server<br />Due to an apache bug, you should
47: enter this command twice. Restarting the web server will
48: <ul>
49: <li>introduce changes made to /home/httpd/lib/perl/Apache/*.pm files;</li>
50: <li>update user and group permissions if /etc/passwd or /etc/group change.</li>
51: </ul>
52: </td>
53: <td>/etc/rc.d/init.d/httpd restart
54: <br />/etc/rc.d/init.d/httpd restart</td></tr>
55: <tr><td>Restart the lonc/lond processes<br />Be patient (this takes several minutes).</td>
56: <td>/etc/rc.d/init.d/loncontrol restart</td></tr>
57: <tr><td colspan=2>After CVS logging in, you can always cut and paste this line
58: below assuming you do everything as root :)<br />
1.5 harris41 59: <tt>cd loncapa; cvs update -d -r STABLE; cd loncom/build; make install; make
60: configinstall; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/httpd
61: restart; /etc/rc.d/init.d/httpd restart; /etc/rc.d/init.d/loncontrol restart
62: </tt></td></tr>
1.1 harris41 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>
1.6 ! harris41 114: http://install.lon-capa.org/3.1/latestRPMS/
1.2 harris41 115: </blockquote>
116: For example, to upgrade your LON-CAPA-systemperl RPM, you
117: would enter commands like
118: <blockquote>
1.6 ! harris41 119: wget http://install.lon-capa.org/3.1/currentcdsource/RedHat/RPMS/LON-CAPA-systemperl-3.2-1.i386.rpm<br />
1.2 harris41 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>
1.5 harris41 151: <tr><td>Update your CVS sources</td><td>cvs update -d -r STABLE</td></tr>
1.2 harris41 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.5 harris41 219: <tr><td>cvs update -d -r STABLE</td></td><td>update your CVS tree from the
220: current directory location</td></tr>
1.2 harris41 221: </table>
1.1 harris41 222: </body>
223: </html>
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>