Hi, everyone.
1. Open your VM VirtualBox Manager, click “New” –> Type –> Linux, Version –> (Oracle 64-bit):
2. Select the total amount of memory that you want to use in your VM (Virtual Machine):
3. Choose option “Create a virtual hard drive now”:
4. Select “VDI (VirtualBox Disk Image):
5. Create a “Dynamically allocated” disk:
6. We will use this first disk to install and configure the Operating System, set the size to 100G:
7. Let’s edit some configurations: Settings –> Network –> enable adapter 1 as NAT, and enable adapter 2 as Host-only:
8. We will need add more disks to install the Oracle Database, in the next steps I will guide you how to add these disks (DATA, REDO and ARCHIVE).
In the settings of your VM (Virtual Machine), select the option: Storage –> Controller: SATA –> Add Hard Disk –> Create new disk:
Create this new disk as “Dynamic allocated” with 50GB of size, it will be the disk to use in the “DATA” diskgroup when we install and configure “Oracle Grid Infrastructure for a Standalone Server“.
Repeat the same step to add REDO (10GB) and ARCHIVE (20GB) disk, at the end you will have 4 hard disk in your VM:
9. Now it’s time to choose our image (.iso) to install our Operating System: OEL 6.7
PS:
This settings will enable us to connect to the VM from our physical machine.
You can download Oracle Linux from “Oracle Software Delivery Cloud“, for purpose of studies you don’t need to pay and you need to use a previous created account (It’s free to create if you don’t have one).
10. Starting VM select the first option “Install or upgrade an existing system“:
10.1 In the next step you will be prompt to select if you want to scan the media that was inserted on media player of VM “OK” or “Skip“, you don’t need to scan (It take a very long time to complete), because scan it will try to find some physical problem on media and we are using a disc image (.iso):
10.2 Welcome to Oracle Linux installation steps: Next –>
10.3 Select the language that you want to use during the installation process, then: Next –>
10.4 Select your keyboard layout:
10.5 We will not use SAN (Storage Area Network), it will be a simple hard disk (SATA), select “Basic Storage Devices“:
10.6 It will appear a warning message about clear your device and loose some data if there is some: “Yes, discard any data“:
10.7 Set a Hostname –> Configure Network –> Edit eth0 device –> “Check box” –> Connect automatically –> Set “Automatic DHCP“:
10.8 Edit settings of eth1 device, Configure Network –> Select eth1 device –> Edit –> Check box “Connect automatically” –> Set “Manual” IP –> Next:
10.9 Select your territory/Time Zone, check box “Sytem clock uses UTC” if you are gonna use “Coordinated Universal Time“, Next:
10.10 Set up a root password:
10.11 In the next step select “Create Custom Layout“, this option will enable us to create the file systems and edit the partitions of disks:
10.12 Select the first disk (/dev/sda), we will create and configure some partitions:
- /boot (200MB) —–> Non LVM
- Swap (7GB) —–> LVM
- /opt/oracle (30GB) —–> LVM
- /backup (30GB) —–> LVM
- / (10GB) —–> LVM
- We will leave some free space to resize some file system in the volume group if need it in the future.
Select /dev/sda, Create –> Standard Partition, “Allowable Drives” keep just sda selected, ext4 partition type, size 200MB, Fixed size –> check “Force to be a primary partition“:
10.13 Select the “Free” space of /dev/sda disk, now create “LVM Physical Volume“, again keep just sda disk selected, select “Fill to maximum allowable size“.
We will use the entire disk to create this volume group and create each partition:
10.14 Click “Add“, select “swap” on “File System Type” menu list to create a Swap partition, 6GB size, I prefer to give a custom name to identify easily each lvm partition (lv_swap, lv_ora_bin, lv_root, lv_backup…), repeat this process to every partition that you wish create, but in the next partitions the “File System Type” it will be ext4 format:
10.15 At the end you will have the follow “Custom Partitions“: Next –>
11. Now it’s time to perform the last configurations, selecting “Basic Server” –> “Customize now” –> Next –> “Servers” –> check “System administration tools” –> “Optional packages” –> Select “oracle-rdbms-server-12cR1-preinstall-1.0- 14.el6.x86_64” and “oracleasm-support-2.1.8-1.el6.x86-64” –> Close –> Next:
11.1 Initializing the Operating System, you can choose one of two options of the kernel to startup your system. Select the first one “Oracle Linux Server Unbreakable Enterprise kernel”, to understand a little bit of unbreakable kernel check this link: “Unbreakable Enterprise Kernel Release 3“.
12. We will start prepare our system to receive an Oracle Database installation, access the system using root user.
Let’s perform some basic configuration on the Operating System:
- Edit file /etc/ssh/sshd_config –> uncomment line “#UseDNS yes” and change to “UseDNS no“
- In the same file search for “GSSAPIAuthentication yes“, comment this line and uncomment “#GSSAPIAuthentication no“
- Restart SSH service: service sshd restart
- Disable Iptables firewall: service iptables stop and chkconfig iptables off
- Edit file /etc/selinux/config –> change “SELINUX=enforcing” to “SELINUX=disabled“
- Change oracle user password in the Operating System: passwd oracle
- Change owner of the /opt/oracle and /backup mount points: chown -R oracle:oinstall /opt/oracle, chown -R oracle:oinstall /backup
- Edit file /etc/fstab, change “tmpfs” entry line as below:
tmpfs /dev/shm tmpfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,size=6G 0 0
- After editing /etc/fstab, execute: mount -o remount tmpfs
The image below illustrates how your initial file systems and mount points should look like:
12.1 We need to add our “Host-only” IP in the file /etc/hosts, but in a production environment this step isn’t necessary because we should use DNS (Domain Name System) to name resolution.
Check below how it should look like:
13. Now we will create the Udev rules to configure owner and permissions on each disk to use in the next post to configure Oracle ASM: /dev/sdb1, /dev/sdc1 and /dev/sdd1:
13.1 Create a new file: vi /etc/udev/rules.d/99-oracle.rules with the following contents:
- KERNEL==”sdb1″, OWNER==”oracle”, GROUP==”oinstall”, MODE==”0660″
- KERNEL==”sdc1″, OWNER==”oracle”, GROUP==”oinstall”, MODE==”0660″
- KERNEL==”sdd1″, OWNER==”oracle”, GROUP==”oinstall”, MODE==”0660″
The “KERNEL” parameter indicates which device you want to set up the rules, “OWNER” parameter indicates who it will be the owner of this device and “MODE” parameter indicates which permissions this device it will have.
Now we will create a new table partition, repeat this process on each disk:
13.2 To check if our rules were successfully applied: ls -l /dev | grep -i ora
You should see each new table partition with the right owner, group and permissions, these permissions are persistent. Even if the Operating System reboot, after startup the system, these rules it will be right:
See you in the next post!