O'Reilly Databases

oreilly.comSafari Books Online.Conferences.

We've expanded our coverage and improved our search! Search for all things Database across O'Reilly!

Search Search Tips

advertisement
AddThis Social Bookmark Button

Print Subscribe to Databases Subscribe to Newsletters

Installing Oracle 9i on Mac OS X, Part 3

by David Simpson
01/03/2003

Editor's Note: In Part One of this three-part series exploring Oracle 9i on Mac OS X, David Simpson provided some excellent background information and a look at the ramifications for Solaris administrators. In Part 2 he differentiated between FileMaker Pro and Oracle, with a side conversation about WebObjects. An overview of Oracle's pricing structure was also included. In this closing segment, he shows you how to actually install Oracle on Mac OS X.

Setup Summary for Oracle on Mac OS X

The following parameters are being used for this Oracle installation:

  • Hostname = G4
  • Oracle Home = /Users/oracle/v920
  • Oracle SID = prod1
  • Oracle UNIX User Account = /Users/oracle, shell=/bin/bash
  • Oracle datafile directories = /Volumes/u01, /Volumes/u02, /Volumes/u03
  • Archivelog Directory = /Volumes/archive
  • Backup Files Directory = /Volumes/backup

The disk layout shown above is designed to show how to spread out the files across multiple mount points on a disk array. This is done to improve performance and reliability. A production database server will generally use multiple mount points in either a mirrored (for optimal performance) or RAID5 (for reduced disk space) configuration. Control files and mirrored redo log files will also be located on separate disks. Of course, you can also install Oracle 9i on a single-drive computer and just put all of the files in one directory, as Oracle describes within their Mac OS X RelaseNotes.pdf file.

Here is a set of example parameters, which I used for the Oracle 9.2 installation on my PowerBook G4:

  • Hostname = G4
  • Oracle Home = /Users/oracle/v920
  • Oracle SID = prod1
  • Oracle UNIX User Account = /Users/oracle, shell=/bin/bash
  • Oracle datafile directory = /Users/oracle/prod1
  • Archivelog Directory = /Users/oracle/archive
  • Backup Files Directory = /Users/oracle/backup

Hardware and OS Requirements

The official minimum configuration for installing Oracle 9.2.0 on Mac OS X is a server with a G4 CPU and 512MB of RAM. Mac OS X Server 10.2 (also called Jaguar) is officially the minimum version of Mac OS X supported by Oracle. 2 GB (minimum) of available disk space will also be required for installing the database binaries and creating the database instance. However, I have found that it is possible to use either server or client editions of Mac OS X and either a G3 or a G4 CPU. If you want to install a production database in the future, then you will want to meet Oracle's official minimum requirements in order to receive technical support.

Pre-Install Tasks

As with any Oracle database installation, it's necessary to perform a number of pre-install tasks to prepare the server to run the Oracle database software. The pre-install tasks on Mac OS X follow the same basic pattern as other versions of UNIX, but with differing UNIX commands and options.

Prior to attempting any remote SSH connection to the server, it is necessary to enable the SSH service. Open the System Preferences pane, click the "Sharing" icon, and click the "Services" folder tab. Enable the "Remote Login" service by clicking the "On" checkbox.

Configure Ethernet settings prior to starting the database installation by opening the Network preferences pane, selecting either the "Built-in Ethernet" or the "PCI Ethernet" menu item. Enter the IP Address, subnet mask, router, DNS Servers, and Search Domains information for this server -- if this task has not previously been done.

I recommend that a static IP address be assigned so that client computers can reliably access the database server. Dynamic IP addressing would also prevent reliable access to the database server from the Oracle Enterprise Manager Console application, which uses Oracle Management Servers for authentication. Currently, the IP address of each node is embedded within the connection and authentication information stored on the OMS server. This functionality is expected to change with the OEM 4.0 release scheduled for January 2003.

Multiple IP addresses may be assigned to the same Ethernet card by selecting the Network Port Configurations menu item, then clicking the "New" or "Duplicate" buttons and entering the appropriate IP address information. This feature permits DHCP to be used as the primary IP address for the server, but also allows a static IP address to be assigned and used exclusively for Oracle access.

I prefer to enable the root account in Mac OS X so that UNIX setup scripts can be run with the proper permissions. If you are just starting to use the UNIX command line, then I recommend that you just run sudo before executing scripts or commands requiring administrative access. Please remember that if you make a mistake while using the root account, there is no "undo" feature in most cases, so you may have to reinstall Mac OS X to recover.
Mac OS X Server is pre-configured with the root user account enabled. However, this account will generally need to be enabled with the consumer version of Mac OS X. Open the Netinfo Manager application within the Applications/Utilities directory. From the Security pull-down menu (at the top of the screen), select the "Enable Root User" option. Enter the root password, click the "Set" button, enter the root password again, and click the "Verify" button.

On a production server, Energy Saver features should be disabled to prevent the computer from going to sleep due to lack of user activity on the server. Open the System Preferences pane and click on the Energy Saver icon. Under the "Sleep" folder tab, drag the timeout slider to "Never" for the "Put computer asleep..." feature. Click on the "Options" folder tab and select the "Restart automatically after a power failure." option.

Either use the Utilities/Terminal application or use an SSH connection to remotely log into the Mac OS X server. It may seem unusual compared to a typical Mac OS X product install, but you can perform virtually the entire installation process while remotely logged in from another computer. This is, however, typical for most UNIX software installs.

NetInfo is an LDAP-compatible directory service database used by Mac OS X for managing computers, users, groups, passwords, services, and networking configuration information. nicl is a command line program that can be used for managing NetInfo databases in place of the graphical interface. When specifying nicl commands for these examples, the local NetInfo database will be specified by using the "." designation. By managing users, groups, and passwords only within the local NetInfo database, the local Oracle database installation will be immune to a loss of the network connection or changes made to the master NetInfo directory server.

Create UNIX Group

Use the following NetInfo command to create the "dba" UNIX group in the local NetInfo directory. Pick a group id number that does not conflict with any existing gid used on the server. Adding the oracle UNIX account to the admin group provides the Oracle-recommended admin privileges to this account, as you would do manually by checking the "allow user to administer this computer" checkbox in the Accounts Preferences Pane (Mac OS X client) or "administer the server" checkbox within the Workgroup Manager utility (Mac OS X server).

oracle% sudo nicl . -create /groups/dba passwd "*"
oracle% sudo nicl . -append /groups/dba gid 100
oracle% sudo nicl . -append /groups/dba users oracle
oracle% sudo nicl . -append /groups/admin users oracle

Using the following command will verify that the "dba" group has been successfully created:

oracle% sudo nicl . -list /groups

Create UNIX User

Use the following commands to create the "oracle" user account that will own, install, and execute the Oracle database software. Pick a user id number that does not conflict with any existing uid used on the server.

mkdir /Users/oracle
oracle% sudo nicl . -create /users/oracle
oracle% sudo nicl . -append /users/oracle group dba
oracle% sudo nicl . -append /users/oracle gid 100
oracle% sudo nicl . -append /users/oracle uid 700
oracle% sudo nicl . -append /users/oracle shell /bin/bash
oracle% sudo nicl . -append /users/oracle home /Users/oracle
oracle% sudo nicl . -append /users/oracle realname "Oracle database owner account"
oracle% sudo chown oracle:dba /Users/oracle

Use the standard passwd utility to set a password for the oracle account.

oracle% sudo passwd oracle
Changing password for oracle.
New password: <enter password>
Retype new password: <enter password again>

Using the following command will verify that the "oracle" user has been successfully created:

oracle% sudo nicl . -list /users

Add hostname entries to the NetInfo Directory for this server and any other servers with which this machine will need to communicate. With Mac OS X 10.2 and higher, direct entries may be made into the /etc/hosts file. However, adding these entries into the NetInfo Directory represents the recommended method for performing this type of configuration on Mac OS X. Following this recommendation ensures that this information is available to any servers, applications, or services that may only look for this information in NetInfo.
By default, this hostname is referred to by hostname.local in NetInfo. Adding an entry without the ".local" suffix allows applications to access the machine directly by hostname without adding this suffix. The following command adds this server with a hostname of "G4" and IP Address of "10.1.0.20" to NetInfo:

oracle% sudo nicl . /machines/G4 ip_address 10.1.0.20

If an OEM server is being used for management of this server, then its hostname and IP Address should also be entered.

oracle% sudo nicl . /machines/OEM1 ip_address 10.1.0.7

Note: It is not yet possible to manage Oracle 9.2 on Mac OS X with an OEM server, due to the lack of availability of the Oracle intelligent agent software ($ORACLE_HOME/bin/agentctl). This functionality is expected in a later release of Oracle 9.2 on Mac OS X.

Oracle in a Nutshell

Related Reading

Oracle in a Nutshell
A Desktop Quick Reference
By Rick Greenwald, David C. Kreines

Create the oracle user directory from an existing template and set the ownership of the directory to the new oracle account and group:

oracle% sudo ditto -rsrc -rsrcFork '/System/Library/User Template/English.lproj' /Users/oracle
oracle% sudo chown -R oracle:dba /Users/oracle

Edit the /etc/hostconfig file by adding the following two lines (or editing existing entries, if they already exist):

PORTMAP=-YES-
RPCSERVER=-YES-

Pages: 1, 2, 3, 4

Next Pagearrow




Tagged Articles

Be the first to post this article to del.icio.us

Related to this Article

Data Jujitsu: The Art of Turning Data into Product Data Jujitsu: The Art of Turning Data into Product
November 2012
$0.00 USD

Designing Great Data Products Designing Great Data Products
March 2012
$0.00 USD

Sponsored Resources

  • Inside Lightroom
Advertisement
O'reilly

© 2013, O’Reilly Media, Inc.

(707) 827-7019 (800) 889-8969

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.

About O'Reilly

  • Academic Solutions
  • Jobs
  • Contacts
  • Corporate Information
  • Press Room
  • Privacy Policy
  • Terms of Service
  • Writing for O'Reilly

Community

  • Authors
  • Community & Featured Users
  • Forums
  • Membership
  • Newsletters
  • O'Reilly Answers
  • RSS Feeds
  • User Groups

Partner Sites

  • makezine.com
  • makerfaire.com
  • craftzine.com
  • igniteshow.com
  • PayPal Developer Zone
  • O'Reilly Insights on Forbes.com

Shop O'Reilly

  • Customer Service
  • Contact Us
  • Shipping Information
  • Ordering & Payment
  • The O'Reilly Guarantee