Sunteți pe pagina 1din 4

Oracle Database 12c (12.1.0.2) on Solaris 11.

2
By Guduru

1) Solaris now has pre-req validation package, named oracle-rdbms-server-12-1-preinstall , like


we had on Linux check here:
http://docs.oracle.com/cd/E36784_01/html/E52463/makehtml-id-4.html

2) Solaris now has the ipadm command. Very helpful comparing to ifconfig.
Check here: http://docs.oracle.com/cd/E36784_01/html/E39134/gnice.html

3) Check current version:

root@gudurusolaris :~# cat /etc/release


Oracle Solaris 11.2 X86
Copyright (c) 1983, 2014, Oracle and/or its affiliates. All rights reserved.
Assembled 23 June 2014

4) Check your IP address:


root@gudurusolaris:~# ifconfig -a

5) Now, edit the /etc/hosts file and provide the HOSTNAME and IPADDRESS.
gudurusolaris 192.168.2.103

6) Edit (as root) /etc/ssh/sshd_config and change LoginGraceTime value:


LoginGraceTime 0

7) Restart the SSH service to load settings:


root@gudurusolaris:~# svcadm restart ssh

8) Set the following commands to configure system settings:


root@gudurusolaris:~# projadd -U oracle -K “project.max-shm-memory=(priv,4g,deny)”
user.oracle

9) To (as root) confirm that parameter has been changed you can view the contents of
project file
# cat /etc/project
system:0::::
user.root:1::::
noproject:2::::
default:3::::
group.staff:10::::
user.oracle:100::::project.max-shm- memory=(privileged,4294967296,deny)

10) Add the following lines in /etc/inittab, immediately before the “startd” entry.

tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_smallest_anon_port 9000 > /dev/console


tm::sysinit:/usr/sbin/ndd -set /dev/tcp tcp_largest_anon_port 65500 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_smallest_anon_port 9000 > /dev/console
tm::sysinit:/usr/sbin/ndd -set /dev/udp udp_largest_anon_port 65500 > /dev/console

11) Required Packages


Check if packages required for Oracle are installed, using below command
# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibC SUNWlibm SUNWlibms SUNWsprot SUNWtoo
SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt SUNWcsl

system SUNWarc Lint Libraries (usr)


system SUNWbtool CCS tools bundled with SunOS
system SUNWcsl Core Solaris, (Shared Libs)
system SUNWlibC Sun Workshop Compilers Bundled libC
system SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
ERROR: information for "SUNWhea" was not found
ERROR: information for "SUNWi1of" was not found

1|Page
Oracle Database 12c (12.1.0.2) on Solaris 11.2
By Guduru
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
ERROR: information for "SUNWxwfnt" was not found

> As we can see the last five packages are NOT installed. Install them, one by one.

a) # pkg install SUNWhea


Packages to install: 1
Create boot environment: No
Create backup boot environment: No

DOWNLOAD PKGS FILES XFER (MB) SPEED


Completed 1/1 1584/1584 3.2/3.2 74.8k/s

PHASE ITEMS
Installing new actions 1704/1704
Updating package state database Done
Updating image state Done
Creating fast lookup database Done

12) Create oracle user groups and directories and set appropriate permissions and environment.
# groupadd oper
# groupadd dba
# groupadd oinstall
# useradd -g dba -G oinstall -m oracle
# passwd oracle
# mkdir -p /u01/app/oracle/product/12.0.1/db_1
# chown -R oracle:oinstall /u01
# chmod -R 775 /u01

13) Add the following lines at the end of .profile of Oracle user.

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

# Select the appropriate ORACLE_BASE


ORACLE_HOSTNAME=VST-SOL-12C; export ORACLE_HOSTNAME
ORACLE_UNQNAME=CDB12C; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/12.0.1/db_1; export ORACLE_HOME
ORACLE_SID=CDB12C; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH

14) Use Xhost /Xclock/Xming - (Oracle R Enterprise enables users to generate R graphs at the database
server and return them in a variety of ways: an XML representation using base 64 encoding of the PNG
images, in a table with a BLOB column containing the PNG images, and interactively returning the actual
image to the R user at the client. This last case allows users to generate images at the database server
machine and have the actual PNG image display at the user’s client R engine)

15) Installing Oracle 12C


Now, let us start Oracle 12C database installation. Log in as Oracle user, navigate to directory where
installation media was extracted and run the runInstaller

$ ./runInstaller
GUI will be opened, below are the important details to fill out in respective windows
> Configure security updates --> skip
> Software updates --> skip
> Installation options --> Create & Configure Database
> system class --> server class
> Grid Installation options --> Single Instance database installation
> Install Type --> Typical
> Typical install
Oracle base --> /uo1/app/oracle (browse the path)
> Software location --> /uo1/app/oracle/product/12.0.1/db_1 (browse the path)
> storage type --> file system

2|Page
Oracle Database 12c (12.1.0.2) on Solaris 11.2
By Guduru
> database file location --> /u01/app/oracle/oradata (browse the path)
> database edition --> enterprise edition 5.9GB
> OSDBA group --> oinstall
> Global database name --> provide DB name
> administrative password --> provide password
> confirm password --> provide same password which was provided above
> create as container database ( check mark yes if you planned for multitenant DBs)
> Pluggable Database name --> Provide name of the pluggable DB
> Inventory directory --> /u01/app/orainventory (browse the path)
> OraInventory group name --> oinstall
> Prerequisites check --> system will check for the prerequisites & provide an update with
warnings, failed or pass. (please resolve all the failed reasons).
> Summary --> system will summarize global settings, inventory information & database
information which was provided
> Install Product --> System will perform preparation, copying files, link binaries & setup. OUI will
open a new window asking to run 2 scripts as root user
# /u01/app/oraInventory/orinst.sh

Changing permissions of /u01/app/oraInventory.


Adding read, write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.


The execution of the script is complete.

# /u01/app/oracle/product/12.0.1/db_1/root.sh

Performing root user operation for Oracle 12c

The following environment variables are set as:


ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/12.0.1/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:


Creating /usr/local/bin directory...
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.

--> upon completion of excuting both the scripts go back to OUI and click on OK
--> Finally, we will get to see another window named " Database Configuration Assistant" which
displays below information,
a) Global Database name
b) System Identifier
c) Server Parameter file & its location

16) Click Close to exit the Installer.

Oracle 12c Database Installation On Solaris is successful.!!!!

--> Post Installation

--> Check-> lsnrctl status


--> Check-> emctl status dbconsole

You now log into your database to confirm if database has been created and configured.

$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 2 13:01:01 2013

3|Page
Oracle Database 12c (12.1.0.2) on Solaris 11.2
By Guduru
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

SQL> select instance_name from v$instance;

INSTANCE_NAME
----------------
CDB12C

You can check which PDBs are configured and also you can log into PDB from within CDB as well.

SQL> select name,open_mode from v$pdbs;

NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
PDB1 READ WRITE

SQL> alter session set container=PDB1;

Session altered.

SQL> select file_name from dba_data_files;

FILE_NAME
-------------------------------------------------------------------------
/u01/app/oracle/oradata/CDB12C/PDB1/example01.dbf
/u01/app/oracle/oradata/CDB12C/PDB1/SAMPLE_SCHEMA_users01.dbf
/u01/app/oracle/oradata/CDB12C/PDB1/sysaux01.dbf
/u01/app/oracle/oradata/CDB12C/PDB1/system01.dbf

4|Page

S-ar putea să vă placă și