Sep 25, 2011 - On every CentOS installation I have done for XE, I just needed to update/install the packages for libaio, bc, and flex. Step 1: Download and Install Oracle 11g XE rpm. Db_recovery_file_dest_size big integer 10G; SQL. If you elect to upgrade to the latest version (4.1 as of this writing), you can do so.
Today oracle released the definitive version of Oracle XE 11.2. I haven’t had the opportunity to test that version against my blogs, but I’ll do that shortly. Stay tuned In my effort to create a fully free APEX environment this post is step 1: Install CentOS-5 and Oracle XE 11g. This series will consist of a number of posts:. Install CentOS-5 linux (post 1). Install Oracle XE 11g beta (post 1).
Webserver choices. EPG (post 1). Oracle HTTP server & modplsql (post 6) This is post 1, covering the basic installation. Install CentOS-5 In my first attempts to get to this fulle freeware APEX environment I decided to use Ubuntu server with the GNOME desktop.
However I found out that most software is delivered in RedHats RPM format. Especially the Oracle HTTP server preferes to be installed on a RedHat compliant system. CentOS is just that.
Just do a clean install CentOS downloaded from their. I used version 5.
But make sure you use the 64 bit version. After the clean install I installed the VirtualBox extensions:. Choose “Devices” – “Install Guest Additions”. Open a terminal: su - cd /media/VBOXADDITIONS4.0.671416/./VBoxLinuxAdditions.run This installs the VBox additions. We do need a reboot: shutdown -r now Install Oracle XE 11g beta.
Download the installer. Open a terminal and go to the directory where you downloaded the ZIP mkdir OracleXE unzip linux.x6411gR2OracleXE.zip -d OracleXE su - cd /home/apex/Downloads/OracleXE rpm -ivh oracle-xe-11.2.0-0.5.x8664.rpm. We’re still Super so we can kick the configuration straight away: /etc/init.d/oracle-xe configure the installer will ask for a port to run Apex (8080), a port to run the database listener (1521) a password to be used for both SYS and SYSTEM users and whether you’d like to have the database start automatically at system start (y). As a famous dutch beer-commercial states: “now we wait”.
When the installer finishes I put the apex user (the one I use to log in into the system) to the dba group. If we ommit this step we’ll not be able to use SQL.plus as the regular user (in my case this user is called “apex”). Usermod -G dba apex. Now we need to edit the bashrc file to have the paths and system variables set correctly for everyone on the system.
Gedit /etc/profile In the editor at the end of the file add these lines: #ORACLE XE 11g Beta export ORACLESID=XE export ORACLEBASE=/u01/app/oracle export ORACLEHOME=$ORACLEBASE/product/11.2.0/xe export ORACLETERM=xterm export NLSLANG=americanamerica.utf8 export TNSADMIN=$ORACLEHOME/network/admin export ORANLS33=$ORACLEHOME/ocommon/nls/admin/data export LDLIBRARYPATH=$ORACLEHOME/lib export PATH=$ORACLEHOME/bin:$PATH. Now let’s reboot. We’re finished installing XE!
Shutdown -r now. In the menu go to: Applications – Oracle Database 11g. – Get Started This starts the browser and opens the APEX environment.When the page opens correctly we know that:. The database starts automatically. The EPG is running on port 8080 If you continue to use the EPG, you’re ready. If you want to use a different HTTP server you should continue:. GlassFish (post 4).
Oracle HTTP server & modplsql (post 6) You can also use the APEX listener in a stand-alone mode. Posted in Tagged, Post navigation.
This post will cover basic installation and configuration of Oracle 11g Express Edition (XE) on CentOS. We will also take a quick look at configuring Application Express (APEX) for 11g XE.
Basic installation is straight forward. If you just want to get up and running, you can just do steps 1 to 4 below (and 10 and 11 for Apex). The remaining steps (5 to 9) cover basic backup, recovery, and performance configuration. The full system requirements are Your CentOS box should have swap equal to 2xRAM. On every CentOS installation I have done for XE, I just needed to update/install the packages for libaio, bc, and flex. root@ms3 # yum install libaio bc flex. Step 1: Download and Install Oracle 11g XE rpm You can download the Oracle XE rpm, oracle-xe-11.2.0-1.0.x8664.rpm.zip, from the OTN Unzip oracle-xe-11.2.0-1.0.x8664.rpm.zip: root@ms3 # unzip -q oracle-xe-11.2.0-1.0.x8664.rpm.zip This will create the directory Disk1.
Change to the Disk1 directory: root@ms3 # cd Disk1 root@ms3 Disk1# ls oracle-xe-11.2.0-1.0.x8664.rpm response upgrade Install the rpm using rpm -ivh oracle-xe-11.2.0-1.0.x8664.rpm root@ms3 Disk1# rpm -ivh oracle-xe-11.2.0-1.0.x8664.rpm Preparing. ########################################### 100% 1:oracle-xe ########################################### 100% Executing post-install steps. You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
root@ms3 Disk1#. Step 2: Configure 11g XE Database and Options When installation completes, run '/etc/init.d/oracle-xe configure' to configure and start the database. Unless you wish to change the ports, except the defaults and set SYS/SYSTEM password. root@ms3 Disk1# /etc/init.d/oracle-xe configure Oracle Database 11g Express Edition Configuration - This will configure on-boot properties of Oracle Database 11g Express Edition. The following questions will determine whether the database should be starting upon system boot, the ports it will use, and the passwords that will be used for database accounts. Press to accept the defaults.
Ctrl-C will abort. Specify the HTTP port that will be used for Oracle Application Express 8080: Specify a port that will be used for the database listener 1521: Specify a password to be used for database accounts.
Note that the same password will be used for SYS and SYSTEM. Oracle recommends the use of different passwords for each database account. This can be done after initial configuration: Confirm the password: Do you want Oracle Database 11g Express Edition to be started on boot (y/n) y:y Starting Oracle Net Listener.Done Configuring database.Done Starting Oracle Database 11g Express Edition instance.Done Installation completed successfully. The installation created the directory /u01 under which Oracle XE is installed. Step 3: Set the Environment To set the required Oracle environment variables, use the oracleenv.sh the script included under cd /u01/app/oracle/product/11.2.0/xe/bin root@ms3 Disk1# cd /u01/app/oracle/product/11.2.0/xe/bin To set the environment for your current session run './oracleenv.sh': root@ms3 bin#./oracleenv.sh To set the environment permanently for users, add the following to the.bashrc or.bashprofile of the users you want to access the environment:.
/u01/app/oracle/product/11.2.0/xe/bin/oracleenv.sh You should now be able to access SQL.Plus root@ms3 bin# sqlplus /nolog SQL.Plus: Release 11.2.0.2.0 Production on Wed Sep 21 08: Copyright (c) 1982, 2011, Oracle. All rights reserved. SQL connect sys/Password as sysdba Connected. Step 5: Move the Flash Recovery Area (Fast Recovery Area) To protect against disk failure, you should move the Flash Recovery Area to a separate disk. This is actually now called the Fast Recovery Area, but the existing documentation still refers to it as the Flash Recovery Area If a separate disk is not in your budget you should, at the very least, move the Flash Recovery Area to a partition other than the Oracle installation directory.
By default, the Fast Recovery Area will be located under /u01/app/oracle/fastrecoveryarea SQL show parameter DBRECOVERYFILEDEST; NAME TYPE VALUE - - - dbrecoveryfiledest string /u01/app/oracle/fastrecoveryarea dbrecoveryfiledestsize big integer 10G SQL So, to move it elsewhere, first create the new directory root@ms3 # mkdir /opt/fra Change the owner to oracle and the group to dba root@ms3 # chown oracle:dba /opt/fra Now, change the DBRECOVERYFILEDEST to the location you selected above. SQL ALTER SYSTEM SET DBRECOVERYFILEDEST = '/opt/fra'; System altered.
Step 6: Add Redo Log Members to Groups You should have at least two Redo Log Groups and each group should have at least two members. Additionally, the members should be spread across disks (or at least directories) For whatever reason, only one member is created per group on install. You can view the redo log files using SQL SELECT. FROM V$LOGFILE; Since the default location for the two members is the Flash Recovery Area, the two existing members have been moved to our new FRA. You should now add an additional member for each group under /u01/app/oracle/oradata/XE SQL ALTER DATABASE ADD LOGFILE MEMBER '/u01/app/oracle/oradata/XE/log1b.LOG' TO GROUP 1; Database altered. SQL ALTER DATABASE ADD LOGFILE MEMBER '/u01/app/oracle/oradata/XE/log2b.LOG' TO GROUP 2; Database altered. Step 7: Set Sessions and Processes Parameters The default values for parameters and sessions is quite low on the default installation.
Step 8: Enable Archivelog Mode To enable online or 'hot' backups, Archivelog Mode must be enabled. Additionally, if you do not enable Archivelog Mode and take only offline or 'cold' backups, should you need to restore the database you will only be able to restore to the last backup To enable Archivelog Mode, shutdown the database and then startup mount: SQL shutdown immediate Database closed. Database dismounted. ORACLE instance shut down. SQL startup mount ORACLE instance started.
Total System Global Area bytes Fixed Size 2233344 bytes Variable Size 763366400 bytes Database Buffers 297795584 bytes Redo Buffers 5541888 bytes Database mounted. Enable Archivelog Mode SQL alter database archivelog; Database altered. Open the database and verify that Archivelog Mode is enabled SQL alter database open; Database altered. SQL SQL SELECT LOGMODE FROM SYS.V$DATABASE; LOGMODE - ARCHIVELOG SQL. Step 9: Create Online Backup Script To create automated backups, you can modify the backup.sh included under /u01/app/oracle/product/11.2.0/xe/config/scripts Create a directory for your backup script root@ms3 # mkdir /opt/orabackup Change the owner to oracle and the group to dba root@ms3 # chown oracle:dba /opt/orabackup Copy the backup.sh script from /u01/app/oracle/product/11.2.0/xe/config/scripts to the directory you created above. root@ms3 # cp /u01/app/oracle/product/11.2.0/xe/config/scripts/backup.sh /opt/orabackup/backup.sh Open the backup.sh script in a text editor or vi. The last section will look like this: else echo Backup of the database succeeded.
Echo Log file is at $rmanbackupcurrent. Fi #Wait for user to press any key echo -n 'Press ENTER key to exit' read userinp Change it to: else echo Backup of the database succeeded. Echo Log file is at $rmanbackupcurrent. Mail -s 'Oracle Backup Completed' '[email protected]'. Step 10: Oracle 11g XE and Application Express (APEX) Oracle 11g Express Edition comes with Application Express 4.0.2 already installed. If you elect to upgrade to the latest version (4.1 as of this writing), you can do so but will loose access to the XE GUI. Not a huge loss, but something to keep in mind.
Although Apex is already installed, you will need to set the Internal Admin password. To do so, run the apxchpwd.sql located under /u01/app/oracle/product/11.2.0/xe/apex: Note: pick something simple like Password123! As you will be prompted to change it on first log in anyways. SQL @/u01/app/oracle/product/11.2.0/xe/apex/apxchpwd.sql Enter a value below for the password for the Application Express ADMIN user.
Enter a password for the ADMIN user Session altered.changing password for ADMIN PL/SQL procedure successfully completed. Commit complete. SQL You can access the Application Express GUI at: Replace localhost above with your IP or domain as required. Workspace: Internal User Name: admin Password: (whatever you selected above). Alternatively, you can access via or Again, replace localhost above with your IP or domain as required. Step 11: Oracle 11g XE: Configure EPG or Apex Listener Unless you have a license for Oracle HTTP Server (OHS), your options are the embedded PLSQL Gateway (EPG) or Apex Listener. The Application Express that comes installed with Oracle 11g XE is configured using the EPG.
While the EPG is simpler than Apex Listener, it can be painfully slow as of Apex 3.2. Apex Listener, while quite fast, adds an extra layer of complexity. You will need to install an application server to run Apex Listener. I have run Apex Listener on both Tomcat (unsupported) as well as Oracle GlassFish 3.x (supported) and was not impressed with either.
A lot of people who know far more than I do about APEX (read: 99.9999% of the population) like the Apex Listener. Apex Listener and it's installation guide can be found The Apex Listener installation guide is well done and simple to follow. If you need to install Oracle GlassFish or GlassFish CE (basic installation is the same), you can use my GlassFish 3.1 instructions If you want to be an outlaw and use Tomcat, you can use my Tomcat 6 installation guide or my Tomcat 7 installation guide. Posted at by David in Oracle Tags: Export to:. Thanks for this arictle, however I seem to geting stuck after shutting down the database: OK SQL shutdown immediate Database closed.
Database dismounted. ORACLE instance shut down. NOK SQL startup mount ORA-12514: TNS:listener does not currently know of service requested in connect descriptor SQL startup mount ORA-24324: service handle not initialized ORA-01041: internal error. Hostdef extension doesn't exist If I execute ' /etc/init.d/oracle-xe restart ' all fine again Posted by PietPatat on September 06, 2014 at 09:10 AM CDT.