Chapter 3. Installing Red Hat Application Stack
To install Red Hat Application Stack V.1.2:
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
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 --installall rhel-i386-as-4-appstk-1 --exclude jbossas-core --exclude jbossas-ejb3
where rhel-i386-as-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
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 --installall RedHat-Application-Stack-V1
If you are upgrading from Stacks V.1.1, and have installed the jbossas-ejb3 package, before running the above command, you need to first remove jbossas-ejb3 manually by running as root:
rpm -e jbossas-ejb3
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:
Start MySQL:
/sbin/service mysqld start
Update MySQL:
mysql_upgrade
Restore your data:
mysql -p < /tmp/mysqldumpfile.sql
Start the http daemon:
/sbin/service httpd start
The installation is now complete.