Ubuntu14.04 installing Oracle 11g R2 Express Edition

Source: Internet
Author: User
Tags syslog shebang

    1. Create user

Create an Oracle user group: sudo addgroup Oracle

Create Oracle User: sudo adduser-ingroup oracle Oracle

Assigning root permissions to Oracle users: sudo gedit/etc/sudoers

Press ENTER to open the Sudoers file

Add under Root all= (All:all) all

ALL=(ALL:ALLALL

2. Installing the JDK
This I do not detail, the average person should have been installed

3. Install Oracle 11g
Perform:

sudo apt-get install alien libaio1 unixodbc

This must be installed success, see Clearly, once did not pretend to be OK, according to the hint, such as let you Update–fix

4 Download the Oracle 11g R2 Express Edition, generally get the file name should be: Oracle-xe-11.2.0-1.0.x86_64.rpm.zip
So, do the following:

su oracle

Copy the installation package to a specified path, easy to manage, I put in/usr/local inside, want to save the words like I put

cd /usr/localunzip oracle-xe-11.2.0-1.0.x86_64.rpm.zipcd Disk1sudo alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm

The last step above will take a slightly longer period of about 5-10 minutes, after completion, execute the following:

sudo gedit /sbin/chkconfig

Copy the following paragraph:

#!/bin/bash# Oracle 11gR2 XE installer chkconfig hack for UbuntuFile=/etc/init.d/oracle-xeif[[! ' Tail-n1$file| grep INIT ']]; ThenEcho>>$fileEcho ' # # # BEGIN INIT INFO '>>$fileEcho ' # provides:oraclexe '>>$fileEcho ' # Required-start: $remote _fs $syslog '>>$fileEcho ' # required-stop: $remote _fs $syslog '>>$fileEcho ' # default-start:2 3 4 5 '>>$fileEcho ' # default-stop:0 1 6 '>>$fileEcho ' # short-description:oracle 11g Express Edition '>>$fileEcho ' # # # END INIT INFO '>>$filefiUPDATE-RC.D Oracle-xe Defaults the  on#EOF

Save, exit, and execute:

sudo755 /sbin/chkconfigsudo gedit /etc/sysctl.d/60-oracle.conf

Copy the following paragraph:

# Oracle 11g XE kernel parametersfs.file-max=6815744net.ipv4.ip_local_port_range=900065000kernel.sem=25032000100128kernel.shmmax=536870912

Save, exit. Perform:

sudo service procps startsudo sysctl -q fs.file-max

If you see the return result is:
Fs.file-max = 6815744
Then it means that the steps above are correct and continue:

sudo ln -s /usr/bin/awk /bin/awkmkdir /var/lock/subsystouch /var/lock/subsys/listener

Next we start installing Oracle:

sudo dpkg --install oracle-xe_11.2.0-2_amd64.debsudo rm -rf /dev/shmsudo mkdir /dev/shmsudo mount -t tmpfs shmfs -o size=4096m /dev/shmsudo gedit /etc/rc2.d/S01shm_load

Then copy the following paragraph:

#!/bin/shcase"$1"in222>/dev/nullmount -t tmpfs shmfs -o size=4096echo errorexit1 ;;esac

Save, Exit, execute:

sudo755 /etc/rc2.d/S01shm_load

If there is no error, it means that we have finished the installation.

3. Configure Oracle
Perform

sudo /etc/init.d/oracle-xe configure

Return (set to default), remember to set the password, see the following instructions:

A valid HTTP port for  theOracle Application Express ( theDefault is 8080) A Valid port for  theOracle Database Listener ( theDefault is 1521) A Password for  theSYS andSYSTEM Administrative User accountsconfirm password forSYS andSYSTEM Administrative user accountswhether you want theDatabase toStart automatically when theComputer starts (next reboot).

Do not panic after completion, perform:

sudo gedit /etc/bash.bashrc

Drag to the bottom to add

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xeexport ORACLE_SID=XEexport NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`export ORACLE_BASE=/u01/app/oracleexport LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATHexport PATH=$ORACLE_HOME/bin:$PATH

Save, Exit, execute:

source /etc/bash.bashrcecho$ORACLE_HOME

If you see the output is:

/u01/app/oracle/product/11.2.0/xe

So congratulations, you're about to finish, execute:

startsqlplus /nologconn / as sysdba

The final verification

select * from user_tables;

You should be able to feel that you've already done it, and give it to me, man.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Ubuntu14.04 Install Oracle 11g R2 Express Edition

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.