Installation

Installing / Configuring APEX (Application Express / HTMLDB) in 10gR2 on Windows XP

Posted on April 16, 2008. Filed under: APEX / HTMLDB, Installation | Tags: , , , , , |

Apex 3.1 works with all versions above 9203, (including Oracle 11g). In this article the steps are defined for Installing apex_3.1 on 10gR2 (10.2.0.1)

Step 1: Download 10gR2 software (http://www.oracle.com/technology/software/products/database/index.html)
Step 2: Download 10gR2 Companion CD (for HTTP Server) (http://www.oracle.com/technology/software/products/database/index.html)
Step 3: Download apex_3.1 from http://apex.oracle.com or http://www.oracle.com/technology/products/database/application_express/download.html
Step 4: Install 10gR2 software and create a general database as part of installation
Step 5: Install 10gR2 companion CD – you will have two options (HTMLDB + HTTP Server or only HTTP Server) (I selected HTMLDB + HTTP Server, not a must though, since we will be installing apex_3.1)
Step 6: Stop both oracle DB and Apache server just installed.
Step 7: Start the DB and let apache be down.
Step 8: Unzip apex_3.1.zip (hereinafter referred as APEX_LOC)
Step 9: Pre-install requirements for APEX.
1. DB Requirement – Should be greater than 9203.
2. JVM Requirement – Need to be installed separetly if DB is less than 10gR1
3. Shared Pool Size of the database – ignore if sga_target is used, else it has to be atleast 100M;
4. HTTP Server (with mod_plsql) Requirements – Oracle9iR2 (9.2) or later / Oracle9iAS release 1 (1.0.2.2) or later / Oracle Database 10g Companion CD release 1 or 2 / Oracle Database 11g release 1
5. Space Requirement
For APEX Software Files – 450MB
For APEX objects (tablespace) – 125MB
SYSTEM Tablesapce – 85MB
6. Oracle XML DB Requirement – XML DB should be installed in the database
7. Oracle Text Requirement – for Searchable online help in APEX
8. PL/SQL Web toolkit – required Version 10.1.2.0.6 (10gR2 brings in 10.1.2.0)

In our approach, (10gR2 DB + 10gR2 Companion CD 1) we had satisfied 1,2,3,4 & 6 requirements. Perform below steps to satisfy 5, 7 & 8.

For 5: We can create a separate tablespace for APEX objects or we can use SYSAUX tables. Add appropriate datafiles to the tablespaces to meet the required free space.
For 7: Connect to db as ctxsys user and execute @ORACLE_HOME\ctx\admin\defaults\drdefus.sql (substitute ORACLE_HOME with actual path)
For 8: Go to the location where you had extracted apex_3.1 zip (APEX_LOC). Connect to db as sys user and execute owainst.sql (under apex\owa directory)
Execute “select owa_util.get_version from dual;” to verify the pl/sql web toolkit version.

Step 10: Install APEX 3.1
– Goto the location where you had extracted apex_3.1 zip. change location to apex directory under APEX_LOC.
– Connect to database as sys user and execute below command
– @apexins TS1 TS2 TEMP_TS /i/

TS1 => SYSAUX or (tablespace created for APEX)
TS2 => SYSAUX or (tablespace created for APEX)
TEMP_TS => Temporary tablesapce
/i/ => Location to store APEX Images (no need to mention any path, just leave it as /i/)
eg:(@apexins APEX_DATA APEX_DATA TEMP /i/)

Installation logfile will be located under APEX_LOC as installYYYY-MM-DD_HH24-MI-SS.log.

Step 11: Change Password for ADMIN Account
– Change directory to apex
– Connect to DB as sys user and execute
– @apxchpwd

(ADMIN user is the super user account simillar to SYS for DB)

Step 12: Configure HTTP Server
Step 12.1: Unlock APEX_PUBLIC_USER Account & change password

– Connect to db as sys user
– alter user apex_public_user account unlock;
– alter user apex_public_user identified by NEW_PASSWORD;

Step 12.2: Copy APEX Images
– Open APACHE_ORACLE_HOME/Apache/modplsql/conf/marvel.con to identify default location set for images (/i/) (Hereinafter referred as IMAGE_LOC)
– Goto the location identified above (eg.C:/oracle/product/as/1020/htmldb/images/)
– Rename the images directory to images_old
– Copy APEX_LOC/apex/images to C:/oracle/product/as/1020/htmldb/

Step 12.3: Adding DAD entry to connect to APEX
– Open APACHE_ORACLE_HOME/Apache/modplsql/dad.conf
– Past below entry

Alias /i/ “[ Put the IMAGE_LOC Value] ”
AddType text/xml xbl
AddType text/x-component htc

<Location /pls/apex>
Order deny,allow
PlsqlDocumentPath docs
AllowOverride None
PlsqlDocumentProcedure wwv_flow_file_mgr.process_download
PlsqlDatabaseConnectString hostname:port:SID
PlsqlNLSLanguage AMERICAN_AMERICA.AL32UTF8
PlsqlAuthenticationMode Basic
SetHandler pls_handler
PlsqlDocumentTablename wwv_flow_file_objects$
PlsqlDatabaseUsername APEX_PUBLIC_USER
PlsqlDefaultPage apex
PlsqlDatabasePassword APEX_PASSWORD
PlsqlRequestValidationFunction wwv_flow_epg_include_modules.authorize
Allow from all
</Location>

Make sure these values are properly set before saving this file (marvel.conf)

1. IMAGE_LOC Value
2. hostname:port:SID => eg: localhost:1521:ORCL
3. APEX_PASSWORD => eg: password_you_had_selected_on_step_12.1

IF all the above values are set, save the file as marvel.conf

Step 13: Start HTTP Server (Start -> Programs -> Oracle)

Step 14: Access the admin page of APEX

http://hostname:port/pls/apex/apex_admin

Username: ADMIN
Password: PASSWORD_SELECTED_WHILE_RUNNING_apxchpwd

 Sample Screen: https://oraclepitstop.files.wordpress.com/2008/04/apex_admin_screen1.jpeg

cheers,
OraclePitStop

Read Full Post | Make a Comment ( 22 so far )

Staging files for Oracle Apps installation

Posted on April 6, 2008. Filed under: Installation, R12 | Tags: , |

Hi,

Heres a single “for loop” (Unix) to stage the installation files (*.zip) under specific directories without creating the required directories.

$cd <location where .zip files are copied>

for i in ls -l *.zip
do
unzip -od <staging locaion> $i
done

It is always advisable to verify the zip files before extracting. You can use the same “for loop” with different unzip option

for i in ls -l *.zip
do
unzip -t  $i
done

Note: You can type all of the above commands in the shell prompt, no need to write a shell script to run the for loop.

Happy staging !!!

cheers,
OraclePitStop

Read Full Post | Make a Comment ( None so far )

Staging CD/DVD’s for Installation

Posted on August 22, 2007. Filed under: Installation |

 

There are two ways of staging the CD/DVD’s.

1. Traditional Way

In this way we invoke adautostg.pl located at </mountpoint>/Stage11i/startCD/Disk1/rapidwiz, which is part of startCD which invokes below screen wherein we input

 

a. Staging Directory

b. CD Drive Mounting Command

c. CD Drive Unmounting Command

d. Components to be staged

e. NLS Languages

 

Stage Screen 1

 

2. Single Line Command

 

The other way of staging the CD/DVD’s is to use the same script (adautostg.pl) but by providing all the information in one single line command. The options can be viewed by running the command

 

$ perl adautostg.pl -help << this command invokes below screen

 

Stage Help

 

Example Commands

 

To stage only iAS for Language English

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”ias” -dvdnum=1

 

To stage only APPL_TOP for Language English

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”apps” -dvdnum=1

 

Now the interesting question is where to find the dvdnum value. In every DVD there is a file called dvd.label, which consists of the dvd information.

 

eg:

 

[root@appstest oraApps]# cat dvd.label
DVD1 Disk1-Disk6
DVD2 Disk7-Disk8

The disadvantage in using the single line command is we need to enter the same command with change in the value for dvdnum for every individual component to be staged. So for staging APPL_TOP we need to execute above command again with a change in the dvdnum to stage the second DVD ie.,

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”apps” -dvdnum=2

To overcome this we can assign the value as “all” for -component which behaves simillar to running the script in traditional way.

 

eg:

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”all”

 

To stage only DB for Language English

 

[root@appstest oraAppDB]# pwd
/oracle/Stage11i/oraAppDB
[root@appstest oraAppDB]# ls
Disk1 Disk11 Disk13 Disk15 Disk17 Disk19 Disk20 Disk22 Disk24 Disk4 Disk6 Disk8 dvd.label
Disk10 Disk12 Disk14 Disk16 Disk18 Disk2 Disk21 Disk23 Disk3 Disk5 Disk7 Disk9
[root@appstest oraAppDB]# cat dvd.label
DVD1 Disk1-Disk7
DVD2 Disk8-Disk14
DVD3 Disk15-Disk17
DVD4 Disk18-Disk24
[root@appstest oraAppDB]#

 

As you can see there are 4 DVD’s mentioned, which means we have to execute the command 4 times with different dvdnum value.

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”appdb” -dvdnum=1

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”appdb” -dvdnum=2

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”appdb” -dvdnum=3

 

perl </mountpoint>/Stage11i/startCD/Disk1/rapidwiz/adautostg.pl -stage=/<staging directory> -mount=”mount -t iso9660 /dev/cdrom /mnt/cdrom” -umount=”umount /mnt/cdrom” -component=”appdb” -dvdnum=4

 

Issues faced while Staging

 

Iam not sure if iam the only guy on earth faced this strange issue or you also had encountered this before. Anyways, the startCD got staged without any issues but the remaining DVD’s failed to get staged with the error message in the screenshot.

 

Staging Issue

 

 

 

 

The above error was due to the logic built inside the script.

 

sub stageSingleDVD
{
……..
……..
……..

if (-f “$MOUNTPOINT/”.$dirsep.”dvd.label”)
{
getStartDiskNum();
$CD_DVD = “DVD”;
}
else
{
print “\nERROR: Invalid DVD is inserted\n”;
print “Please insert the DVD labeled $CD_MAIN_LABEL”.” – “.”$CDLabel{$components[0]} Disk $opt_dvdnum \n”;
&unmount();
next;
}
……..
……..
……..
}

stageSingleDVD gets invoked if -dvdnum parameter is used. You must be thinking why on earth i used the command line option instead of going the normal (traditional way), let me tell you, i faced the same problem when i used the traditional way too 😦 .

 

Before jumping into the problem, a little background on the variables mentioned in the function.

 

$MOUNTPIONT => stores the mount point value entered by user – (both traditional way or using -mount option)

$CD_DVD => Variable used to determine if CD/DVD is used.

$dirsep => stores the directory separator value ie., /

 

CD Mounting Command: mount -t iso9660 /dev/cdrom /mnt/cdrom

 

Hency, my mountpoint value => /mnt/cdrom

 

Ok coming to the problem, as you can see from the function, it is looking for the file “dvd.label” under $MOUNTPOINT directory which translates to “/mnt/cdrom/dvd.label”.  But every DVD has a base directory viz.,

 

oraapps01, oraapps02 for APPL_TOP(oraapps)

oraias for iAS

oradb01,oradb02,oradb03,oradb04 for appdb

orardb for DB

 

So in reality the file dvd.label is available under /mnt/cdrom/oraapps01/dvd.label (for APPL_TOP) but the script is looking for /mnt/cdrom/dvd.label which resulted in error message “ERROR: Invalid DVD is inserted”.

 

Solution:

 

Since the script adautostg.pl is part of startCD (which was successfully staged) i edited the script under /<mount point>/Stage11i/startCD/Disk1/rapidwiz as below:

 

1. Changed occurrences of $MOUNTPOINT variable with $MOUNTPOINT/<base directory> under various functions – 7 changes to be precise.

Note: Variable $MOUNTPOINT is used throughout the script and not all references are changed.

 

eg: From $MOUNTPOINT to $MOUNTPOINT/oraapps01

 

No For Error Inside Function Original Changed To
1 Invalid DVD is inserted. stageSingleDVD if (-f “$MOUNTPOINT/”.$dirsep.”dvd.label”) if (-f “$MOUNTPOINT/<base_directory>/”.$dirsep.”dvd.label”)
2 Could not open the dvd.label. No such file or directory getStartDiskNum open ( FH, “$MOUNTPOINT/”.$dirsep.”dvd.label” ) open ( FH, “$MOUNTPOINT/<base_directory>/”.$dirsep.”dvd.label” )
3 disk.label not found under /mnt/cdrom/Disk1 validateDiskLabel if(-f “$MOUNTPOINT/”.$dirsep.”Disk$diskNum”.$dirsep.”disk.label”)
{
open(FH,”$MOUNTPOINT/”.$dirsep.”Disk$diskNum”.$dirsep.”disk.label”) || die “Could not open disk.label: $!”;
}
if(-f “$MOUNTPOINT/<base_directory>/”.$dirsep.”Disk$diskNum”.$dirsep.”disk.label”)
{
open(FH,”$MOUNTPOINT/<base_directory>/”.$dirsep.”Disk$diskNum”.$dirsep.”disk.label”) || die “Could not open disk.label: $!”;
}
4 Staging /mnt/cdrom/Disk1 … Failed to Copy Disk1, No such file or directory stageSingleDVD #copy the dvd.label
$fc->copy(“$MOUNTPOINT/dvd.label”, $STAGEDIR.”/Stage11i/”.$CDArea{$components[0]} );
 for ($i=$startCDNum; $i <= $endCDNum; $i++)
{
print2logStdio( “Staging $MOUNTPOINT/”.$dirsep.”Disk$i …”);
$fc->copy(“$MOUNTPOINT/Disk$i”, $STAGEDIR.”/Stage11i/”.$CDArea{$components[0]} ) || die “Failed to copy Disk$i, $!\n”;
#copy the dvd.label
$fc->copy(“$MOUNTPOINT/<base_directory>/dvd.label”, $STAGEDIR.”/Stage11i/”.$CDArea{$components[0]} );
 for ($i=$startCDNum; $i <= $endCDNum; $i++)
{
print2logStdio( “Staging $MOUNTPOINT/<base_directory>/”.$dirsep.”Disk$i …”);
$fc->copy(“$MOUNTPOINT/<base_directory>/Disk$i”, $STAGEDIR.”/Stage11i/”.$CDArea{$components[0]} ) || die “Failed to copy Disk$i, $!\n”;

 

The above table can be inferred as For Error in Column 2, Column 4 was changed to Column 5 in Column 3 function.

 

Guess What, after making above changes Staging the DVD’s was peace of cake. 🙂

 

cheers,

OraclePitStop

Read Full Post | Make a Comment ( 1 so far )

Liked it here?
Why not try sites on the blogroll...