Chapter 3. Installing Red Hat Application Stack

Chapter 3. Installing Red Hat Application Stack

To install Red Hat Application Stack V.1.1:

  1. If you have an existing database, back up your data and shut down the database:

    If you are using PostgreSQL:

    If you are using MySQL:

    • Backing-up your database is optional but recommended. Run as root:

      mysqldump --all-databases -p > /tmp/mysqldumpfile.sql
      

  2. Stop the daemons:

    • /sbin/service httpd stop
      

    • To shut down MySQL:

      /sbin/service mysqld stop
      
    • To shut down PostgreSQL:

      /sbin/service postgresql stop
      
  3. Install the software:

    • Option 1. To install from RHN, which is the preferable option to avoid dependency issues, run as root:

      up2date --exclude=jboss-ejb3 --installall rhel-i386-es-4-appstk-1
      

      where rhel-i386-es-4-appstk-1 is the channel name for Red Hat Application Stack

      The channel names are as follows:

      rhel-arch-variant-4-appstk-1

      where:

      arch = i386 or x86_64 variant = as, or es

      Note

      If you wish to use the jbossas-ejb3 package (needs a working Java 1.5 installation), run:

      up2date --exclude=jbossas --installall rhel-i386-es-4-appstk-1
      
    • Option 2. To install from RPMs on Disk:

      Follow the instructions in Section 2.2.2, “ Using up2date / DVD ” to mount the DVD and set up the local RHN channel (steps 1-3). Then as root run:

      up2date --exclude=jbossas-ejb3 --installall RedHat-Application-Stack-V1
      

      Note

      If you wish to use the jbossas-ejb3 package (needs a working Java 1.5 installation), run:

      up2date --exclude=jbossas --installall RedHat-Application-Stack-V1
      

      After the installation is complete, be sure to follow step 5 from Section 2.2.2, “ Using up2date / DVD ” to prevent unnecessary warnings.

      Note

      You may need to install the following packages to satisfy dependencies before executing the above command, if they are not already installed:

      • apr-devel

      • apr-util-devel

      • libc-client

      • mx

      • pcre-devel

  4. Restore your database:

    • For PostgreSQL:

      • Move (or remove) the database directory:

        mv /var/lib/pgsql/data /var/lib/pgsql/data.backup
        
      • Start the new PostgreSQL service:

        /sbin/service postgresql start
        
      • Restore your data from back-up

        psql -U username < /tmp/pg.backup
        
      • Start the http daemon:

        /sbin/service httpd start
        
    • For MySQL:

      • Update MySQL:

        mysql_update
        
      • Start MySQL:

        /sbin/service mysqld start
        
      • Restore your data:

        mysql -p < /tmp/mysqldumpfile.sql
        
      • Start the http daemon:

        /sbin/service httpd start
        

The installation is now complete.