Here to share my knowledge and day-to-day experiences with the technologies I work on.
Thursday, August 8, 2013
Increase VirtualBox Hard Disk (VDI) Size
1. Shutdown the VM for which you want to increase the hard disk size.
2. Make sure PATH environment variable has VirtualBox location included:
C:\Program Files\Oracle\VirtualBox
3. In the command prompt, cd to location of .vdi file for the virtual machine and execute below command (size is in MB):
VBoxManage modifyhd ocm1.vdi --resize 30720
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
This takes care of increasing size of vdi to 30GB.
http://www.turnkeylinux.org/blog/extending-lvm
Wednesday, August 7, 2013
Install Oracle Database 11g Enterprise Edition Release 11.2.0.3.0(32-bit)
Documentation for Oracle Database 11gR2: http://www.oracle.com/pls/db112/homepage
Database Quick Installation Guide for Linux x86
Database Installation Guide for Linux
We will directly jump to creating OS groups and user for Database software installation.
http://docs.oracle.com/cd/E11882_01/install.112/e24321/pre_install.htm#BABHHEJD
1. OCM1 VM was configured to use DHCP for IP and hostname. It was showing localhost.localdomain as hostname.
2. I changed hostname using system-config-network and updated hostname to ocm1.example.com
3. I left DHCP for IP address assignment.
4. Create below groups for database. I am not going to create ASM related groups yet.
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
5. Create software owner i.e. oracle user:
/usr/sbin/useradd -u 501 -g oinstall -G dba oracle
passwd oracle
6. Create Oracle Base Directory
as root:
# mkdir -p /u01/app/oracle
# chown -R oracle:oinstall /u01/app/oracle
# chmod -R 775 /u01/app/oracle
**added below lines because of INS-32031 and INS-32033… See details http://vishalorcl.blogspot.com/2013/09/ins-32031-ins-32033-while-installing.html
# mkdir –p /u01/app/oraInventory
# chown –R oracle:oinstall /u01/app/oraInventory
# chmod –R 775 /u01/app/oraInventory
7. Create software staging directory
as root:
# mkdir -p /sw
# chown -R oracle:oinstall /sw
# chmod -R 775 /sw
8. Login as oracle user and download “Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 (32-bit)”
11/10/11: Patch Set 11.2.0.3 for Linux, Solaris, Windows, AIX and HP-UX Itanium is now available on support.oracle.com. Note: it is a full installation (you do not need to download 11.2.0.1 first).
Download patchset 10404530
(****OLD*** I realize the initial disk allocation of 12GB would not be enough as 11.2.0.3 software itself is 6GB. I currently have 4.5 GB free, so I would have to increase the hard disk size to 30GB so that I dont have to increase it so often as I will have to create a database later. Follow Increase VirtualBox Hard Disk (VDI) size )
9. unzip all the files in the same folder
10. It will generate: client, database, deinstall, examples, gateways, grid
11. Go to database and start OUI using:
./runInstaller
Screenshots:
==> Fixed this (http://vishalorcl.blogspot.com/2013/09/ins-32031-ins-32033-while-installing.html )
==> Installed all these missing packages using “yum install <packagename>”
11.2.0.3 software install is complete.
Saturday, August 3, 2013
Export Virtual Appliance
Virtual Machine OCM1 will be exported as appliance so that I can import in future for creating another virtual machine and to avoid to do all the installation again.
-Shutdown the VM OCM1
File -> Export Appliance
Create Virtual Machine “OCM” & Install Linux Guest OS
Add two more virtual hard disks to ocm VM.
Similarly add ocmhd3. After adding ocmhd3, you will see:
Now add additional nework adapter: We will have 2 or more network adapters for each VM.
1) One with network mode of NAT
2)Another with network mode of Host-only Adapter
This is how it will look. Check storage and network.
Download OS ISO image from:
https://edelivery.oracle.com/linux
Select below as Exam environment suggests that the lab would be running Oracle Linux 5.4 32-bit.
V17793-01.zip will be downloaded. Extract it. It will extract below file:
Enterprise-R5-U4-Server-i386-dvd.iso
Click the CD icon and provide ISO image downloaded for Linux OS.
Then click “Start” for ocm.
Few more tasks:
1. Don’t forget to install guest additions for linux to make sure higher screen resolution is available as well as some other features. Follow http://vishalorcl.blogspot.com/2013/09/install-virtualbox-linux-guest.html
2. Install oracle-validated rpm using yum install oracle-validated. Check the output here::
When it is installed, the Oracle Pre-Install RPM or Oracle Validated RPM does the following:
-
Automatically downloads and installs any additional RPM packages needed for installing Oracle Grid Infrastructure and Oracle Database, and resolves any dependencies
-
Creates an
[root@ocm ~]# id oracleoracle
user, and creates the oraInventory (oinstall
) and OSDBA (dba
) groups for that user
uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba) context=root:system_r:unconfined_t:SystemLow-SystemHigh -
As needed, sets
sysctl.conf
settings, system startup parameters, and driver parameters to values based on recommendations from the Oracle RDBMS Pre-Install program -
Sets hard and soft resource limits
-
Sets other recommended parameters, depending on your kernel version
http://docs.oracle.com/cd/E11882_01/install.112/e47689/pre_install.htm#BABFBIDF
3. Modify /etc/hosts as shown below:
[root@ocm ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 ocm.vp.com ocm localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
[root@ocm ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.56.101 ocm.vp.com ocm
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
VM OCM is ready for use.