Ubuntu Installation Oracle 11g xe____oracle

Source: Internet
Author: User
Tags reserved syslog sqlplus
Http://meandmyubuntulinux.blogspot.com/2012/05/installing-oracle-11g-r2-express.html


The Installer released by Oracle are only meant for 64-bit (x86_64) systems. If you are wish to install the 32-bit version, and the installing Oracle XE on Ubuntu 32-bit
It'll consume, at most, processing resources equivalent to one CPU.
Only one installation of Oracle Database XE can is performed on a single computer.
The maximum amount of user data in an Oracle database XE database cannot exceed one GB.
The maximum amount of RAM that Oracle XE uses cannot exceed 1 GB, even if it is available.


1) Download the Oracle 11GR2 Express Edition installer from the link given below:


Http://www.oracle.com/technetwork/products/express-edition/downloads/index.html


(You'll need to create a free Oracle Web account if you don ' t already have it)


2) Unzip it:
Unzip Oracle-xe-11.2.0-1.0.x86_64.rpm.zip


3) Install The following packages:
sudo apt-get install alien Libaio1 unixodbc vim


4 Convert the Red-hat (RPM) package to Ubuntu-package:
sudo alien--scripts-d oracle-xe-11.2.0-1.0.x86_64.rpm


(Note:this may take "a while, till so time" can go to step 5)


5 Do the following pre-requisite things:
A) Create a special Chkconfig script:


The Red Hat based installer of Oracle XE 11GR2 relies On/sbin/chkconfig, which is isn't used in Ubuntu. The Chkconfig package available for the "current version of" Ubuntu produces errors and I am safe to use. Below is a simple trick to get around the problem and install Oracle XE successfully:
sudo vim/sbin/chkconfig


(Copy and paste the following into the file)
#!/bin/bash
# Oracle 11GR2 XE installer chkconfig hack for Ubuntu
File=/etc/init.d/oracle-xe
if [[! ' tail-n1 $file | grep INIT ']]; Then
Echo >> $file
Echo ' ### BEGIN INIT INFO ' >> $file
Echo ' # provides:oraclexe ' >> $file
Echo ' # Required-start: $remote _fs $syslog ' >> $file
Echo ' # required-stop: $remote _fs $syslog ' >> $file
Echo ' # Default-start:2 3 4 5 ' >> $file
Echo ' # default-stop:0 1 6 ' >> $file
Echo ' # short-description:oracle 11g Express Edition ' >> $file
Echo ' ### end INIT INFO ' >> $file
Fi
UPDATE-RC.D Oracle-xe Defaults 80 01
Save the above file and provide appropriate execute privilege:
chmod 755/sbin/chkconfig


b) Set the Kernel parameters:
Oracle 11GR2 XE requires to set the following additional kernel parameters:
sudo vim/etc/sysctl.d/60-oracle.conf
(Enter the following)
# Oracle 11g XE kernel parameters
fs.file-max=6815744
net.ipv4.ip_local_port_range=9000 65000
KERNEL.SEM=250 32000 100 128
kernel.shmmax=536870912
(Save the file)
Note:kernel.shmmax = max possible value, e.g. size of physical RAM (in bytes e.g. 512MB ram = = 512*1024*1024 = 5368709 bytes)
Verify the change:
sudo cat/etc/sysctl.d/60-oracle.conf
Load New Kernel parameters:
sudo service Procps start
Verify:sudo Sysctl-q Fs.file-max
-> Fs.file-max = 6815744
c) Increase the system swap space:analyze your current swap spaces by following command:
Free-m
Minimum swap space requirement The Oracle 11gr2 XE is 2 GB. In case, your are lesser, you can increase it through following steps in my one of previous post.
D Some more required changes:
i) Ln-s/usr/bin/awk/bin/awk
II) Mkdir/var/lock/subsys
III) Touch/var/lock/subsys/listener




6 are ready to install Oracle 11GR2 XE. Go to the directory where you created the Ubuntu package file with step 4 and enter following commands in Terminal:
i) sudo dpkg--install oracle-xe_11.2.0-2_amd64.deb
Update:before you are proceed to next step, does have a look at this trouble-shooting post in order to avoid MEMORY TARGET or Any other "shared memory" error.
II) SUDO/ETC/INIT.D/ORACLE-XE Configure
Enter The following configuration information:
A valid HTTP port for the Oracle application Express (the default is 8080)
A valid port for the Oracle database listener (the default is 1521)
A password for the SYS and SYSTEM administrative user accounts
Confirm password for SYS and SYSTEM administrative user accounts
Whether you want the database to start automatically the computer starts (next reboot).
7 Before you start using the Oracle 11gr2 XE you have to set-up more things:
A) set-up the environmental variables:
Add following lines to your. BASHRC:
Export Oracle_home=/u01/app/oracle/product/11.2.0/xe
Export Oracle_sid=xe
Export nls_lang= ' $ORACLE _home/bin/nls_lang.sh '
Export Oracle_base=/u01/app/oracle
Export ld_library_path= $ORACLE _home/lib: $LD _library_path
Export path= $ORACLE _home/bin: $PATH

b) Execute your. Profile to load the changes:

. ./.profile


8) Start The Oracle 11gr2 XE:


sudo service oracle-xe start


The output should is similar to following:
user@machine:~$ sudo service oracle-xe start
Starting Oracle Net Listener.
Starting Oracle Database 11g Express Edition instance.
user@machine:~$

8) Create Your User:
A) Start Sqlplus and login as SYS:
Sqlplus SYS as SYSDBA
(Provide the password gave while configuring the Oracle in Step 6 (ii)).
This is should come to following:


Sql*plus:release 11.2.0.2.0 Production on Wed May 9 12:12:16 2012


Copyright (c) 1982, Oracle. All rights reserved.


Enter Password:


Connected to:
Oracle Database 11g Express Edition release 11.2.0.2.0-64bit Production


Sql>


b) Enter following on the SQL Prompt:replace username and password by your desired.
Sql> Create user username identified by password;


User created.


Sql> Grant Connect,resource to username;


Grant succeeded.



9 as you have created the user, can login to it:


user@machine:~$ Sqlplus


Sql*plus:release 11.2.0.2.0 Production on Wed May 9 12:28:48 2012


Copyright (c) 1982, Oracle. All rights reserved.


Enter user-name:temp
Enter Password:


Connected to:
Oracle Database 11g Express Edition release 11.2.0.2.0-64bit Production


Sql> select 2+2 from dual;


2+2
----------
4


Sql>
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.