This is part two of my series regarding a fully freeware APEX setup.
Post 1 coveres the installation of Oracle XE 11 beta on CentOS 5
Shut Down Apex-EPG
Log in as system into the XE database using SQL*plus. We must close the EPG within the database, because Tomcat is going to use the same port (8080)
I took this from here.
su - cd /etc/yum.repos.d wget 'http://www.jpackage.org/jpackage50.repo' yum update yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps service tomcat6 start
Tomcat is running!
That was easy enough. We need to do some configuration.
If you get dependency errors please have a look at the original post
setup "Firewall configuration" "Customize" "Other ports" 8080:tcp "Ok" service tomcat6 restart
Downloads: APEX Listener and APEX itself
Even though XE 11g is shipped with Apex preconfigured, for this setup we do need to link to the images folder. We do this by downloading the full Apex archive. At the same time we can allready download the listener as well:
unzip apex_4.0.2.zip unzip apex_listener.126.96.36.199.15.23.zip -d apex_listener
We only need the images folder from the apex distribution. Nevertheless it can come in handy when the full apex installer is available.
The Tomcat htmlroot (or docroot) is located at /var/lib/tomcat6/webapps.
We copy the apex and the listener installer files into the Oracle tree and create a symbolic link in tomcats’ webapps folder:
su - mkdir $ORACLE_BASE/product/4.0.2 cp -r apex $ORACLE_BASE/product/4.0.2/apex/ ln -s $ORACLE_BASE/product/4.0.2/apex/images /var/lib/tomcat6/webapps/i mkdir $ORACLE_BASE/product/1.1.2 cp -r apex_listener $ORACLE_BASE/product/1.1.2/apex_listener
Edit the /etc/tomcat6/tomcat-users.xml. We’re still root..
replace the last line (having “</tomcat-users>”). Replace the username and password as desired.
<role rolename="manager"/> <role rolename="admin"/> <role rolename="Manager"/> <role rolename="Admin"/> <user username="apex" password="verysecret" roles="manager,admin,Manager,Admin"/> </tomcat-users>
It’s a bit silly that the roles are mentioned twice, but apparently not all implementations use the same casing.
I’m using the “apex” user here with the password “verysecret”
Save the file (Duhh 😉 )
Now we must make sure that Tomcat gets started at boot-time:
chkconfig --add tomcat6 chkconfig tomcat6 on reboot
That should do the trick. So far for Tomcat for now.
Installing the APEX listener
First we need to unlock the “apex_public_user” and set its password. Open up the SQL*plus commandline and enter:
alter user apex_public_user account unlock; alter user apex_public_user identified by the_secret_password;
Now open Tomcat manager: http://localhost:8080/manager/html. Go to the section: WAR file to deploy.
Click the browse button and select the warfile from /u01/app/oracle/product/1.1.2/apex_listener/apex.war
Click the “deploy” button.
Now you’re ready to configure the listener