Have a Wetpaint account? Sign in
Installing Oracle 11g on CentOS under VMWare on a Macbook
Introduction
So, you’re a DBA who wants to stay on top of your technical skills but your employer won’t provide you with the servers / installation support you need for a “DBA Playground”? Been looking at those fancy Macbook or Macbook Pros’s but the significant other won’t let you buy that shiny new toy? Here’s the answer to your prayers: A legit way to set up a new Macbook or Macbook Pro to serve as your own ‘Proof of Concept” box! It’s a work tool, Honey, honest!
Here is how I’ve set up my Macbook to be my DBA Playground. You can have Oracle 11gR1 and 10gR2 installed on two operating systems, Red Hat Linux 4 and Solaris 10. Both are 64bit and both can be running simultaneously for easy comparisons. This guide shows you how to install Oracle 11g on CentOS under VMWare Fusion on a Macbook.
The Oracle installation instructions are based on an online instruction document from Oracle on how to install 10g on a Red Hat Enterprise Linux box. I made modifications for CentOS and Oracle 11g under VMWare.
In the Oracle installation section I came across some errors. Instead of fixing them and going back and changing the installation instructions I showed how I fixed these errors so that if you encounter similar but different errors you should be able to fix them. This is the one thing I didn’t like about other installation blogs, in that if you hit a snag you had to spend extra time figuring out how to fix them. Hopefully this will be a useful learning tool.
You’ll need four major components to build this system:
Component I: The Intel Macbook
I choose a Macbook over the Macbook Pro because of cost, but either will do the trick. The Macbook Air’s were lighter and Oooh-so-cooler, but he Air couldn’t be upgraded. Older PPC machines will not work. Here are the specs of the system I purchased from the Apple Store:
Jan 2008 Apple Macbook:
Intel Core 2 Duo 2.2Ghz / 1gb RAM / 160gb Hard Drive w/Superdrive
Leopard 10.5 with the 10.5.2 update
For some reason the $100 worth of 4Gb RAM costs $800 if you buy it from the Apple site, and the $150 Hard Drive is $200. The Macbook’s are easy to upgrade, so after purchasing the Macbook and stopping at the local electronics MegaMart, I upgraded the RAM to 4GB and upgraded the hard drive to 250Gb (links are to some How-To’s on the web).
At the end of these efforts you will have a relatively low-cost but powerful (and beautiful) laptop with which you can experiment with various operating systems and Oracle versions.
Component II: VMWare Fusion
I used Version: 1.1.1 Build (72241)
VMWare Fusion is a powerful yet inexpensive ($80) virtualization tool for the Mac. I choose VMWare over Parallels for no specific reason – I didn’t know either. VMWare lets you create snapshots of your environment so if you really mess up (which I did several times), you can bring it back to a saved point so re-installation isn’t necessary. VMWare supports many flavors of 32 and 64 bit Linux, Windows (XP and Vista), and Solaris.
As with Parallels, the virtual operating system and file systems you install and create reside all inside a single file on your Mac hard drive, so no special partitioning or bootcamp configuration is required. If you really mess up, just delete the file and start over. Performance is surprisingly good, as the dual core MacBooks are speedy enough to handle the demand, and the additional RAM you install gives you lots of room to keep from swapping to disk.
Component III: CentOS
CentOS aims to be a 100% binary compatible Linux clone of RedHat Enterprise Edition. Red Hat Linux is the #1 supported Linux distribution from Oracle, and new releases seem to come out on RedHat before any other Linux distributions. It’s also free!
Component IV: Oracle
Oracle allows you to download for free their latest enterprise database binaries as long as you agree to the license agreement (you need to create an account, which is free) and don’t use it for commercial or business use. Steps and links for getting the Oracle software are later in the document, as you will want to download it into your virtual Linux world for simplicity.
So, here are the steps I took to build this system. At this point I had an upgraded Macbook with 4Gb of memory and a 250mb hard drive with VMWare 1.1.1 installed, and the connectivity to the internet established. I also turned on Spaces (1 row of 4 for simplicity), you’ll see why later.
Take a deep breath, get a beer, close the door to the office or put on your headphones. Let’s get started!
Step 1: Download a copy of CentOS
Download the CentOS iso file from one of the mirrors and place it on your desktop or documents folder.
You can find the mirrors for a free copy of the distribution here:
http://isoredirect.centos.org/centos/4/isos/
Download the 4.6 (or greater) version for x86_64 in DVD iso format. It’s a single 2.2Gb file.
Step 2: Create a virtual VMWare session for CentOS
Open VMWare Fusion on your MacbookSelect new
Choose Red Hat Linux Enterprise Linux 4 64-bit.
In the Virtual Hard Disk, give it around 45gb
Select "Use operating system installation disk image file"
Drop Down where it says None and click on Other…
Point to the CentOS iso file you downloaded
Click Finish
This will fire off the CentOS installation in a VMWare window.
Step 2 CentOS Install
The first screen will be a text screen:
Select Enter to continue with a graphical install on the console. You may need to click within the text window before your keystrokes are relayed to that window.
The installer scans your hardware, briefly displays the CentOS splash screen, and then begins a series of screen prompts
Next you will get a text screen saying CD Found and ask if you want to perform a media test.
Go ahead and tab over to “skip” and press spacebar.
Welcome to CentOS-4 x86-64 screenClick Next
Installation typeSelect Custom,
Click Next
Language SelectionAccept the default.
Click Next
Keyboard ConfigurationAccept the default.
Click Next
Disk Partitioning SetupSelect Manually partition with Disk Druid
Click NextDouble click on the "Free Space" line under /dev/sda and an "Add Partition" window will popup.Click NextMount point drop down, select /bootClick OK
File System ext3
Start Cylinder 1
End Cylinder 13 (should translate to 101mb)
Again double click on the "Free Space"Mount point drop down leave aloneClick OK
File System Type select swap
Start Cylinder 14
End Cylinder 268 (should translate to 2000mb)
Again double click on the "Free Space"Mount point drop down select /Click OK
File System Type ext3
Start Cylinder 269
End Cylinder (select the max to allocate the rest of the disk – all the other directories will go here)
Click "Force to be a primary partition"
Boot Loader ConfigurationAccept Default
Click Next
Network ConfigurationUnder Hostname, select manually and give your server a name like:CentOSVMClick Next
Firewall ConfigurationFor the purposes of this walk-through, no firewall is configured.
Select No firewall
Select Disabled on the "Enable SELinux" drop down list.
Click on Proceed when the "Warning - No Firewall" window appears.
Additional Language SupportAccept the default.
Click Next
Time Zone SelectionChoose the time settings that are appropriate for your area. Setting the system clock to UTC is usually a good practice for servers. To do so, click on System clock uses UTC.
Click Next
Set Root PasswordEnter a password for root, and enter it again to confirm.
(REMEMBER THIS PASSWORD!
Click Next
Package Group Selection: Select only the following:Desktops X Window System Gnome Desktop Environment
Applications Editors Graphical Internet
Servers
Server Configuration Tools
Web Server
Mail Server
Windows File Server
Development
Development Tools
X Software Development
GNOME Software Development
KDE Software Development
Compatibility Arch Development Support
Legacy Software Development
System
Administration Tools
System ToolsAdd thepackage 'sysstat' by clicking on the Details link and selecting "sysstat - The sar an iostat system monitoring commands." from the Optional Packages list.Printing Support
Compatibility Arch Support
Click Next
About to InstallClick Next
CongratulationsClick on Reboot
The system automatically reboots and presents a new welcome screen.Click Next.
License AgreementClick Next.
Date and TimeSet the Date and Time.
DisplaySelect Configure...Click on the triangle next to LCD Panel 1280x800Under Resolution
Click on OKSelect 1024x768 (as of this release 1280x800 doesn't show)Click Next
System UserCreate an account for yourself.
Do not create an account for Oracle at this time. Creating the Oracle account is covered later.
Click Next
Sound CardAccept Defaults
Click Next
Additional CDsClick Next
Finish SetupClick Next.
A graphical login screen appears.Log in as yourself
At this point you have CentOS installed under VMWare. WhooHoo! Stop celebrating, you’re not done. Get a beer. You should be looking at the X window desktop with “Applications / Actions” in a menu at the top of the screen.
If your CentOS is in a window (not full screen), you can hit “ctrl-cmd” to return to the Mac OS and hit the "Full Screen" icon at the top right corner of the VM window. To get out of full screen mode you can either enter:
ctrl-cmd-s
You can also, using Spaces, hit a ctrl-Arrow key to move to another Spaces Screen even if you are in Full Screen Mode (kinda cool). This is handy if you have other VM full screen windows on other screens.
To flip between windows within CentOS, hit option-tab instead of command-tab.
Step 3: Verify & Configure CentOS Installation
Check your kernel version by opening a terminal window (Ctrl-Click on desktop background, Select Open Terminal) and run the following command:
$ uname –r
Expected output:
$ 2.6.9-67.EL (or greater)
All of the packages required for Oracle should now be installed. Let’s verify this! In the same terminal window enter:
$ rpm -q binutils compat-db control-center gcc gcc-c++ glibc glibc-common \Check your output with the required package versions. They should be these (or later):
gnome-libs libstdc++ libstdc++-devel make pdksh sysstat \
xscreensaver libaio openmotif21
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
libaio-0.3.96
openmotif21-2.1.30-11.RHEL4.2
Step 4: Allocate a bunch of RAM to CentOS
You need to allocate more memory to CentOS for an Oracle installation (this is why I put in 4Gb or RAM). Here are the steps:
Exit Full Screen Mode
(Alt-Cmd)
Shut down CentOS(In the CentOS menu Actions, Log Out, Shutdown)
(If you see a VMWare window pop up saying you don’t have VMWare Tools installed, click the “Never Show this again” and click OK)
You should see a big play button where your CentOS used to be. That means it’s shut down.
In the WMWare Menu bar above your CentOS screen:Select the Settings IconSelect MemoryClick OK
Highlight the number and set the RAM to 1500Mb
Close VMWare
Open VMWare
Select Red Hat EnterpriseClick Run.
(FYI - At this point I got a popup saying I had a disk corruption within the virtual machine. It asked if I wanted to have VMWare repair the drive and I said ‘Yes’ and it quickly booted up – not sure what happened there!)
You should now be looking at the X window login screen. Stop!Step 5: Verify CentOS Configuration
Even though you’ve done everything as above, the true test is to look within the CentOS system to see what it sees and to verify that your system meets the minimum requirements for an Oracle database.
At the X window login screen:Log in as root
Open a terminal window(Ctrl-Click on desktop background, Select Open Terminal)
To check the amount of RAM and swap space available, enter the following:
$ egrep “MemTotal|SwapTotal” /proc/meminfo
Expected Output:
MemTotal: 1505600 kB
SwapTotal: 2048276 kB
The minimum RAM required is 1024MB, and the minimum required swap space is 1GB. Swap space should be twice the amount of RAM for systems with 2GB of RAM or less and between one and two times the amount of RAM for systems with more than 2GB. I chose 2GB here because I don’t expect to be running much into swap.
You also need 2.5GB of available disk space for the Oracle software and another 1.2GB for the database. The /tmp directory needs at least 400MB of free space. To check the available disk space on your system, run the following command:
$ df –h
Expected Output:
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 43G 3.5G 37G 9% /
/dev/sda1 99M 9.6M 85M 11% /boot
none 736M 0 736M 0% /dev/shm
/dev/hdc 2.5G 2.5G 0 100% /media/cdrecorder
The example shows that the /tmp directory does not have its own filesystem – that’s ok. (It's part of the root filesystem for this guide.) With 37 GB available, the root filesystem has enough space for the installation with lots of room left over for database files and examples.
Step 6: Create Oracle Account
Create Oracle groups and user account:
In the same terminal window as root do the following:$ /usr/sbin/groupadd oinstall
$ /usr/sbin/groupadd dba
$ /usr/sbin/useradd -m -g oinstall -G dba oracle
$ id oracleExpected output:
uid=501(Oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
Set the password for Oracle (write it down!):$ passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Step 7: Set Kernel Parameters
If you're following along and have just installed CentOS, the kernel parameters will all be at their default values. An easy way to set these values is to create a quick script in /tmp to set the parameters. Cut and paste the following commands while logged in as root into a script and run it:
cat >> /etc/sysctl.conf <<EOF
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=262144
net.core.wmem_max=262144
EOF
/sbin/sysctl –p
The output should be:
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
Next run the following commands as root to verify your settings:
/sbin/sysctl -a | egrep “shm|sem|file-max|ip_local_port_range| rmem_default|rmem_max|wmem_default|wmem_max”
The output should be:
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_max = 262144
vm..hugetlb_shm_group = 0
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.shmmax = 536870912
fs.file-max = 65536
Step 8: Create Directories
Now create directories to store the Oracle software and the database files (again as root in the same window):
mkdir -p /u01
mkdir -p /opt/oracle
mkdir –p /opt/oracle/product
chown -R oracle:oinstall /u01
chown -R oracle:oinstall /opt/oracle
chmod -R 775 /u01
chmod -R 775 /opt/oracle
chmod -R 775 /opt/oracle/product
Step 9: Set Shell Limits for Oracle User
An easy way to set these values is to create a quick script in /tmp. Cut and paste the following commands while logged in as root into a script and run it:
cat >> /etc/security/limits.conf <<EOF1
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF1
cat >> /etc/pam.d/login <<EOF2
session required /lib/security/pam_limits.so
EOF2
cat >> /etc/profile <<EOF3
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF3
cat >> /etc/csh.login <<EOF4
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF4
You should now have a CentOS install fully configured for use by Oracle! Relax, you’re still not done. Get another beer.
Step 10: Download Oracle
You can download Oracle for free if you create an account. Chances are you’ve been to this site before if you’re an Oracle DBA. Go to this site:
http://www.oracle.com/technology/software/index.html
Click on Oracle Database 11g
Accept the license Agreement
Click on the Linux x86-64
Save the zip file to /opt/oracle
After the download is complete, change ownership to oracle. In the terminal window, cd to /opt/oracle and run the following command:
$ chown oracle:oinstall linux.x64_11gR1_database.zip
Close your terminal window and any other windows and log out of root:
In the CentOS menu Actions, Log Out
This will take you to the Login screen
Step 11: Install Oracle
Log in as Oracle
Open a terminal window
ctrl-click on the desktop background, Open Terminal
Verify your display variable is set correctly
$ xclock
(A window with a clock in it should appear. Close it by clicking the ‘x’ in the upper right corner)
Unzip the file:
$ cd /opt/oracle
$ unzip linux.x64_11gR1_database.zip
Run the Installer:
$ cd database
$ ./runInstaller
A window should open titled “Oracle Database 11g Installation”
Highlight the Oracle Base Location and replace it with:
/opt/oracle/product
You’ll see that the oracle home location changes as you type to:
/opt/oracle/product/11.1.0/db_1
Change the UNIX DBA group from dba to oinstall
Make sure the “Create Starter Database” is selected. Change the database name to something meaningful like DEMO11.
Enter a new database password and confirm.
Click Next
An error OUI-10035 / OUI-10033 will pop up saying you do not have permission to write to the inventory location. This is because I’m not going totally OFA compliant and want to put the inventory in /opt/oracle/product. Click OK
The next window will ask you for an inventory location. Enter:
/opt/oracle/product/oraInventory
Leave the group name oinstall
A progress bar will appear at the top.
Product-Specific Prerequisite Checks
This is a cool feature. It will go through all the operating system checks for kernel parameters, swap space, packages, etc before installing anything. In my case, I got three warnings and one not executed message, others were succeeded. I looked through the tiny log window to see exactly what it was complaining about. Instead of going back in this documentation and fixing these I thought I would show how to fix the problems at this step as you may encounter similar situations.
1. Warning: “Checking Operating System Package Requirements”
Log file said I was missing:
elfutils-libelf-devel-0.97
I did a google search and found someone had the same problem when trying to install another tool set (snmp development). To fix this I did the following:
Open a new terminal window:
Ctrl-click on the desktop background
select Open Terminal
Change to root:
$ su –
Enter Password: (enter root password)
Run the following command:
$ yum install net-snmp-devel
You will be prompted for ok to download the 1.2Mb file – enter ‘y’
Next prompt is for the dependencies – enter ‘y’
Next is for a ok to accept a key – enter ‘y’
At the end it will say Complete!
Next I went back to the Oracle install window and clicked ‘Retry’. This time it found the package and passed! I probably could have just downloaded the one package by passing elfutils-devel instead of net-snmp-devel. The yum tool is pretty neat!
2. Warning: “Checking Kernel Parameters”
Log file said:
Checking for rmem_default = 4194304; rmem_default = 262144. Failed
Checking for rmem_max = 4194304; rmem_max = 262144. Failed
Going back to the setting kernel parameter section, I see I set that value earlier. No worries, the Linux kernel is cool in that you can set these without rebooting. Do, to fix this one I went back to the root window I had opened earlier and did the following:
Added the following in a script in /tmp and ran it:
cat >> /etc/sysctl.conf <<EOF
net.core.rmem_default=4194304
net.core.rmem_max=4194304
EOF
Again, after doing the above I clicked on the Oracle Install window and hit ‘Retry’ and this time the kernel parameter checks succeeded.
3. Warning: “Checking available swap space requirements”
Log file said:
Checking available swap space requirements ….
Expected Result: 2202Mb
Actual Result: 2000Mb
I remembered I set the swap to 2Gb arbitrarily even though they recommended 2 x RAM. Well, this is close enough for me, I’m not going to sweat over 202Mb of swap in a DBA Playground. So to fix this, I clicked on the status checkbox next to the Swap check and the status changed to “User Verified”. Moving on!
4. Not Executed: “Checking Network Configuration requirements”
This time the log file said:
Oracle supports installations on systems with DHCP-assigned IP addresses. However, the primary network interface on the system should be configured with a static IP address in order for the oracle software to function properly. See installation guide for more details on installing the software on systems configured with DHCP.
Ok, well, I in my opinion that’s not a big deal. This is a DBA Playground, not a server, and I’ll be shutting things down frequently. So again I clicked on the status checkbox next to the Network check and the status changed to “User Verified”. Let’s install!
Click Next
Oracle Configuration Manager Registration
Oracle Configuration Manager is a new thing Oracle provides that somewhat automates running an RDA when you open a trouble ticket on Metalink. Well, I’m not going to be opening any tickets on this system, so I DO NOT click “Enable Oracle Configuration Manager”. Let’s install!
Click Next
Summary Page
Ug, ok, one more page to verify what is to be installed. NOW let’s install!
Click Install
Installation Pages
The progress bar shows going through the Oracle binary installation and when complete opens another window for the creation of the sample database.
When it completes the database creation yet another window is opened saying the database creation is complete. It also states all accounts are locked except SYS, SYSTEM, DBSNMP and SYSMAN, and says to click on the Password Management button to unlock any accounts you may want to use. When I clicked on that a window popped up showing a bunch of accounts locked that I have no clue as to what they are. I click cancel and return to the previous window, as I can always unlock them later.
Click OK
Execute Configuration Scripts
You are returned to the installation window and before you know it another window pops up asking you to run 2 root scripts.
You must oblige:
Highlight the first script and hit cmd-c to copy it.
Go to the root terminal window and hit shift-cmd-v to paste it, and hit enter.
Go back to the config window, highlight the second script and do the same.
It will prompt you for the local bin directory. Accept the default of /usr/local/bin. It copies the oraenv, coraenv and dbhome scripts to that directory. It also creates the /etc/oratab file.
Return to the window asking you to run the root.sh scripts and click OK,
Final Page – End of Installation.
Here, hopefully, you will get a message saying the installation was successful. It also gives you the Enterprise Manager Database Control Web link. Cool! Copy that URL.
Click Exit
Now, finally, your have completed the installation of Oracle on CentOS under VMWare Fusion on a Macbook! Beer yourself again! Now let’s explore a bit. But before we do, NOW is a great time to take a snapshot of your installation. If you mess up your Oracle or CentOS configuration later (this is a DBA Playground, mind you) you can always get back to this spot.
Step 12: Take a VMWare Snapshot
Exit full screen
ctrl-cmd-s
Return to Mac OS X
ctrl-cmd
In the VMWare window bar click on the Take Snapshot icon. Wait until the spinning circle thingy at the bottom of the VMWare window stops (takes a few minutes!). You’ll notice a new icon will appear “Revert to Snapshot”.
Revert back to Full Screen
Click on the Full Screen icon at the top right of the VMWare window bar.
Explore
In CentOS open up a FireFox browser and use the URL you copied to connect to the DB Control console of your new database.
The first time you do you will get a “Website Certified by and Unknown Authority”
Click “Accept this certificate permanently” and click OK.
Another security warning, Click OK
The Enterprise Manager 11g Database Control login screen will pop up.
Log in as SYSMAN (remember the password you created? )
There you have DB Control for your new database! Explore and have fun.
Go back to your Oracle terminal window, the one you launched the installer from, and set your oracle environment:
$ . oraenv
<enter your SID>
Now do the normal check stuff – to a tnsping, sqlplus, etc.
Communicate from Mac OS to Cent OS
To get the IP address of your CentOS open a terminal window as oracle and enter:
$ /sbin/ifconfig
Look for the eth0 interface block, and under that the “inet addr:” The next number is your IP address. Use that IP address to log into dbconsole from the Mac OS using Safari:
https://<your CentOS IP address>:1158/em/console
Get the Oracle Client for Mac OS X
On your Mac using Safari go to this URL:
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/macsoft.html
Accept the License agreement
Download the Instant Client Package – Basic
(you will be prompted for the same userid / password you used to download oracle)
Download the Instant Client Package – SQL*Plus
Open a Finder window and under Applications create a new folder called Oracle_Client.
Move your 2 downloaded files into that directory (The Mac OS will have unzipped them into 2 folders).
Click the Columns list icon in Finder to show the directories in column format.
Select everything in each folder and move them up to the Oracle_Client directory.
Now delete the 2 empty folders under the Oracle_Client directory.
Open a terminal window in Mac OS X
Spotlight (the mag glass at the top right corner of your screen)
Type in:
Terminal
Select Terminal under Applications (it’s actually under Applications/Utilities if you want to drag it to the Dock).
In Terminal:
$ cd to /Applications/Oracle_Client
$ export DYLD_LIBRARY_PATH=/Applications/Oracle_Client
$ export TNS_ADMIN=/Applications/Oracle_Client
$ touch sqlnet.ora
$ vi tnsnames.ora
Enter the same tnsnames entry you find in the $ORACLE_HOME/network/admin/tnsnames.ora file in CentOS, except replace the host name with the IP address of CentOS.
Example:
DEMO11 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL=TCP)(HOST=<IP ADDRESS>)(PORT=1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = DEMO11)
)
)
Now log in:
$ ./sqlplus SYSMAN@DEMO11
Now you can connect from sqlplus on your Mac to your database in CentOS! You might want to put the steps of exporting the 2 environment variables and launching sqlplus into a single script like this:
cd to /Applications/Oracle_Client
export DYLD_LIBRARY_PATH=/Applications/Oracle_Client
export TNS_ADMIN=/Applications/Oracle_Client
./sqlplus SYSMAN@DEMO11
Maintenance
To shut down everything Oracle:
$ . oraenv
<enter your SID>
$ sqlplus “/ as sysdba”
SQL> shutdown immediate
SQL> exit
$ lsnrctl
LSNRCTL> stop
LSNRCTL> exit
$ cd $ORACLE_HOME/bin
./emctl stop dbconsole
To start up everything Oracle:
$ . oraenv
<enter your SID>
$ sqlplus “/ as sysdba”
SQL> startup
SQL> exit
$ lsnrctl
LSNRCTL> start
LSNRCTL> exit
$ cd $ORACLE_HOME/bin
./emctl start dbconsole
I hope you have enjoyed this as much as I did. With these steps you should be able to get things moving. Imagine if you had a Mac Pro with 8 cores and a good 8Gb of RAM! Do I hear Oracle RAC in separate CentOS sessions? Honey!
|
corpunk |
Latest page update: made by corpunk
, Feb 28 2008, 3:06 PM EST
(about this update
About This Update
view changes - complete history) |
|
Keyword tags:
CentOS
Mac OS
Macbook
Oracle 11g
VMWare Fusion
More Info: links to this page
|
| Started By | Thread Subject | Replies | Last Post | ||
|---|---|---|---|---|---|
| djt9000 | Extremely Helpful ! | 0 | Mar 15 2009, 2:37 PM EDT by djt9000 | ||
|
Thread started: Mar 15 2009, 2:37 PM EDT
Watch
Thanks for the walkthrough. I was able to install CentOS 5.2 and Oracle 11g on a dedicated partition on my MacBook using rEFIt. The whole process took most of the evening but a successful install was well worth it!
|
|||||
| clofresh | Post the VM Image? | 0 | Mar 30 2008, 4:38 PM EDT by clofresh | ||
|
Thread started: Mar 30 2008, 4:38 PM EDT
Watch
Hey, can you post your VM image somewhere?
6
out of
6 found this valuable.
Do you?
Keyword tags:
CentOS
Mac OS
Macbook
Oracle 11g
VMWare Fusion
|
|||||
Showing 2 of 2 threads for this page
|
|
Installing Oracle 11g on CentOS under VMWare on a Macbook.doc (Word Document - 168k)
posted by corpunk Feb 27 2008, 6:12 PM EST
Step by Step Guide
|


