old-www/HOWTO/Remote-Serial-Console-HOWTO/rhl-preparehttp.html

605 lines
8.9 KiB
HTML

<HTML
><HEAD
><TITLE
>Prepare HTTP server</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Remote Serial Console HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Upgrading Red Hat Linux from a
serial console"
HREF="rhl.html"><LINK
REL="PREVIOUS"
TITLE="Prepare a network install floppy diskette"
HREF="rhl-preparefloppy.html"><LINK
REL="NEXT"
TITLE="Record network configuration"
HREF="rhl-ifconfig.html"></HEAD
><BODY
CLASS="SECTION"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Remote Serial Console HOWTO</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="rhl-preparefloppy.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Appendix C. Upgrading <SPAN
CLASS="PRODUCTNAME"
>Red Hat Linux</SPAN
> from a
serial console</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="rhl-ifconfig.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECTION"
><H1
CLASS="SECTION"
><A
NAME="RHL-PREPAREHTTP"
></A
>C.5. Prepare <SPAN
CLASS="ACRONYM"
>HTTP</SPAN
> server</H1
><P
>It is best if the web server runs the version of Red Hat
Linux as is being upgraded to. If it runs an earlier version, then
do not rebuild the operating system on this machine and install
<SPAN
CLASS="APPLICATION"
>anaconda-runtime</SPAN
> from the later
operating system.</P
><P
>Copy the Linux distribution to a local web server using a
mirroring utility like <B
CLASS="COMMAND"
>wget</B
>. Alternatively the
files can be copied from the distribution <SPAN
CLASS="ACRONYM"
>CD</SPAN
>s to
the web server.</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN3714"
></A
><P
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
><TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>mkdir --mode=664 --parents /var/www/html/redhat/linux/7.1/en/os/i386</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>umask 002</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>wget -nh -nH -r -N -nr -l0 -k -np -X SRPMS ftp://ftp.redhat.com/pub/redhat/linux/7.1/en/os/i386/ -P /var/www/html/redhat/linux/7.1/en/os/i386</B
></PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><P
>It's best to use a mirror site in place of Red Hat's <SPAN
CLASS="ACRONYM"
>FTP</SPAN
> site
used in the example above.</P
><P
>It is very important not to gain files along the way. Delete
any files generated by <SPAN
CLASS="ACRONYM"
>FTP</SPAN
> servers, web servers
and <SPAN
CLASS="ACRONYM"
>CD-ROM</SPAN
>s.</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN3727"
></A
><P
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
><TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>cd /var/www/html/redhat</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> # Files added by FTP server
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>find . -name '.listing' -print -exec rm {} \;</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>find . -name 'ls-*' -print -exec rm {} \;</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> # Files added by a wget from a HTTP server
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>find . -name '\?*' -print -exec rm {} \;</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> # Files added by a CD-ROM
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>find . -name 'TRANS.TBL' -print -exec rm {} \;</B
></PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><P
>We now need to add the latest updates to the distributed
software. This is done to avoid the machine being compromised
immediately following the upgrade.</P
><P
>Adding the updates is essential for <SPAN
CLASS="PRODUCTNAME"
>Red Hat
Linux</SPAN
> <SPAN
CLASS="PRODUCTNUMBER"
>7.1</SPAN
>, see <A
HREF="bugs-rhl71.html"
>Section A.2</A
>.</P
><P
>Collect together the updates <SPAN
CLASS="ACRONYM"
>RPM</SPAN
>s from
<A
HREF="ftp://ftp.redhat.com/pub/updates/7.1/en/os/"
TARGET="_top"
><TT
CLASS="FILENAME"
>ftp://ftp.redhat.com/pub/updates/7.1/en/os/</TT
></A
>
in the subdirectories <TT
CLASS="FILENAME"
>i386</TT
>,
<TT
CLASS="FILENAME"
>i486</TT
>, <TT
CLASS="FILENAME"
>i586</TT
> <TT
CLASS="FILENAME"
>i686</TT
>, <TT
CLASS="FILENAME"
>images</TT
> and <TT
CLASS="FILENAME"
>noarch</TT
>.</P
><P
>Merge these updates into the copy of the distribution. For
each updated <SPAN
CLASS="ACRONYM"
>RPM</SPAN
> file, remove the original
<SPAN
CLASS="ACRONYM"
>RPM</SPAN
> file then replace it with the updated
<SPAN
CLASS="ACRONYM"
>RPM</SPAN
> file. For example:</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN3761"
></A
><P
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
><TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>cd /var/www/html/redhat/linux/7.1/en/os/i386/RedHat/RPMS</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>ls /var/www/html/redhat/updates/7.1/en/os/i386</B
>
SysVinit-2.78-17.i386.rpm
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>ls SysVinit-*.rpm</B
>
SysVinit-2.78-15.i386.rpm
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>rm SysVinit-2.78-15.i386.rpm</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>cp /var/www/html/redhat/updates/7.1/en/os/i386/SysVinit-2.78-17.i386.rpm .</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>chmod u=rw,g=r,o=r SysVinit-2.78-17.i386.rpm</B
></PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><P
>Merge the <SPAN
CLASS="ACRONYM"
>RPM</SPAN
>s from the <TT
CLASS="FILENAME"
>updates</TT
> subdirectories <TT
CLASS="FILENAME"
>i386</TT
>, <TT
CLASS="FILENAME"
>i686</TT
> and <TT
CLASS="FILENAME"
>noarch</TT
> into <TT
CLASS="FILENAME"
>/var/www/html/redhat/linux/7.1/en/os/i386/RedHat/RPMS</TT
>.
Merge the files from the directory <TT
CLASS="FILENAME"
>/var/www/html/redhat/updates/7.1/en/os/images</TT
>
into the directory <TT
CLASS="FILENAME"
>/var/www/html/redhat/linux/7.1/en/os/i386/images</TT
>.</P
><P
>The file
<TT
CLASS="FILENAME"
>/var/www/html/redhat/linux/7.1/en/os/i386/RedHat/base/hdlist</TT
>
and <TT
CLASS="FILENAME"
>hdlist2</TT
> contain the list of the
<SPAN
CLASS="ACRONYM"
>RPM</SPAN
>s to install. This needs to be modified to
contain the names of the updated <SPAN
CLASS="ACRONYM"
>RPM</SPAN
>s.</P
><P
>Install the <TT
CLASS="FILENAME"
>anaconda-runtime</TT
>
<SPAN
CLASS="ACRONYM"
>RPM</SPAN
> on the <SPAN
CLASS="ACRONYM"
>HTTP</SPAN
> server. This
<SPAN
CLASS="ACRONYM"
>RPM</SPAN
> should be the same version as the Red Hat
Linux being upgraded to.</P
><P
>Now create a new <TT
CLASS="FILENAME"
>hdlist</TT
> with the
commands:</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN3796"
></A
><P
></P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
><TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>cd /usr/lib/anaconda-runtime</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>rm /var/www/html/redhat/linux/7.1/en/os/i386/RedHat/base/hdlist*</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>umask 002</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>./genhdlist --withnumbers --hdlist /var/www/html/redhat/linux/7.1/en/os/i386/RedHat/base/hdlist /var/www/html/redhat/linux/7.1/en/os/i386</B
></PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
><P
>The distribution plus the updates can now be used for a
network install. They cannot be used for a <SPAN
CLASS="ACRONYM"
>CD</SPAN
>
install, but that doesn't concern us.</P
><P
>As the distribution plus the updates is different from the
original distribution, we should not use the version number of the
original distribution. Appending the date to which the updates
have been applied seems best.</P
><DIV
CLASS="INFORMALFIGURE"
><A
NAME="AEN3809"
></A
><P
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="PROGRAMLISTING"
><TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>cd /var/www/html/redhat/linux/</B
>
<TT
CLASS="PROMPT"
>bash$</TT
> <B
CLASS="COMMAND"
>mv 7.1 7.1-20020202</B
></PRE
></FONT
></TD
></TR
></TABLE
><P
></P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="rhl-preparefloppy.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="rhl-ifconfig.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Prepare a network install floppy diskette</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="rhl.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Record network configuration</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>