Berikut catatan kecil saya saat melakukan instalasi Oracle 11g-XE di Linux CentOS 7.

Paket yang harus diinstall terlebih dahulu sebelum proses instalasi:

  1. tuned-profiles-oracle
  2. kmod-oracleasm
  3. bc
  4. gcc
  5. glibc
  6. make
  7. binutils
  8. libaio
  9. libaio-devel
  10. libstdc++
  11. libstdc++-devel
  12. libgcc
  13. compat-libstdc++
  14. ksh
  15. libXext
  16. libXtst
  17. libX11
  18. libXau
  19. libxcb
  20. libXi
  21. sysstat
  22. unixODBC
  23. unixODBC-devel
  24. zlib-devel
  25. elfutils-libelf-devel

Lakukan setting /etc/hostname sebagai berikut:

[[email protected]]# cat /etc/hostname
centos.joe

Lakukan setting /etc/hosts sebagai berikut:

[[email protected]]# cat /etc/hosts
127.0.0.1       localhost localhost.localdomain localhost4 localhost4.localdomain4
::1             localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101  centos.joe centos
192.168.84.20   centos.joe centos

Mulai proses instalasi:

A. Created a new user ‘oracle’ under the group dba:

[[email protected]]# usermod -a -G dba oracle
[[email protected]]# grep dba /etc/group
dba:x:1000:oracle,root 

B. Download paket installer “oracle-xe-11.2.0-1.0.x86_64.rpm.zip”, simpan di direktori “/tmp”.

C. Extract file tersebut

[[email protected]]# unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip
(Akan terbentuk direktori "Disk1" sebagai hasil extract file installer)

D. Masuk ke direktori hasil extract tersebut di atas, dan jalankan instalasi dengan rpm

[[email protected]]# cd Disk1
[[email protected]]# rpm -iv oracle-xe-11.2.0-1.0.x86_64.rpm
Preparing packages…
/var/tmp/rpm-tmp.OA9b17: line 257: [: 18446744073692774399: integer expression expected
/var/tmp/rpm-tmp.OA9b17: line 271: [: 18446744073692774399: integer expression expected
oracle-xe-11.2.0-1.0.x86_64
Executing post-install steps…
You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database. 
[[email protected] 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]: 8080
Specify a port that will be used for the database listener [1521]: 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: _  (isikan password Anda)
Confirm the password: _  (isikan password Anda, untuk konfirmasi)
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.

E. Pengaturan service

Aktifkan service
[[email protected]]# systemctl start oracle-xe.service
[[email protected]]# /sbin/chkconfig oracle-xe on

Start dan Stop service
[[email protected]]# service oracle-xe start
[[email protected]]# service oracle-xe stop

Enable service
[[email protected]]# service oracle-xe start
[[email protected]]# service oracle-xe enable 

F. Konfigurasi environment

Konfigurasi dapat diletakan di file .bash_profile atau .bashrc (dalam direktori home user). Konfigurasi dapat pula diletakkan dalam sebuah file pada direktori “/etc/profile.d/” misal dengan nama “envora.sh”, agar berlaku untuk semua user.

[[email protected]]# cd /etc/profile.d/ 
[[email protected] profile.d]# touch envora.sh 
[[email protected] profile.d]# vim envora.sh 
# Konfigurasi untuk Oracle
  export ORACLE_BASE=/u01/app/oracle
  export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe
  export ORACLE_SID=XE
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib
  export NLS_LANG=$ORACLE_HOME/bin/nls_lang.sh
  export LISTENER=$ORACLE_HOME/bin/lsnrctl  
  export PATH=$PATH:$ORACLE_HOME/bin
[[email protected] profile.d]# cd 
[[email protected]]# cat /etc/profile.d/envora.sh        
[[email protected]]# reboot
[[email protected]]# chown -R oracle:dba /var/tmp/.oracle
[[email protected]]# chmod -R 755 /var/tmp/.oracle
[[email protected]]# chown -R oracle:dba /tmp/.oracle
[[email protected]]# chmod -R 755 /tmp/.oracle 

Pastikan path oracle telah tersetup dengan benar:

[[email protected]]# echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/u01/app/oracle/product/11.2.0/xe/bin:/root/bin 

G. Masuk ke oracle

[[email protected]]# sqlplus
    SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 7 11:19:40 2016
    Copyright (c) 1982, 2011, Oracle.  All rights reserved.
    Enter user-name: SYSTEM
    Enter password: _  (password yang telah dibuat saat instalasi)
    Connected to:
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
    SQL> _
    SQL> exit (keluar dari PL/SQL)

H. Setting password for user (“oracle” )

[[email protected]]# passwd oracle
    Changing password for user oracle.
    New password: _
    Retype new password: _
    passwd: all authentication tokens updated successfully.

I. Setting network

[[email protected]]# cd /u01/app/oracle/product/11.2.0/xe/network/admin
[[email protected] admin]# cat listener.ora 
     # listener.ora Network Configuration File:
     SID_LIST_LISTENER =
     (SID_LIST =
       (SID_DESC =
          (SID_NAME = PLSExtProc)
          (ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)
          (PROGRAM = extproc)
       )
     )
     LISTENER =
     (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
          (ADDRESS = (PROTOCOL = TCP)(HOST = centos.joe)(PORT = 1521))
        )
     )
     DEFAULT_SERVICE_LISTENER = (XE)
[[email protected] admin]# cat tnsnames.ora 
    # tnsnames.ora Network Configuration File:
    XE =
    (DESCRIPTION =
       (ADDRESS = (PROTOCOL = TCP)(HOST = centos.joe)(PORT = 1521))
       (CONNECT_DATA =
         (SERVER = DEDICATED)
         (SERVICE_NAME = XE)
       )
    )
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
       (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))
       )
     (CONNECT_DATA =
       (SID = PLSExtProc)
        (PRESENTATION = RO)
     )
    )

J. Cek apakah listener berjalan normal

[[email protected]]# lsnrctl status
    LSNRCTL for Linux: Version 11.2.0.2.0 - Production on 13-SEP-2016 11:25:54
    Copyright (c) 1991, 2011, Oracle. All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.2.0 - Production
    Start Date 13-SEP-2016 11:18:42
    Uptime 0 days 0 hr. 7 min. 12 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Default Service XE
    Listener Parameter File /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora
    Listener Log File /u01/app/oracle/diag/tnslsnr/centos/listener/alert/log.xml
    Listening Endpoints Summary…
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos.joe)(PORT=1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=centos.joe)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    Services Summary…
    Service "PLSExtProc" has 1 instance(s).
    Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service…
    Service "XE" has 1 instance(s).
    Instance "XE", status READY, has 1 handler(s) for this service…
    Service "XEXDB" has 1 instance(s).
    Instance "XE", status READY, has 1 handler(s) for this service…
    The command completed successfully

K. Logging In to Application Express Administration Services

  • In a Web browser, go to the Oracle Application Express Administration Services application.
http://hostname:port/apex/apex_admin
  • On the Login page:
  1. Username – Enter admin
  2. Password – Enter the SYS or SYSTEM database account password you created during the installation process.
  3. Click Login.
  • If prompted, change your password and click Apply Changes.
  • Enter you new login credentials and click Login.

Sukses. Alhamdulillah!

Semoga bermanfaat.

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *