Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install oracle 10g for MAC os

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

MAC os how to install oracle 10g, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

Download the oracle database installation file first, download the address

Http://www.oracle.com/technetwork/cn/database/10204macsoft-x86-64-087400-zhs.html

To begin the installation, see the installation documentation:

Http://download.oracle.com/docs/html/B13954_01/toc.htm

It took him a day to install oracle for mac, but there are a lot of problems. At present, oracle access is normal, but em cannot be used.

Http://download.oracle.com/docs/cd/B19306_01/relnotes.102/b25285/toc.htm

Looking at oralce's release note, I found that Oracle Enterprise Manager Database Control is supported, so I don't care about em, but there is no web management interface.

"in addition, refer to the detailed English installation steps:

Http://blog.rayapps.com/2009/09/14/how-to-install-oracle-database-10g-on-mac-os-x-snow-leopard/

The installation steps are as follows:

Execution

Sudo-s

Access to root users

There are some check items in the document, such as memory, disk space, etc. (my computer is MacBookPro MC375, it should not be checked, it must be satisfied)

RequirementMinimum ValuePhysical memory (RAM) 512 MBSwap space1 GB or twice the size of RAM

On systems with 2 GB or more of RAM, the swap space can be between one and two times the size of RAM

Disk space in / tmp400 MBDisk space for software files2 GB

This value includes 1 GB of disk space required to install the Oracle Database 10g Products from the Companion CD (optional, but recommended).

Disk space for database files1.2 GB

Physical memory:

/ usr/sbin/system_profiler SPHardwareDataType | grep Memory

Memory: 4 GB

Check the disk space (there is also a space check such as / tmp, because the mac disk is attached to [/] and other space does not need to be checked)

Df-h /

Filesystem Size Used Avail Capacity Mounted on

/ dev/disk0s2 298Gi 227Gi 70Gi 77% /

Software requirements: (server version is required, but there is no problem with ordinary desktop version installation, rest assured)

The operating system version must be Apple Mac OS X Server 10.3.6

The following software (or a higher version) must be installed:

Xcode Tools 1.1 or higher

GNU C compiler (gcc) version 3.3 20030304 (Apple Computer, Inc. Build 1635)

This version of gcc is included in Xcode Tools 1.2 or higher or in the Dec 2003 gccLongBranch Tools update.

View the Mac version:

Sw_vers

ProductName: Mac OS X

ProductVersion: 10.6.7

BuildVersion: 10J869

Check the gcc version (this is very important, the initial installation is not available, XCODE development tools must be installed)

# gcc-v

Using built-in specs.

Target: i686-apple-darwin10

Configured with: / var/tmp/gcc/gcc-5659~1/src/configure-disable-checking-enable-werror-prefix=/usr-mandir=/share/man-enable-languages=c,objc,c++ Obj-c++-program-transform-name=/ ^ [cg] [^. -] * $/ with-slibdir=/usr/lib-build=i686-apple-darwin10-program-prefix=i686-apple-darwin10--host=x86_64-apple-darwin10-target=i686-apple-darwin10-with-gxx-include-dir=/include/c++/4.2.1

Thread model: posix

Gcc version 4.2.1 (Apple Inc. Build 5659)

Check xcode condition

# system_profiler SPApplicationsDataType | grep Xcode

Xcode:

Get Info String: Xcode version 3.2.2

Location: / Developer/Applications/Xcode.app

About Xcode:

Get Info String: About Xcode

Location: / Developer/About Xcode.app

If there is no XCODE control and GCC, please go to https://developer.apple.com/xcode/ to download xcode4 and then double-click to install it. XCODE4 supports systems above 10.6.6.

It is necessary to set up a group and user for oracle (2 groups are required to separate responsibilities, but it is not necessary, just create a group for dba):

Reference:

Http://www.pythian.com/news/1937/quick-install-guide-for-oracle-10g-release-2-on-mac-os-x-leopard-intel/

The following local UNIX groups and user must exist on the system:

The oinstall group (the Oracle Inventory group)

The dba group (the OSDBA group)

The oracle user (the Oracle software owner)

View existing groups and users first

Dscl. -list / groups gid

Dscl. -list / users uid

Select the unused id as the group and user id

Create groups and users and specify directories, change passwords, grant permissions, etc.:

Set up a group:

Dscl. -create / groups/dba

Dscl. -append / groups/dba gid 5400

Dscl. -append / groups/dba passwd "*"

Build users:

Dscl. -create / users/oracle

Dscl. -append / users/oracle uid 5300

Dscl. -append / users/oracle gid 5400

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

Dscl. -append / users/oracle home / Users/oracle

Dscl. -append / users/oracle realname "Oracle software owner"

Dscl. -append / Groups/dba GroupMembership oracle

Mkdir / Users/oracle

Chown oracle:dba / Users/oracle

Defaults write / Library/Preferences/com.apple.loginwindow HiddenUsersList-array-add oracle

Passwd oracle

Check the kernel parameters: (if the original parameter is larger than this, you don't need to modify it)

Check method: sysctl parameter name

Set parameter value: sysctl-w kern.maxproc=2068

Sysctl kern.sysv.semmsl # 87381

Sysctl kern.sysv.semmns # 87381

Sysctl kern.sysv.semmni # 87381

Sysctl kern.sysv.semmnu # 87381

Sysctl kern.sysv.semume # 10

Sysctl kern.sysv.shmall # 2097152

Sysctl kern.sysv.shmmax # max SGA you need. (reference setting: 2147483648)

Sysctl kern.sysv.shmmni # 4096

Sysctl kern.maxfiles # 65536

Sysctl kern.maxfilesperproc # 65536

Sysctl net.inet.ip.portrange.first # 1024

Sysctl net.inet.ip.portrange.last # 65000

Sysctl kern.corefile # core

Sysctl kern.maxproc # 2068

Sysctl kern.maxprocperuid # 2068

You can set the value, in order to avoid trouble, directly some people file sysctl.conf

Vi / etc/sysctl.conf

Format:

Kern.sysv.semmsl=87381

Kern.sysv.semmns=87381

……

Restart the system and check the parameters

Set up the oracle installation directory, establish / oracle, and own it to the oracle user

Mkdir / oracle

Chown oracle:dba / oracle

Chmod 775 / oracle

Since the shell bash is specified for oracle, create a .bash _ profile under its directory

Su-oracle

View current shell

Echo $SHELL

Use the oracle user to build, and the next time the oracle user logs in, it will execute the command and set some environment variables.

Modify ulimit. If IPServices is not found in the document, it will be added to the same effect as profile

# Must match kern.maxfilesperproc

Ulimit-Hn 65536

Ulimit-Sn 65536

Umask 022

Export DISPLAY=:0.0

Export ORACLE_BASE=/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

Export DYLD_LIBRARY_PATH=$ORACLE_HOME/lib

Export ORACLE_SID=orcl

Export ORACLE_HOSTNAME=qisnow.local

Export NLS_LANG= "SIMPLIFIED CHINESE_CHINA.UTF8"

PATH=$PATH:/$ORACLE_HOME/bin

Note that ORACLE_HOSTNAME is the hostname, which needs to be configured in / etc/hosts, as seen by hostname, to be able to ping

Start installation

Installation requires an x11 environment, so the value of DISPLAY is set above (cannot be started without x11 installer)

When you set the DISPLAY environment variable, you will receive the following error when you run a graphics program such as xclock:

Error: Can't open display:: 0.0

This is because the X 11 server does not allow graphics from other users' graphics programs to be displayed on the current screen by default. If you need the graphics of another user to be displayed on the current screen, you should execute the following command with the currently logged-in user, that is, the user before the identity switch

Xhost +

The solution comes from:

Http://www.itpub.net/viewthread.php?tid=1052163

After 10.6, the x11 interface cannot be opened directly by using the xclock command in the way of su-oracle. You need to log out of the current user, log in to the oracle user from the graphical login interface, and install using the terminal.

Download and extract the file (put it under / oracle):

Cd / oracle/db/Disk1

It is said that. / runInstaller will not work directly since MACOX 10.6. it will report an error and will report an error after testing. You need to take the following parameters with you.

. / runInstaller-J-d32

-must be installed in a 32-bit environment

You need to start your own xwindow, or you will report an error.

Exception in thread "main" java.lang.InternalError: Can't connect to window server-not enough permissions.

At java.lang.ClassLoader$NativeLibrary.load (Native Method)

At java.lang.ClassLoader.loadLibrary0 (ClassLoader.java:1823)

At java.lang.ClassLoader.loadLibrary (ClassLoader.java:1720)

At java.lang.Runtime.loadLibrary0 (Runtime.java:823)

At java.lang.System.loadLibrary (System.java:1045)

At sun.security.action.LoadLibraryAction.run (LoadLibraryAction.java:50)

At java.security.AccessController.doPrivileged (Native Method)

At sun.awt.NativeLibLoader.loadLibraries (NativeLibLoader.java:38)

At sun.awt.DebugHelper. (DebugHelper.java:29)

At java.awt.Component. (Component.java:567)

Now you can call up the installation interface of oracle

There will be a mistake in makefile

The file needs to be modified

Vi / oracle/product/10.2.0/db_1/rdbms/lib/ins_rdbms.mk

Comment out $(HSODBC_LINKLINE)

For example: # $(HSODBC_LINKLINE)

Then click retry.

This is followed by an error (OUI- 25031 error, which is also due to the failure to launch the netca and dbca graphical interface, and the need to set java to run under 32-bit):

Output has been generated through Configuration Assistant "Oracle Net Configuration Assistant":

Command = / oracle/product/10.2.0/db_1/bin/netca / orahome / oracle/product/10.2.0/db_1/ orahnam OraDb10g_home1 / instype typical / inscomp client,oraclenet,javavm,server,ano / insprtcl tcp / cfg local / authadp NO_VALUE / nodeinfo NO_VALUE / responseFile / oracle/product/10.2.0/db_1/network/install/netca_typ.rsp

UnsatisfiedLinkError exception loading native library: njni10

Modify the java file

Vi $ORACLE_HOME/jdk/bin/java

Add a parameter: make the other parameters after java-D32 unchanged, so that the future netca and dbca will run according to 32-bit (so that netca can be created normally)

During the installation process, the patch file provided by Raimonds Simanovskis is also required, otherwise dbca may not be successful in creating the database, 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_ee.zip

Note: install Enterprise Edition using oracle_ee.zip

Install Standard Edition using oracle_se.zip

Then return to the installer and click "retry".

Finally, you are prompted to execute two scripts with root permissions, which is the same as installing it under linux

If you follow the steps above and then perform the network configuration and database configuration after replacement, you will be prompted to execute root.sh only.

Sudo / oracle/oraInventory/orainstRoot.sh

Sudo / oracle/product/10.2.0/db_1/root.sh

Finally, you will see a prompt: the installation is successful!

Note that if there is an error in configuring the database during installation, you can ignore it first, and then use the dbca command to delete the error and re-create a database.

After configuring the database, you can go to the directory / oracle/product/10.2.0/db_1/network/admin to see whether listener.ora and tnsnames.ora are configured according to the actual situation of the machine, if not make appropriate modifications:

Listener.ora (the red one is useless and can be deleted):

SID_LIST_LISTENER =

(SID_LIST =

(SID_DESC =

(SID_NAME = PLSExtProc)

(ORACLE_HOME = / oracle/product/10.2.0/db_1)

(PROGRAM = extproc)

)

)

LISTENER =

(DESCRIPTION_LIST =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))

(ADDRESS = (PROTOCOL = TCP) (HOST = qisnow.local) (PORT = 1521))

)

)

=

Tnsnames.ora:

ORCL =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP) (HOST = qisnow.local) (PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcl)

)

)

EXTPROC_CONNECTION_DATA =

(DESCRIPTION =

(ADDRESS_LIST =

(ADDRESS = (PROTOCOL = IPC) (KEY = EXTPROC1))

)

(CONNECT_DATA =

(SID = PLSExtProc)

(PRESENTATION = RO)

)

)

Run the command after the installation is successful:

Start monitoring:

Lsnrctl start

View statu

Lsnrctl status

LSNRCTL for MacOS X Server: Version 10.2.0.4.0-Production on 23-March-2011 21:39:45

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=EXTPROC1)

STATUS of LISTENER

-

Alias LISTENER

Version TNSLSNR for MacOS X Server: Version 10.2.0.4.0-Production

Launch date 23-March-2011 21:18:23

Normal running time 0 days, 0 hours, 21 minutes and 22 seconds

Trace level off

Security ON: Local OS Authentication

SNMP OFF

Listener parameter file / oracle/product/10.2.0/db_1/network/admin/listener.ora

Listener log file / oracle/product/10.2.0/db_1/network/log/listener.log

Listening Endpoint Summary …

(DESCRIPTION= (ADDRESS= (PROTOCOL=ipc) (KEY=EXTPROC1)

(DESCRIPTION= (ADDRESS= (PROTOCOL=tcp) (HOST=qisnow.local) (PORT=1521))

Service summary..

The service "PLSExtProc" contains 1 routine.

Routine "PLSExtProc", status UNKNOWN, contains 1 handler for this service.

The service "orcl" contains 1 routine.

Routine "orcl", status READY, contains 1 handler for this service.

The service "orclXDB" contains 1 routine.

Routine "orcl", status READY, contains 1 handler for this service.

The service "orcl_XPT" contains 1 routine.

Routine "orcl", status READY, contains 1 handler for this service.

Command executed successfully

There is a status above that is unknown, but it does not affect the use

You can log in to sqlplus:

Sqlplus sys/passw0rd as sysdba

Qisnow:admin oracle$ sqlplus sys/passw0rd as sysdba

SQL*Plus: Release 10.2.0.4.0-Production on Wednesday March 23 22:27:12 2011

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Connected to an idle routine.

SQL > startup

The ORACLE routine has been started.

SQL > select sysdate from dual

SYSDATE

-

23-March-11

Shut down the database:

SQL > shutdown immediate

The database has been closed.

The database has been uninstalled.

The ORACLE routine has been closed.

Stop monitoring:

Qisnow:admin oracle$ lsnrctl stop

LSNRCTL for MacOS X Server: Version 10.2.0.4.0-Production on 23-March-2011 21:47:24

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION= (ADDRESS= (PROTOCOL=IPC) (KEY=EXTPROC1)

Command executed successfully

After the installation, isqlplus has been started and can be accessed through http://qisnow.local:5560/isqlplus

Start and stop command:

Isqlplusctl start

Isqlplusctl stop

Now that the installation is complete, the error report using the PL/SQL remote link database is as follows:

ERROR:

ORA-27101 Shared memory realm does not exist

ORA-01034 ORACLE not available

Basic explanation:

Error: ORA-27101

Text: shared memory realm does not exist

Cause: Unable to locate shared memory realm

Action: Verify that the realm is accessible

Solution:

Reason:

The ORACLE_HOME or ORACLE_SID settings are incorrect.

In previous versions, if the ORACLE_SID was incorrect, only ORA-01034 was generally prompted. Oracle 8.1.7 gives an additional message: ORA-27101.

-> if it is Unix, set the ORACLE_SID correctly in Shell (pay attention to case sensitivity).

In addition, check the ORACLE_HOME environment variable. How to check with reference to the following command

Echo $ORACLE_SID

% ps-ef | grep smon

-> if it is Windows, it is usually caused by multiple instances in the system.

You can use C:\ > set ORACLE_SID=DEMO on the command line.

Change the DEMO here to your corresponding instance name.

If not, check the ORACLE_HOME in the registry.

In addition, in a Windows environment, such an error is reported when you cannot connect to a remote database.

The solution is to put the (view client) in the sqlnet.ora file

SQLNET.AUTHENTICATION_SERVICES = (NTS) NTS is replaced by NONE.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report