MacLochlainns Weblog

Michael McLaughlin's Technical Blog

Site Admin

Fedora Install of Oracle 11g

with 21 comments

After the installation of Oracle 11g XE on Windows, I anticipated problems installing on Fedora. It’s terrific to report it was by far simpler to install on Fedora. This post provides the steps, and builds on the Fedora configuration published earlier this week.

  1. After you download the software from the Oracle web site, you’ll need to expand the compressed file. When you double click on the download item you will see the following screen. Click Extract at the top of the display.

  1. The Extract displays the following dialog. Click the Create Folder button and you’ll get an entry point for a new directory in your user’s directory. For the example, Oracle11gXE

  1. After creating the directory, click the Extract button.

  1. The extract process completes and shows the following dialog.

  1. The Disk1 directory will show the following contents.

  1. You need to drop down into a Terminal session, which you can launch by clicking on Applications, System Tools, and Terminal in the menu.
sudo rpm -iv oracle-xe-11.2.0-1.0.x86_64.rpm

This command will install the packages in verbose syntax and display the following messages:

[sudo] password for mclaughlinm:
Preparing packages for installation...
Executing post-install steps...
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.

  1. This step requires that you assume the role of the root user, which can be done with this syntax:
sudo sh

In this root shell, you run the Oracle 11g XE configuration with this command:

/etc/init.d/oracle-xe configure

The following are the text prompts that you accept to configure Oracle 11g XE:

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 <Enter> 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]:
Starting Oracle Net Listener...Done
Configuring database...
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.

After completing the configuration, you need to do two things. First, you need to modify the .bash_profile file for your user (covered in the next step). Second, you need to reboot your system.

  1. This step requires that you exit the root shell by typing the exit command. This should put you back into your administration account with sudoer privileges. You use vi to edit and add the following to the .bashrc file.
You actually have two options here. You can use Oracle’s provided environment file or write your own. According to the Actually, according to the Oracle® Database Express Edition Installation Guide 11g Release 2 (11.2) for Linux x86-64 you can do it in one line.

. /u01/app/oracle/product/11.2.0/xe/bin/

Or, you can write your own file, like this:

# Oracle Settings
TMP=/tmp; export TMP
ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe; export ORACLE_HOME
PATH=/usr/sbin:$PATH; export PATH
if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    ulimit -u 16384 -n 65536

You can now log in to the Oracle database with the following syntax from the command line. You’ll be prompted for the system password that you entered during the configuration steps. I’ll add another post on SQL Developer later this week.

sqlplus system

  1. This step is optional. You can configure an file in the oracle user’s home directory. While you could put this in the .bashrc file, the oracle account isn’t bootable. That’s why I recommend putting it in an environment file.
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
  . /etc/bashrc
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# User specific aliases and functions
. /u01/app/oracle/product/11.2.0/xe/bin/
# Wrap sqlplus with rlwrap to edit prior lines with the
# up, down, left and right keys.
  if [ "$RLWRAP" = "0" ]; then
    sqlplus "$@"
    rlwrap sqlplus "$@"
# Set vi as a command line editor.
set -o vi

If you want to use the menu choices added by the installation, you need to put your privileged sudoer in the dba group. I wrote a blog post on it here.

Written by maclochlainn

September 27th, 2011 at 1:35 am

21 Responses to 'Fedora Install of Oracle 11g'

Subscribe to comments with RSS or TrackBack to 'Fedora Install of Oracle 11g'.

  1. There’s no need to reboot on Linux. Either sourcing the new .bashrc or at most logging out & in should be fine.

    Instead of hard coding the Oracle environment values, I generally source /u01/app/oracle/product/11.2.0/xe/bin/

    Chris Jones

    27 Sep 11 at 4:47 pm

  2. The only problem with those in Oracle 11g XE is that the configuration files ( or don’t have a reference to $ORACLE_BASE or $LD_LIBRARY_PATH. That’s why I write my own …


    29 Nov 11 at 2:28 pm

  3. […] how to setup Oracle Database 11g XE on Fedora […]

  4. Hello,
    I installed Fedora 16 (Live CD to HD)
    I’m trying to install Oracle 11G XE exactly as you explain but after
    sudo rpm … i have a message with : … is intended for a different architecture

    Could you help ?


    18 Feb 12 at 1:41 am

  5. Are you in dash or bash shell? If you have doubt, type bash at the command line first. Then, try this in terminal:

    sudo sh

    Enter your system user password, and then type this:

    rpm -iv oracle-xe-11.2.0-1.0.x86_64.rpm


    18 Feb 12 at 10:49 am

  6. thks for you reply…
    but still the same problem

    Maybe i have fedora x86_32 and i need fedora x86_64…


    19 Feb 12 at 12:38 am

  7. FYI,

    i have installed Fed_64… and it works now.


    19 Feb 12 at 1:57 am

  8. Thank you in advance, Mr. McLaughlin! As one who’s suffered through hours of installation and configuration under Linux, I really appreciate this guide.

    I have a follow-up question if you have a moment: would you recommend any particular partitioning scheme for this install? I’ve seen elsewhere that XE wants at least 2GB of swap (which could be in a file) and that it doesn’t handle ext4 file systems well. Would it be a good idea to have a separate ext3 partition available, or is that needlessly complicated? (I’m doing a brand-new install of Fedora on this machine anyway.)

    Thanks again,



    24 Feb 12 at 11:15 pm

  9. Thanks for your fine and detailed effort. This enabled me to quickly install and run Oracle 11g XE on Fedora 16.

    One thing I did have to research was getting the HTTP listener to run. The documentation says somewhere that the listeners should start automatically but mine did not. I had to open a terminal and su oracle. I could not find the password that was defined when the oracle user was created during install so I had to use system-config-users to change it. Once I connected as oracle I ran LSNRCTL start. This starts the net and http listers. You can check status with lsnrctl status. With these listeners running you can use remote tns connections to the database and, more practically for a single user instance, the http ‘Getting Started’ client.

    The foregoing procedure maybe commonly known to experienced Oracle installers, and it is detailed in the documentation. But I mention it here in the event that anyone can improve on these steps or can suggest a way of starting the listeners automatically.

    Many thanks,



    28 Mar 12 at 7:04 am

  10. […] They under step 8 in that […]

  11. Your posts on Ora for Fedora were super helpful for me – I know it takes a lot of time and energy to put these cookbooks together, so just wanted to say thanks!


    30 Dec 12 at 9:06 am

  12. Thank you very much for sharing knowledge.


    12 Jan 13 at 11:39 pm

  13. still the best and most simple oracle setup tutorial on the internet. Thanks ! ! !


    17 Apr 13 at 8:35 pm

  14. Step 8 here is unnecessary. Following the official documentation is much simpler. Setting the environment variable only takes four lines.


    6 Sep 13 at 10:03 pm

  15. Jeff,

    Actually, according to the Oracle® Database Express Edition Installation Guide 11g Release 2 (11.2) for Linux x86-64 you can do it in one line if you prefer to use Oracle’s configuration file.

    . /u01/app/oracle/product/11.2.0/xe/bin/

    I just believe that helping folks understand the pieces makes them more successful over time. However, I’ve added a note for those who’d like to use the Oracle environment file.


    7 Sep 13 at 1:18 pm

  16. Thank you for this amazing tutorial. =)

    Much appreciated.


    13 Nov 13 at 10:33 pm

  17. Eu gostaria de saber como removo o oracle-xe do meu computador. Remover completamente. Fedora 20.

    I would like to know how to remove oracle-xe from my computer. Remove completely.


    18 Jan 14 at 8:10 am

  18. Taylan,

    You can do the following to remove Oracle XE completely from Fedora 20:

    Connect as the root user in a native shell:

    su - root

    Stop and disable the configuration as the root user:

    /etc/init.d/oracle-xe stop
    /etc/init.d/oracle-xe disable

    Remove the files as the root user:

    rm -R * /u01
    rm /etc/oratab
    rm /etc/oracle-xe

    Espero que essas instruções ajudar. Além disso, espero que o sit web ajuda.


    18 Jan 14 at 8:05 pm

  19. Your uninstall instructions seem incomplete. Won’t that leave it listed under applications etc.

    rpm -qa | grep -i oracle

    It returns:


    Now, with the correct package name you can remove the Oracle installation:

    sudo rpm -e oracle-xe-11.2.0-1.0.x86_64

    Tyler A

    9 Apr 15 at 1:19 pm

  20. Tyler, I didn’t provide uninstall instructions but thanks for providing them (with a slight edit on my part).


    10 Apr 15 at 2:34 am

Leave a Reply