Oracle 12c on Oracle Linux 6 – Step 24: Install the Oracle Database Software Only

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

24-01

Right-click the desktop and select Open in Terminal to open a new terminal window.

Note:

This will reset all environment variables back to what we set them in the .bashrc.

24-02

Type the following commands and press Enter after each one.

unset ORACLE_SID
cd /stage/12.1.0/database/
./runInstaller

24-03

Uncheck I wish to receive security updates via My Oracle Support and click Next.

24-04

Click Yes.

24-05

Choose Skip software updates and click Next.

24-06

Choose Install database software only and click Next.

Note:

Yep, the Create and configure a database wizards still don’t do what you want them to do, so we’ll be using dbca after we’ve installed the software.

24-07

Choose Single instance database installation and click Next.

24-08

Click Next.

24-09

Choose Enterprise Edition and click Next.

24-10

Confirm that Oracle base is /u01/app/oracle and Software location is /u01/app/oracle/product/12.1.0/dbhome_1. Click Next.

24-11

Choose dba for all dropdowns and click Next.

24-12

The installer verifies requirements.

24-13

Click Install.

24-14

The installer extracts files, links libraries and does the setup.

24-15

The install will progress for a while and then the above dialog will pop up.

Note that we need to run a script as root…

24-16

Right-click the desktop (you may have to minimize the terminal window you started the installer with) and select Open in Terminal.

24-17

Type the following command (note, there is a dash at the end of the line) and press Enter.

su -

Enter root at the Password prompt and press Enter.

Type the following commands and press Enter after each one.

cd /u01/app/oracle/product/12.1.0/dbhome_1
./root.sh

Press Enter at the Enter the full pathname… prompt.

Optionally type exit twice to close down the terminal window.

24-18

Click OK.

24-19

Click Close.

 


Oracle 12c on Oracle Linux 6 – Step 23: Create the FRA Disk Group

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

23-01

Open a terminal window (right-click the desktop and select Open Terminal).

Type the following command and press Enter.

. oraenv

At the ORACLE_SID = [ orcl] ? prompt type +ASM and press Enter.

Type the following command and press Enter.

asmca

Note:

. oraenv (period space oraenv, usually said dot space oraenv) is a command that sets your ORACLE_SID environment variable. If you run oraenv by itself (without the period and a space in front of it) then the command will run just fine. However, you’ll only set the ORACLE_SID for the duration of that single command. If you use the period space, then the change will persist for future commands.
You should get really used to typing . oraenv.

23-02

It may take a while for the ASM Configuration Assistant to appear. When it does click Create.

23-03

Enter FRA for the Disk Group Name, choose External (None) for Redundancy, check ASMDISK05 through ASMDISK08 and click OK.

Note:

We’re only choosing External (None) for Redundancy here so that our fast recovery area (FRA disk group) will be larger than our DATA disk group. Normally you’d want to stick with at least Normal redundancy for your FRA.

23-04

The disk group is created…

23-05

Click OK.

23-06

Click Exit.

23-07

Click Yes.

23-08

Type the following command and press Enter.

exit

 


Oracle 12c on Oracle Linux 6 – Step 22: Install Oracle Grid Infrastructure, Oracle Restart and ASM

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

22-01

Type the following commands, pressing Enter after each one.

cd /stage/12.1.0/grid/
./runInstaller

22-02
You’ll see some output from the script about Temp space, swap space and monitor checks. It may take a while for the next screen to pop up.

22-03

Choose Skip software updates and click Next.

22-04

Choose Install and Configure Oracle Grid Infrastructure for a Standalone Server and click Next.

22-05

Click Next.

22-06

Check the first 4 ASM disks, ORCL:ASMDISK01 through ORCL:ASMDISK04 and click Next.

Note:

If you are not using ASMLib on Oracle Linux during this step you’ll have to use the Change Discovery Path… button and navigate to /dev/oracleasm/disks/ to find your ASM disks.

22-07

Choose Use same passwords for these accounts, enter oracle_4U for both fields and click Next.

Note:

oracle_4U meets the password complexity requirements for the database, but it’s a bad password to use because it’s based on a dictionary word (oracle) and it’s used in the Oracle training material. It is an easy password to remember once you’ve typed it a few hundred times.

22-08

Choose dba from all three dropdowns and click Next.

22-09

Click Yes.

Note:

The value of using multiple groups for each of the potential roles is to allow for the possibility of separation of responsibilities. In large shops some personnel could be assigned to each of the different groups and would then only be able to perform certain ASM functions

22-10

Change Software location from /u01/app/oracle/product/12.1.0/dbhome_1 to /u01/app/oracle/product/12.1.0/grid as in the next screenshot.

22-11

Click Next.

22-12

Click Next.

22-13

Make sure that Automatically run configuration scripts is checked and Use ‘root’ user credentials is selected and type root in the password field. Click Next.

22-14

Prerequisite checks are run…

22-15

Check Ignore All if you get a memory error and click Next.

Note:

You shouldn’t get this error if you allocate a bit more than 4 GB of ram. I went with 6 GB of ram for the VM the 2nd time around and didn’t get this error. There is probably an amount of ram that is too small for you to be able to continue.

22-16

Click Yes.

22-17

Optional: Click Save Response File.

Note:

It’s never a bad idea to have a response file from your install as it contains all of your install information and it can be used for future installs. It’s a simple text file that can be updated with any text editor.

22-18

Optional: Click Save.

22-19

Click Install.

22-20

The grid infrastructure installs…

22-21

Click Yes.

22-22

Click Close.

 


Oracle 12c on Oracle Linux 6 – Step 21: Edit the oracle User’s .bash_profile and .bashrc

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

21-01

Right-click the desktop and select Open in Terminal.

21-02

Type the following commands, pressing Enter after each command.

cd
gedit .bash_profile

21-03

The previous command will open the oracle user’s existing .bash_profile script.

21-04

Add the lines below to the .bash_profile file.

#Oracle install specific environment settings
umask 022
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

Click Save and select File -> Quit to close gedit.

Note:

What about the old code block that we’ve seen for years in the .bash_profile that looked like this:

if [ $USER = “oracle” ]; then
 if [ $SHELL = “/bin/ksh” ]; then
 ulimit -p 16384
 ulimit -n 65536
 else
 ulimit -u 16384 -n 65536
 fi
fi

Our preinstall script actually sets the correct settings for the oracle user (it puts a file into /etc/security/limits.d/) and not only that, the ‘use this setting when you use ksh as your shell’ is actually wrong. The -p flag is a read only flag, you can’t actually set this.

21-05

Type the following command and press Enter.

gedit .bashrc

21-06

Enter the following lines in the .bashrc file.

alias sqlplus=’rlwrap sqlplus’
alias rman=’rlwrap rman’
alias asmcmd=’rlwrap asmcmd’
alias adrci=’rlwrap adrci’
alias impdp=’rlwrap impdp
alias expdp=’rlwrap expdp

Click Save and select File -> Quit. If you get a pop-up stating that the backup file couldn’t be created, just click Save Anyway.

Note:

rlwrap allows the up arrow key to return the previously entered command. By default the up arrow doesn’t work in Linux (and other Unix’s) which is very annoying. rlwrap removes that annoyance.

21-07

Type the following commands, pressing Enter after each one.

source .bash_profile
source .bashrc

Note:

Sourcing the files will read their values into your current environment.

 


Oracle 12c on Oracle Linux 6 – Step 20: Download and Extract Oracle Database 12c Grid Infrastructure

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

20-01

Click the Download button for Oracle Database 12c Release 1 Grid Infrastructure (12.1.0.1.0) for Linux x86_64 (Part 1 of 2).

20-02

Click OK to open the download with the Archive Manager.

20-03

Click Extract.

20-04

Again, navigate to the /stage/12.1.0 directory and click Extract.

Note:

See the steps in the previous step if you’ve forgotten how to use the extract dialog to navigate to the /stage/12.1.0 directory.

20-05

Once the extract is finished, click Quit.

20-06

Click the Download button for Oracle Database 12c Release 1 Grid Infrastructure (12.1.0.1.0) for Linux x86_64 (Part 2 of 2).

20-07

Click OK to open the download with the Archive Manager.

20-08

Click Extract.

20-09

Navigate to the /stage/12.1.0 directory and click Extract.

20-10

Once the extract is finished, click Quit.

 


Oracle 12c on Oracle Linux 6 – Step 19: Download and Extract Oracle Database 12c

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

19-01

Click the Firefox icon in the menu bar to open Firefox.

19-02

Go to http://edelivery.oracle.com and click Sign In / Register.

Note:

Make sure that you go to edelivery.oracle.com and not edelivery.oracle.com/linux.

19-03

Enter your Oracle.com username and password and click Sign In.

19-04

Check both agreement terms and click Continue.

19-05

Choose Oracle Database for Select a Product Pack and Linux x86-64 for Platform and click Go.

19-06

Click the Oracle Database 12c Release 1 (12.1.0.1.0) Media Pack for Linux x86-64 link.

19-07

Click the Download button for Oracle Database 12c Release 1 (12.1.0.1.0) for Linux x86_64 (Part 1 of 2).

19-08

Click OK to open the download with the Archive Manager.

19-09

Click Extract.

19-10

The Extract dialog will appear. Click the left arrow icon in the Archive Manager.

19-11

Click the File System Disk icon and then double-click the stage directory.

19-12

Double-click the 12.1.0 directory (not shown) and you’ll see the File System icon followed by the stage icon followed by the 12.1.0 icon (which will be grey as it’s the directory we’ll extract to).
Click Extract.

Note:

It’s important for these extracts that we put everything into the right directories. Make sure that you are extracting the Database and Grid downloads to the /stage/12.1.0 directory. Each download will add either a database directory or a grid directory.

19-13

The file extracts…

19-14

Once the extract is finished click Quit.

19-15

Click the Download button for Oracle Database 12c Release 1 (12.1.0.1.0) for Linux x86_64 (Part 2 of 2).

19-16

Click OK to open the download with the Archive Manager.

19-17

Click Extract.

19-18

The Extract dialog will appear. Click the left arrow icon in the Archive Manager.

19-19

Click the File System Disk icon and then select the stage directory as you did previously.

19-20

Double-click the 12.1.0 directory (not shown) and click Extract.

Note:

Make sure you stop at the 12.1.0 directory and don’t extract files into the database directory. The download already has a database directory in it and it will just add to the existing database directory. In short, make sure your extract location appears as above.

19-21

The file will extract. When the extract is finished, click Quit.

 


Oracle 12c on Oracle Linux 6 – Step 18: Reboot the System to Run the Latest Patched Kernel

Part of this series of posts: Oracle Database 12c on Oracle Linux 6

18-01

Note:

You don’t actually need to run the commands in the above screen shot.
Notice that uname –r has a different kernel version (…400.17.1) than the kernel in /usr/src/kernels (…400.209.1). We’ll have to reboot to get the new kernel loaded so that we can build the Oracle VirtualBox extensions on our system. This is a common problem that folks have when the install the VirtualBox guest extensions (one of our future steps). They don’t reboot the machine after updating the kernel and the guest extensions won’t compile correctly. There is a VERY good chance that your kernel version will be different from the one above.
Rebooting also makes sure that SELINUX is disabled (one of our earlier steps).

18-02

Select System -> Shut Down… from the menu.18-03

Click Restart.

Note:

You’ll see a lot of messages from the system as it goes down and then comes back up. Eventually you’ll see the below screen.

18-04

Click oracle.

18-05

Type oracle in the password field and click Log In.

Note:

Optionally jump ahead to Step 30 and then come back here if you want to do the rest of the install with a full screen guest.

 


Follow

Get every new post delivered to your Inbox.