Sunday, September 20, 2015

Install Oracle XE Database on Linux/Centos (Oracle Express Database Installation)

Download Oracle XE DB repository and place it in the server

[root@test linux]# ls -rlt oracle*
-rw-r--r-- 1 root root 315891481 Dec 17 2013 oracle-xe-11.2.0-1.0.x86_64.rpm.zip
[root@test linux]# pwd
/var/software/linux

1.  Install and Configure Centos 6.3, with required rpm packages

After installing Centos 6.3, be sure to install the following rpm packages.
□       LIBAIO: libaio-0.3.107-10.el6.x86_64.rpm
□       BC: bc-1.06.tar.gz
Connect to DB Server and log in as root









yum install libaio bc
or        
# rpm –Uvh package_name.rpm        download the rpm package file if no internet access available;
Note: Type y when prompted for confirmation; Type y when prompted for warning on the GPG key. You should see the Complete!











2.  Install Oracle11g XE

2.1
linux =>
(root)
groupadd dba
useradd oracle -g dba -G dba
2.2
Create Oracle installation folder:
# mkdir /opt/oracle
Copy oracle-xe-11.2.0-1.0.x86_64.rpm.zip to /opt/Oracle folder,
# cd /opt/oracle
# unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip;
Modify kernel parameters,
vi /etc/sysctl.conf
add the following parameters
kernel.shmall = 2097152
kernel.shmmni = 4096









Verify the change,
# /sbin/sysctl –p


2.3
Switch to folder Disk1,
# cd Disk1
# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
Centos VM may not accept some kernel parameters and just ignore the error message.









3.  Configure Oracle11g XE

3.1
Configure oracle database,
# /etc/init.d/oracle-xe configure
Unless you want to change the port numbers, you only need to set the password for SYS and SYSTEM








The installation process will create directory /u01, which Oracle XE will be installed
3.2
Set required Oracle environment variables, login in as oracle,
# su - oracle
# vi /home/oracle/.bash_profile
And add the following lines after export PATH
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export ORACLE_BASE=/u01/app/oracle
export PATH=$ORACLE_HOME/bin:$PATH
LSNR=$ORACLE_HOME/bin/lsnrctl
ORACLE_OWNER=oracle
LOG="$ORACLE_HOME_LISTNER/listener.log"
Or
Add the following line to the .bashrc or .bash_profile of the users you want to access the environment:
/u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
Test the access to Oracle database,
# sqlplus /nolog
# connect sys/password as sysdba
To allow remote access to Oracle 11g XE GUI (as well as Application Express GUI),
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);

You should now be able to access the Oracle 11g XE Home Page GUI at:
http://ip_address:8080/apex/f?p=4950:1
ip_address is your server IP and 8080 is the default listener port;


No comments:

Post a Comment