Basic ways to install Oracle databases on Mac OS _oracle

Source: Internet
Author: User
Tags zip

Basic Environment: Snow leopard10.6.2,oracle10.2.0.4

Open the Mac terminal and execute:

Sudo-i

Create oinstall groups and Oracle users, note that you need to ensure that the ID of the combined user does not conflict with existing system information, using 700

To create a group:

DSCL. -create/groups/oinstall

dscl-append/groups/oinstall gid

dscl.-append/groups/oinstall passwd "*"

To create a user:

DSCL.  -create/users/oracle

DSCL.-append/users/oracle uid

dscl.-append/users/oracle gid DSCL

.-append /users/oracle shell/bin/bash

dscl.-append/users/oracle home/users/oracle DSCL Real

Name "Oracle Software owner"

To create a user home directory:

Mkdir/users/oracle

chown oracle:oinstall/users/oracle

To modify an Oracle user password:

passwd Oracle

To modify kernel parameters:

Vi/etc/sysctl.conf

My amendment is as follows:

Kern.sysv.shmmin=1

kern.sysv.shmseg=8

 

kern.sysv.semmsl=87381

kern.sysv.semmns=87381

kern.sysv.semmni=87381

kern.sysv.semmnu=87381

kern.sysv.semume=10

kernel.shmall=2097152

kernel.sys.shmmax=2147483648

kernel.sys.shmmni=4096

kern.maxfiles=65536

kern.maxfilesperproc= 65536

net.inet.ip.portrange.first=1024

net.inet.ip.portrange.last=65000

kern.corefile=core

kern.maxproc=2068

kern.maxprocperuid=2068

Oracle's installation scripts rely on the Java1.4.2 version, please check the/system/library/frameworks/javavm.framework/versions directory for 1.4.2 If there is no need to do link:

Udo Ln-s/system/library/frameworks/javavm.framework/versions/1.5.0/system/library/frameworks/javavm.framework/ versions/1.4.2

My environment is Snow Leopard, the default JDK version is 1.6, has done all the Java version of link, so this step does not need to do.

To create an environment variable for an Oracle user, my environment variables are as follows, including some of my own settings for reference:

Use VI to create. Bash_profile, which reads as follows:

Export ps1= "\ $PWD >"

#export ant_opts=-djava.awt.headless=true

umask 022

 

export clicolor=1

Export Lscolors=gxfxcxdxbxegedabagacad

alias cls= ' Clear '

alias ll= ' ls-l '

alias la= ' ls-a '

alias vi= ' Vim '

 

export oracle_base= $HOME

export Oracle_sid=macora export

oracle_home=/users/oracle/oracle/ product/10.2.0

export path=/usr/local/bin:/users/oracle/oracle/product/10.2.0/bin: $PATH

Export Dyld_ Library_path= $ORACLE _home/lib

export display=:0.0

export nls_lang= "simplified Chinese_china. UTF8 "

ulimit-hn 65536

ulimit-sn 65536

The display was set up to solve the problem of using an Oracle user to start the X environment on the command line, in fact, after all the attempts I had to make, or to log off my own users and install it directly with an Oracle login, I later found an explanation:

Above Works is for OS X 10.5 Leopard. OS X 10.6 Snow Leopard has stricter security settings I cannot simply su to Oracle user and export display-you ACTU Ally have to login as Oracle User (logout in GUI and login as Oracle "Oracle software Owner") instead of "su–oracle". Raimond for this.

The final installation is done by the Oracle user login system.

Login to the MAC system with the Oracle user, locate the Runinstaller under Disk1, and execute:

./runinstaller-j-d32

32 means running under the 32-bit operating system, followed by the installation follow the prompts. I am installing an Enterprise Edition. To support multiple languages, I chose UTF-8 as the database encoding.

There are two problems encountered during installation:

1, "Error in invoking target ' ALL_NO_ORCL Ipc_g", encountered this error don't worry cancel installation, execute the following command:

CD ~/oracle/product/10.2.0/db_1/rdbms/lib

VI ins_rdbms.mk

Comment out the line at the beginning of $ (hsodbc_linkline) with the # number:

# $ (hsodbc_linkline)

Then go back to setup and click "Retry".

2, the installation may also prompt ORA-3113 error, this problem Raimonds Simanovskis by providing a patch file to solve, as follows:

CD $ORACLE _home/bin

curl-o http://rayapps.com/downloads/oracle_ee.zip

unzip oracle_ee.zip chmod ug+s

Oracle

RM Oracle_se.zip

Note: Install Enterprise Edition using Oracle_ee.zip

Install Standard Edition use Oracle_se.zip

Then go back to setup and click "Retry".

Finally, you are prompted to execute two scripts with root privileges, which is the same as installing on Linux

sudo/users/oracle/orainventory/orainstroot.sh

sudo/users/oracle/oracle/product/10.2.0/root.sh

Finally you will see the hint: the installation is successful!

3.Configuration
After the installation is complete, you can modify Tnsnames.ora and Listener.ora according to your situation, specify the port and the IP that can be accessed, nothing more than the localhost,127.0.0.1, the actual URL and so on. Port good default is 1521

Then execute from the command line:

Sqlplus/as SYSDBA

Startup

The ORACLE routine has started.

Total System Global area 612368384 bytes

Fixed Size   2085872 bytes

Variable Size  167775248 bytes

Database buffers  436207616 bytes

Redo buffers 6299648 bytes   

Database loading complete.

To start the Listener program:

Lsnrctl start

Tnslsnr for MacOS X server:version 10.2.0.4.0-production

System parameter file is/users/oracle/oracle/product/10.2.0/network/admin/listener.ora

Write log information for/users/oracle/oracle/product/10.2.0/network/log/listener.log

Listening: (Description= (Address= (PROTOCOL=IPC) (Key=extproc1))

Listening: (Description= (Address= (protocol=tcp) (Host=localhost) (port=1521))

Listening: (Description= (Address= (protocol=tcp) (host=192.168.70.1) (port=1521))

......

(Description= (address= (protocol=tcp) (host=192.168.70.1) (port=1521))

Service summary.

The service "Plsextproc" contains 1 routines.

Routine "Plsextproc", State UNKNOWN, contains 1 handlers for this service ...

Command execution succeeded

This allows you to use the database and, if you want to add a service name for another server, you can use the NETCA tool.

Also, do not attempt to start the Emctl service, which currently does not support the use of the EM Console on the Mac.

In fact, the functions of the EM console can be implemented by the command line.

Using Oracle SQL Developer on Mac is recommended for free and easy to use.

The entire installation process is not complex and is almost as successful as installing Oracle on Linux.

Now, enjoy your data services.

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.