Sie sind auf Seite 1von 4

Installing APEX Tutorial

Jun 01 2008 Prior to training, weve found it really useful that developers install Oracle APEX and Oracle XE locally. Not only does this give them a safe environment in which to experiment, but it gives them an understanding of what Oracle APEX actually is. They can use this knowledge to help support our customer installations and in investigation of any setup or installation issues that we have. The following step-by-step instructions have been followed successfully by many developers now and weve got the installation time down to well under two hours, including configuration. These instructions refer to APEX 3.0.1 but could be used for APEX 3.1 or later releases. You need to download Oracle XE and the latest release of APEX. 1 Create a new folder on your C: drive called Apex and copy the Oracle XE executable and APEX zip file there. 2 Right click on Apex_3.0.1.zip and select Extract Files. Ensure the path is C:\Apex\apex_3.0.1 and hit OK. (This is probably a good point to get a coffee as it takes a couple of minutes.) Note: C:\Apex\apex_3.0.1 is your Apex Home directory for this installation. 3 First install Oracle XE. This will create a local database on your PC with the SID XE which will have APEX 2.1 automatically installed. To do this double click on OracleXEUniv.exe. 4 Follow through the windows by clicking Next, I Accept, Next until youre asked for a password. This is the password for the system user, enter manager in both fields and click Next. 5 Before clicking Install, take a note of the port for the listener and HTTP server. These should be 1521 and 8080 respectively, but may be different if these ports are already in use on your PC. Now click Install and Finish when the install is completed. 6 Now well upgrade APEX to version 3.0.1. First log into SQL*Plus on your XE database as sysdba. To do this, youll need to set up a new tnsnames entry for the database or you can click Run SQL Command Line through the Windows start bar. The IP address will be 127.0.0.1, the port is the TNS listener port you recorded in step 5 (probably 1521) and the SID is XE. When you log into SQL*Plus you will need to type conn system/manager@XE as sysdba at the prompt. 7 Youll need to create two new tablespaces for the installation. In SQL*Plus type the following:
CREATE TABLESPACE APEX datafile C:\oraclexe\oradata\XE\APEX.dbf SIZE 500M

EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO; CREATE TABLESPACE APEX_FILES datafile C:\oraclexe\oradata\XE\APEX_FILES.dbf SIZE 100M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;

8 Set your working directory in SQL*Plus to C:\Apex\apex_3.0.1\Apex. Do this by opening the file C:\Apex\apex_3.0.1\Apex\apxsqler.sql. Now at the prompt type the following:
@apexins htmldb APEX APEX_FILES TEMP /i/

This takes a couple of minutes to install, but there is pretty output to watch scroll past. When its done it will close SQL*Plus. 9 Now check the log file created for errors (theyre usually at the end of the file, so this is a good place to start). The log file will be created in C:\Apex\apex_3.0.1\Apex. Only if there are errors, remove everything done in step 8 by logging into SQL*Plus as sysdba and issuing the following command: DROP USER FLOWS_030000 CASCADE; Youll then need to correct whatever caused the errors. 10 Log back into SQL*Plus as sysdba and open C:\Apex\apex_3.0.1\apex\apxsqler.sql again. Now type the following:
@apxldimg.sql C:\Apex\apex_3.0.1

(This loads the images into the Oracle XE database). Then when this has finished type:
@apxxepwd.sql htmldb

(This sets the APEX password for the Admin user). When this has run the installation is complete!

Configuring Your Internet Browser


Youll need to make a small change to your Internet browser to run APEX on your XE database. Depending on your favourite browser youll need to do one of the following: Configuring for Microsoft Internet Explorer To configure Microsoft Internet Explorer to connect to the Oracle Database XE Database Home Page:

1. 2. 3. 4. 5. 6.

From the Start menu, select Control Panel, then Internet Options. In the Internet Options dialog box, click the Security tab. Under Security, select Local Intranet and then select Sites. In the Local Intranet dialog box, select Advanced. Under Add this Web site to the zone, enter the following site: 127.0.0.1 Click OK.

Configuring Netscape Navigator or Mozilla To configure Netscape Navigator or Mozilla to connect to the Oracle Database XE Database Home Page: 1. From the Edit menu, select Preferences. 2. Under Category, click the Advanced category to expand it, and then select Proxies. 3. If you are using a proxy server, add the following setting to the No Proxy For setting: 127.0.0.1 4. Click OK. Configuring Firefox To configure Firefox to connect to the Oracle Database XE Database Home Page: 1. Under the Tools menu, select Options. 2. From the General tab, select Connection Settings. 3. If you are using a proxy server, add the following setting to the No Proxy For setting: 127.0.0.1 4. Click OK. Running and setting up APEX 1 You should now be able to run APEX on your PC. The url will be something like http://127.0.0.1:8080/apex where 8080 is the port of the HTTP server noted in step 5 of the XE installation. 2 You should see a login screen. To start with, login with the following credentials: Workspace internal Username Admin Password htmldb 3 This will take you to the admin area. Youll need to create a workspace which contains the sample application. First we need to check that the sample application will automatically be created. To do this click Manage Service then Feature Configuration. The option Create demonstration objects in new workspaces should be set to Yes. If it isnt, select Yes and then Apply Changes, otherwise click Cancel.

4 Now select Manage Workspaces and Create Workspace. The workspace name should be TRAIN, then click Next. 5 The first option should be No, the schema name should be TRAIN and the schema password should be train (just to make things easy!). Set the space quota to 10 and click Next. 6 Now set the Admin password to htmldb and enter your email address in the last field. The email address isnt used for anything but Oracle have set it to mandatory, so you need to put something in here. Now click Next, then Finish and Done on the final screen. Now you can log out. 7 Dont worry, this is the final bit, then you can have a play. Now log back in using the following credentials: Workspace TRAIN Username Admin Password htmldb Youll see there are three options, Application Builder, SQL Browser and Utilities. If you click on the Application Builder icon, you should have one Sample Application listed. If you click on this it will display the pages in that application and clicking Run Application will run it. The username and password are Admin and train. Check that the application runs successfully. Follow these instructions to install Oracle XE and upgrade APEX to 3.0.1, configure your web browser and create a new workspace in APEX with the sample application installed. Tutorials on this site assume that you have either followed these steps or already have a workspace with the sample application installed.

Sara Blair is a freelance Oracle developer with over 10 years Oracle experience. She has been working with Oracle APEX for nearly 4 years since htmldb 1.5, and is available to hire through Silvercore Solutions.

Das könnte Ihnen auch gefallen