Sign in or 

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.
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.
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!
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!
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.
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.
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.
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
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.
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.
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
note: make sure there is no leading space after you have pasted this.
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
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
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.
marhar |
Latest page update: made by marhar
, Jul 25 2009, 5:15 AM EDT
(about this update
About This Update
fixed some straight quotes, added note about leading spaces
- marhar
16 words added 1 word deleted 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
|
|||||
|
|
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
|