Chapter 3. Installing Red Hat Application Stack
To install Red Hat Application Stack V.1.1:
If you have an existing database, back up your data and shut down the database:
If you are using PostgreSQL:
Back-up your database. For example, run:
su - rm -rf /tmp/pg.backup su - postgres /usr/bin/pg_dumpall > /tmp/pg.backup exit
Note: If you have large objects in the database, you need to use pg_dump instead of pg_dumpall. See http://www.postgresql.org/docs/8.1/static/largeobjects.html and http://www.postgresql.org/docs/8.1/static/app-pg-dumpall.html
For more information, see http://www.postgresql.org/docs/8.1/static/install-upgrading.html
If you are using MySQL:
Backing-up your database is optional but recommended. Run as root:
mysqldump --all-databases -p > /tmp/mysqldumpfile.sql
Stop the daemons:
/sbin/service httpd stop
To shut down MySQL:
/sbin/service mysqld stop
To shut down PostgreSQL:
/sbin/service postgresql stop
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:
= i386 or x86_64 arch = as, or es
variant
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
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.
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
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.