Oracle Database のインストール前の作業を行う
-bash-3.00# groupadd -g 501 oinstall
-bash-3.00# groupadd -g 502 dba
-bash-3.00# groupadd -g 503 oper
-bash-3.00# useradd -u 501 -g oinstall -G dba,oper -s /usr/bin/bash -d /home/oracle oracle
-bash-3.00# passwd oracle
-bash-3.00# mkdir /home/oracle
-bash-3.00# chown -R oracle:oinstall /home/oracle
-bash-3.00# mkdir -p /u01/app/oracle
-bash-3.00# chown oracle:oinstall /u01/app/oracle
-bash-3.00# mkdir /u01/app/oraInventory
-bash-3.00# chown oracle:oinstall /u01/app/oraInventory
-bash-3.00$ mkdir -p /u01/app/oracle/oradata/orcl
-bash-3.00# isainfo -kv
64-bit amd64 kernel modules
-bash-3.00# who -r
. run-level 3 Jan 19 11:06 3 0 S
-bash-3.00# /etc/prtconf | grep Memory
Memory size: 1280 Megabyte
-bash-3.00# sar -r 2 5
SunOS solaris101 5.10 Generic_142910-17 i86pc 01/19/2011
13:57:42 freemem freeswap
13:57:44 225711 2553952
13:57:46 225707 2553952
13:57:48 225707 2553952
13:57:50 225707 2553952
13:57:52 225707 2553952
Average 225708 2553952
-
- 以下の表に示す使用可能なRAMの倍数と同等のスワップ領域が使用可能であることを確認する。
使用可能なRAM |
必要なスワップ領域 |
1.5GBから2GB |
RAMサイズの1.5倍 |
2GBから16GB |
RAMサイズと同等 |
16GBを超える |
16GB |
-bash-3.00# /usr/sbin/swap -l
swapfile dev swaplo blocks free
/dev/dsk/c0t0d0s1 30,1 8 1076344 1076344
-
- /tmpディレクトリに1GBの空き領域が存在することを確認する。
-bash-3.00# df -h /tmp
Filesystem size used avail capacity Mounted on
swap 988M 168K 988M 1% /tmp
-bash-3.00# df -h
Filesystem size used avail capacity Mounted on
/dev/dsk/c0t0d0s0 6.9G 3.5G 3.3G 53% /
/devices 0K 0K 0K 0% /devices
ctfs 0K 0K 0K 0% /system/contract
proc 0K 0K 0K 0% /proc
mnttab 0K 0K 0K 0% /etc/mnttab
swap 989M 972K 988M 1% /etc/svc/volatile
objfs 0K 0K 0K 0% /system/object
sharefs 0K 0K 0K 0% /etc/dfs/sharetab
/usr/lib/libc/libc_hwcap1.so.1
6.9G 3.5G 3.3G 53% /lib/libc.so.1
fd 0K 0K 0K 0% /dev/fd
swap 988M 168K 988M 1% /tmp
swap 988M 32K 988M 1% /var/run
/dev/dsk/c0t0d0s7 32G 32M 32G 1% /export/home
-
- OSがSolaris 10 U6(5.10-2008.10)以上のバージョンであることを確認する。
-bash-3.00# uname -r
5.10
-bash-3.00# cat /etc/release
Oracle Solaris 10 9/10 s10x_u9wos_14a X86
Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
Assembled 11 August 2010
-
- 必要なパッケージがインストールされていることを確認する。
-bash-3.00# 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 SUNWhea SunOS Header Files
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
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
system SUNWxwfnt X Window System platform required fonts
ERROR: information for "SUNWi1cs" was not found
ERROR: information for "SUNWi15cs" was not found
-
- パッケージをインストールする。
- [デバイス]-[CD/DVDデバイス]で「sol-10-u9-ga-x86-dvd.iso」を選択する。
-bash-3.00# iostat -En
c0t0d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: ATA Product: VBOX HARDDISK Revision: 1.0 Serial No:
Size: 32.21GB <32212254208 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 16 Predictive Failure Analysis: 0
c0t1d0 Soft Errors: 0 Hard Errors: 0 Transport Errors: 0
Vendor: VBOX Product: CD-ROM Revision: 1.0 Serial No:
Size: 0.00GB <0 bytes>
Media Error: 0 Device Not Ready: 0 No Device: 0 Recoverable: 0
Illegal Request: 2 Predictive Failure Analysis: 0
-bash-3.00# mkdir /cdrom
-bash-3.00# mount -F hsfs -o ro /dev/dsk/c0t1d0s0 /cdrom
-bash-3.00# pkgadd -d /cdrom/Solaris_10/Product/
The following packages are available:
1 BRCMbnx Broadcom NetXtreme II Gigabit Ethernet Adapter Driver
(i386) 11.10.0,REV=2007.06.20.13.12
2 BRCMbnxe Broadcom NetXtreme II 10GbE NIC Driver
(i386) 11.10.0,REV=2010.07.14.14.54
3 CADP160 Adaptec Ultra160 SCSI Host Adapter Driver
(i386) 1.21,REV=2005.01.17.23.31
4 CPQary3 HP Smart Array HBA Driver 2.2.0.1
(i386) 11.10.0,REV=2010.07.14.14.54
5 HPFC Agilent Fibre Channel HBA Driver
(i386) 1.1.0,REV=2005.01.06.07.16
6 IPLTadcon Administration Server Console
(i386) 5.1,REV=2002.03.01.12.28
7 IPLTadman Administration Server Documentation
(i386) 5.1,REV=2002.03.01.12.28
8 IPLTadmin Administration Server
(i386) 5.1,REV=2002.03.01.12.29
9 IPLTcadcon Administration Server Console Simplified Chinese Localization
(i386) 9.0,REV=2002.03.14.13.49
10 IPLTcadman Administration Server Documentation Simplified Chinese Localization
(i386) 9.0,REV=2002.03.21.16.48
... 1898 more menu choices to follow;
<RETURN> for more choices, <CTRL-D> to stop display:
...
(i386) 3.6,REV=2004.08.12.10.21
908 SUNWi1cs X11 ISO8859-1 Codeset Support
(i386) 2.0,REV=2004.10.17.15.04
...
<RETURN> for more choices, <CTRL-D> to stop display:^D
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: 906, 908
...
Do you want to continue with the installation of <SUNWi15cs> [y,n,?] y
...
Do you want to continue with the installation of <SUNWi1cs> [y,n,?] y
...
Installing X11 ISO8859-15 Codeset Support as <SUNWi15cs>
1460 blocks
Installation of <SUNWi15cs> was successful.
-bash-3.00
system SUNWarc Lint Libraries (usr)
system SUNWbtool CCS tools bundled with SunOS
system SUNWcsl Core Solaris, (Shared Libs)
system SUNWhea SunOS Header Files
system SUNWi15cs X11 ISO8859-15 Codeset Support
system SUNWi1cs X11 ISO8859-1 Codeset Support
system SUNWi1of ISO-8859-1 (Latin-1) Optional Fonts
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
system SUNWxwfnt X Window System platform required fonts
-bash-3.00# projadd user.oracle
-bash-3.00# projmod -a -K 'project.max-sem-ids=(privileged,100,deny)' user.oracle
-bash-3.00# projmod -a -K 'process.max-sem-nsems=(privileged,256,deny)' user.oracle
-bash-3.00# projmod -a -K 'project.max-shm-memory=(privileged,4294967295,deny)' user.oracle
-bash-3.00# projmod -a -K 'project.max-shm-ids=(privileged,100,deny)' user.oracle
-bash-3.00# projmod -a -K "process.max-file-descriptor=(priv,65536,deny)" user.oracle
-bash-3.00# projects -l user.oracle
user.oracle
projid : 100
comment: ""
users : (none)
groups : (none)
attribs: process.max-file-descriptor=(priv,65536,deny)
process.max-sem-nsems=(privileged,256,deny)
project.max-sem-ids=(privileged,100,deny)
project.max-shm-ids=(privileged,100,deny)
project.max-shm-memory=(privileged,4294967295,deny)
-bash-3.00# su - oracle
-bash-3.00$ prctl -n project.max-sem-ids -i project user.oracle
project: 100: user.oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-sem-ids
privileged 100 - deny -
system 16.8M max deny -
-bash-3.00$ prctl -n process.max-sem-nsems $$
process: 1950: -bash
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
process.max-sem-nsems
privileged 256 - deny -
system 32.8K max deny -
-bash-3.00$ prctl -n project.max-shm-memory -i project user.oracle
project: 100: user.oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 4.00GB - deny -
system 16.0EB max deny -
-bash-3.00$ prctl -n project.max-shm-ids -i project user.oracle
project: 100: user.oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-ids
privileged 100 - deny -
system 16.8M max deny -
Oracle Database をインストールする
-bash-3.00$ cd /u01/software/oracle11.2.0.2_solaris_x86_64
-bash-3.00$ ls|xargs -n1 unzip
-bash-3.00$ export LANG=C
-bash-3.00$ export NLS_LANG=American_America.AL32UTF8
-bash-3.00$ export ORACLE_BASE=/u01/app/oracle
-bash-3.00$ export ORACLE_SID=orcl
-bash-3.00$ cd database
-bash-3.00$ ./runInstaller
- Oracle Universal Installer のウイザードに従ってインストールする。
- Configure Security Updates
- Email: 入力しない
- I wish to receive security updates via My Oracle Support: チェックしない
- Download Software Updates: Skip software updates
- Installation Option: Install database software only
- Grid Installation Options: Single instance database installation
- Product Languages: English, Japanese
- Database Edition: Enterprise Edition
- Select Options: Select All
Oracle Partitioning: チェックする
Oracle OLAP: チェックする
Oracle Label Security: チェックする
Oracle Data Mining RDBMS Files: チェックする
Oracle Database Vault option: チェックする
Oracle Real Application Testing: チェックする
-
- Installation Location
- Create Inventory
- Inventory Directory: /u01/app/oraInventory
- oraInventory Group Name: oinstall
- Operating System Groups
- Database Administrator(OSDBA) Group: dba
- Database Operator (OSOPER) Group (Optional): oper
- root ユーザで orainstRoot.sh を実行する。
-bash-3.00# /u01/app/oraInventory/orainstRoot.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.
-bash-3.00# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0/dbhome_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.
Finished product-specific root actions.