Oracle adalah product database yang terkenal didunia, mempunyai banyak customer, dan memiliki feature lengkap sebagai sebuah database. Sedangkan Solaris 10 adalah sebuah Sistem operasi yang juga terkenal handal, stabil, dan mempunyai basis user yang besar. Gabungan keduanya akan menghasilkan sebuah server yang handal, dengan performance yang tinggi.
Artikel ini akan membahas instalasi Oracle 10g pada Solaris 10 x86(bisa digunakan untuk pada solaris sparc).
Oracle 10 memerlukan :
- RAM 1GB (terutama berpengaruh pada saat database configuration)
- CPU 3 GHz
- space: 20GB (tidak perlu sebanyak ini)
- minimal space untuk /tmp: 512MB (oracle akan memeriksa parameter ini)
Tahap-tahap Instalasi:
=============
Oracle is a popular database product in the world, has many customers, and have complete feature as a database. While Solaris 10 is an operating system that also famous for reliable, stable, and has a large user base. Combined they will produce a reliable server, with high performance.
This article will discuss the installation of Oracle 10g on Solaris 10 x86 (can use in solaris sparc)
This article will discuss the installation of Oracle 10g on Solaris 10 x86 (can use in solaris sparc)
Oracle 10 requires:
- 1GB of RAM (especially influential at the time of the database configuration)
- CPU 3 GHz
- Space: 20GB (not necessarily this much)
- A minimum of space for / tmp: 512 (oracle will check this parameter)
Stages of Installation:
1. Download Oracle dari www.oracle.com.
Download oracle 10g for Solaris x86. Setelah selesai, extract Oracle installer ke harddisk, check type x86 or sparc
Download Oracle 10g for Solaris x86. Once completed, extract the Oracle installer to the hard drive , check type x86 or sparc
root@solaris-teguh # uname -a
SunOS 5620sam-application02 5.10 Generic_139556-08 i86pc i386 i86pc
root@solaris-teguh # showrev
Hostname: root@solaris-teguh
Hostid: 22bbcc6655
Release: 5.10
Kernel architecture: i86pc
Application architecture: i386
Hardware provider:
Domain:
Kernel version: SunOS 5.10 Generic_139556-08
root@solaris-teguh #
root@solaris-teguh #unzip 10202_database_solx86.zip
root@solaris-teguh # gunzip < ora10_sol10.tar.gz | tar -xvf -
SunOS 5620sam-application02 5.10 Generic_139556-08 i86pc i386 i86pc
root@solaris-teguh # showrev
Hostname: root@solaris-teguh
Hostid: 22bbcc6655
Release: 5.10
Kernel architecture: i86pc
Application architecture: i386
Hardware provider:
Domain:
Kernel version: SunOS 5.10 Generic_139556-08
root@solaris-teguh #
root@solaris-teguh #unzip 10202_database_solx86.zip
root@solaris-teguh # gunzip < ora10_sol10.tar.gz | tar -xvf -
ORACLE_BASE=/export/home/oracle;
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
ORACLE_SID=TGH;
2. Check Solaris packages and install
Oracle memerlukan beberapa paket untuk instalasinya. Paket2 ini dapat anda temukan pada DVD
instalasi Solaris. Masuk ke dalam directory tempat package Solaris dan jalankan command dari sana.
Ketik command berikut untuk mengecek paket yang diperlukan:
===============
Oracle requires some packages for installation. Paket2 this can be found on DVD, Solaris installation. Go to the directory where the Solaris package and run the command from there.
Type the following command to check the package required:
==================
# pkginfo -i SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt
SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm
SUNWsprot SUNWuiu8
Untuk menginstall paket:
# pkgadd -d . SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt
SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm
SUNWsprot SUNWuiu8
example result
root@solaris-teguh #pkginfo SUNWlibms SUNWtoo SUNWi1cs SUNWi15cs SUNWxwfnt SUNWxwplt SUNWmfrun SUNWxwplr SUNWxwdv SUNWgcc SUNWbtool SUNWi1of SUNWhea SUNWlibm SUNWsprot SUNWuiu8
system SUNWbtool CCS tools bundled with SunOS
system SUNWgcc gcc - The GNU C compiler
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 SUNWlibm Math & Microtasking Library Headers & Lint Files (Usr)
system SUNWlibms Math & Microtasking Libraries (Usr)
system SUNWmfrun Motif RunTime Kit
system SUNWsprot Solaris Bundled tools
system SUNWtoo Programming Tools
system SUNWuiu8 Iconv modules for UTF-8 Locale
system SUNWxwdv X Windows System Window Drivers
system SUNWxwfnt X Window System platform required fonts
system SUNWxwplr X Window System platform software configuration
system SUNWxwplt X Window System platform software
root@solaris-teguh #
3. Persiapkan Group, User, serta permission untuk instalasi (Prepare Group, User, and permissions for installation)
Create Group
Buat group untuk instalasi: / Create a group for installation:
root@solaris-teguh #cd /export/
root@solaris-teguh #ls
root@solaris-teguh #mkdir home
root@solaris-teguh #cd home/
root@solaris-teguh #mkdir oracle
root@solaris-teguh #cd ..
root@solaris-teguh #pwd
/export
root@solaris-teguh #ls
home
root@solaris-teguh #
root@solaris-teguh #cd /export/home/oracle/
root@solaris-teguh #pwd
/export/home/oracle
root@solaris-teguh #
root@solaris-teguh #groupadd oinstall
root@solaris-teguh #groupadd dba
root@solaris-teguh #
Create user
useradd -d /export/home/oracle -g dba -G oinstall -m -s /usr/bin/bash oracle
or
useradd -g oinstall -G dba -d /export/home/oracle oracle
example result
root@solaris-teguh #useradd -g oinstall -G dba -d /export/home/oracle oracle
root@solaris-teguh #
Setting owner & permission dari home directory user oracle
root@solaris-teguh #chown -R oracle:dba /export/home/oracle
root@solaris-teguh #cd /export/home/
root@solaris-teguh #ls -l
total 2
drwxr-xr-x 2 oracle dba 512 Aug 16 11:08 oracle
================or you can using command
root@solaris-teguh #mkdir /export/home
root@solaris-teguh #mkdir /export/home/oracle
root@solaris-teguh #cd /export/home/oracle/
root@solaris-teguh #groupadd oinstall
root@solaris-teguh #groupadd dba
root@solaris-teguh #useradd -d /export/home/oracle -g dba -G oinstall -m -s /usr/bin/bash oracle
root@solaris-teguh #chown -R oracle:dba /export/home/oracle
root@solaris-teguh #
==========================creata password oracle
root@solaris-teguh #cd oracle/
root@solaris-teguh #ls -l
total 0
root@solaris-teguh #
root@solaris-teguh #passwd oracle
New Password:
Re-enter new Password:
passwd: password successfully changed for oracle
root@solaris-teguh #
4. Setting parameter system, dan restart agar dapat digunakan oleh system
Edit file /etc/system, dan tambahkan entries berikut:
Setting system parameters, and restart in order to be used by system
Edit the file / etc / system, and add the following entries:
example result
root@solaris-teguh #id
uid=0(root) gid=0(root)
root@solaris-teguh #vi /etc/sys
sysdef sysevent/ syslog.conf syslog.pid system
root@solaris-teguh #vi /etc/system
"/etc/system" 78 lines, 1883 characters
*ident "@(#)system 1.18 97/06/27 SMI" /* SVR4 1.5 */
*
* SYSTEM SPECIFICATION FILE
*
* moddir:
*
* Set the search path for modules. This has a format similar to the
* csh path variable. If the module isn't found in the first directory
* it tries the second and so on. The default is /kernel /usr/kernel
*
* Example:
* moddir: /kernel /usr/kernel /other/modules
* root device and root filesystem configuration:
*
* The following may be used to override the defaults provided by
* the boot program:
*
* rootfs: Set the filesystem type of the root.
*
* rootdev: Set the root device. This should be a fully
* expanded physical pathname. The default is the
* physical pathname of the device where the boot
* program resides. The physical pathname is
* highly platform and configuration dependent.
*
* Example:
* rootfs:ufs
* rootdev:/sbus@1,f8000000/esp@0,800000/sd@3,0:a
*
* (Swap device configuration should be specified in /etc/vfstab.)
* exclude:
*
* Modules appearing in the moddir path which are NOT to be loaded,
* even if referenced. Note that `exclude' accepts either a module name,
* or a filename which includes the directory.
*
* Examples:
* exclude: win
* exclude: sys/shmsys
* forceload:
*
* Cause these modules to be loaded at boot time, (just before mounting
* the root filesystem) rather than at first reference. Note that
* forceload expects a filename which includes the directory. Also
* note that loading a module does not necessarily imply that it will
* be installed.
*
* Example:
* forceload: drv/foo
* set:
*
* Set an integer variable in the kernel or a module to a new value.
* This facility should be used with caution. See system(4).
*
* Examples:
*
* To set variables in 'unix':
*
* set nautopush=32
* set maxusers=40
*
* To set a variable named 'debug' in the module named 'test_module'
*
* set test_module:debug = 0x13
set noexec_user_stack=1
set semsys:seminfo_semmni=100
set semsys:seminfo_semmns=1024
set semsys:seminfo_semmsl=256
set semsys:seminfo_semvmx=32767
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmin=1
set shmsys:shminfo_shmmni=100
set shmsys:shminfo_shmseg=10
"/etc/system" 86 lines, 2153 characters
root@solaris-teguh #
restart mesin
untuk restart:
root@solaris-teguh #shutdown -i6 -g0 -y
Shutdown started. Tue Aug 16 11:28:01 WIT 2011
Changing to init state 6 - please wait
Cannot send to device dtremote because it's not a tty
Broadcast Message from root (pts/6) on solaris-teguh Tue Aug 16 11:28:02...
THE SYSTEM solaris-teguh IS BEING SHUT DOWN NOW ! ! !
Log off now or risk your files being damaged
updating /platform/i86pc/boot_archive
=============or you can
root@solaris-teguh #init 6
updating /platform/i86pc/boot_archive
===========5. Setting environment untuk user oracle. Gunakan user oracle untuk keperluan ini.
Ganti user:
Setting environment for oracle user. Use the oracle user for these purposes.
Replace user:
# su – oracle
Edit file /export/home/oracle.profile, and add entry:root@solaris-teguh #pwd
/export/home/oracle root@solaris-teguh #id
uid=0(root) gid=0(root)
root@solaris-teguh #su oracle
root@solaris-teguh #bash
root@solaris-teguh #id
uid=100(oracle) gid=101(dba)
root@solaris-teguh #vi .profile
".profile" [New file]
#Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
# Select the appropriate ORACLE_BASE
#ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TGH; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
~
~
~
~
".profile" [New file] 11 lines, 349 characters
root@solaris-teguh #
check profile
root@solaris-teguh #more .profile
#Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
# Select the appropriate ORACLE_BASE
#ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_BASE=/export/home/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TGH; export ORACLE_SID
PATH=$ORACLE_HOME/bin:$PATH; export PATH
root@solaris-teguh #
Install Oracle and database
root@solaris-teguh #bash
root@solaris-teguh #cd /data/database/
root@solaris-teguh #id
uid=0(root) gid=0(root)
root@solaris-teguh #su oracle
root@solaris-teguh #id
uid=100(oracle) gid=100(oinstall)
root@solaris-teguh #bash
root@solaris-teguh #./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be 5.10. Actual 5.10
Passed
Checking Temp space: must be greater than 250 MB. Actual 1047 MB Passed
Checking swap space: must be greater than 500 MB. Actual 1609 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-08-16_12-04-35PM. Please wait ...
Capture Will posting later or you can visite
http://fakta-dan-unik.blogspot.com/windows
root@solaris-teguh #Oracle Universal Installer, Version 10.2.0.2.0 Production
Copyright (C) 1999, 2006, Oracle. All rights reserved.
root@solaris-teguh #
go to root
root@solaris-teguh #
root@solaris-teguh #/export/home/oracle/oraInventory/orainstRoot.sh
Changing permissions of /export/home/oracle/oraInventory to 770.
Changing groupname of /export/home/oracle/oraInventory to dba.
The execution of the script is complete
root@solaris-teguh #/export/home/oracle/product/10.2.0/db_1/root.sh
Running Oracle 10g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /export/home/oracle/product/10.2.0/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.sh script.
Now product-specific root actions will be performed.
root@solaris-teguh #
root@solaris-teguh #
8. Buat script untuk menjalankan Oracle ketika booting
Buat file /etc/init.d/oracle, dan tambahkan entry berikut:
root@solaris-teguh #cd /etc/init.d/
root@solaris-teguh #vi oracle
"oracle" [New file]
#!/bin/sh
ORACLE_HOME=/export/home/oracle/product/10.2.0/db_1
ORACLE_OWNER=oracle
if [ ! -f $ORACLE_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl start"
;;
'stop')
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_OWNER -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
;;
esac
~
~
~
~
~
"oracle" [New file] 18 lines, 441 characters
root@solaris-teguh #
root@solaris-teguh #ls -l oracle
-rw-r--r-- 1 root root 441 Aug 16 12:41 oracle
root@solaris-teguh #chmod 775 oracle
root@solaris-teguh #ls -l oracle
-rwxrwxr-x 1 root root 441 Aug 16 12:41 oracle
root@solaris-teguh #
root@solaris-teguh #
root@solaris-teguh #ln -s /etc/init.d/oracle /etc/rc3.d/S99oracle
root@solaris-teguh #
root@solaris-teguh #su - oracle
Oracle Corporation SunOS 5.10 Generic Patch January 2005
You have new mail.
$ bash
bash-3.00$ sqlplus
SQL*Plus: Release 10.2.0.2.0 - Production on Tue Aug 16 12:51:02 2011
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL>
6.1 Masukan parameter untuk instalasi (lokasi software, user, dll) informasi ini diambil dari
environment sebenernya. Itulah kenapa dibuat file /export/home/oracle/.profile
6.2 Tentukan folder tempat oracle inventory
6.3 Oracle mengecek requirements system, pastikan tidak ada warning disini
6.4 Konfirmasi produk yang akan diinstall
6.5 Oracle mengextract file ke harddisk, tunggu sampai selesai
6.6 Eksekusi dua buah configuration script dibawah dengan user root.
6.7 instalasi selesai, anda dapat mengakses database via browser dengan alamat dibawah:
Sampai disini software oracle telah terinstall. Agar dapat digunakan, database dan instance harus di
konfigurasi
7. Konfigurasi oracle instance & database. lakukan ini dengan user oracle
Pindah ke user oracle:
# su – oracle
Jalankan DBCA (DataBase Configuration Assistant):
$ dbca
7.1 Pilih create database
7.2 Pilih template database
7.3 Tentukan SID. Samakan value ini dengan variable ORACLE_SID pada profile
7.4 Tentukan apakah ingin menggunakan Enterprise manager
7.5 Tentukan password
7.6 Tentukan storage sebagai tempat file database oracle
7.7 Tentukan lokasi database file
7.8 Tentukan Lokasi Flash Recovery Area
7.9 Tentukan apakah ingin menginstall sample schemas
7.10 Tentukan alokasi resources untuk oracle. Sekedar trick bagi pemilik yang RAM pas-pasan: pilih
typical, dan masukan persentasi sekecil2nya. Parameter ini dapat diganti dikemudian hari.
7.11 Tentukan variable untuk database instance
7.12 Tentukan options ketika membuat database
7.13 Konfirmasi options yang telah di pilih
7.14 Proses membuat database file & instance. Pada tahap ini sering terjadi error jika spec
hardware kurang memenuhi. Contoh: pesan “out of memory”, terjadi jika RAM-nya kurang.
7.15 Tampilan pemberitahuan jika database & instance telah sukses
bash-3.00$ sqlplus
SQL*Plus: Release 10.2.0.2.0 - Production on Wed Aug 17 13:50:07 2011
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL>
Tidak ada komentar:
Posting Komentar