在 Oracle Linux 6 安裝 Oracle database 11g R2 steps

netca , dbca

Connect as SYSTEM.

CREATE USER username IDENTIFIED BY apassword;

GRANT CONNECT TO username;

GRANT SELECT [, INSERT] [, UPDATE] [, DELETE] on schema.table TO username;

 

 

 

virtualbox 加一個 partition 12G mount point /u01

 

 

eth0 跑掉了
 
vi /etc/sysconfig/network-scripts/ifcfg-eth0
把 HWADDR 換成目前的 mac address
 
 

The following example contains the configuration for a DHCP adapter.

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=52:54:00:91:6A:B3
PEERDNS=yes
PEERROUTES=yes
#

The following example is for a static IP address.

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
NM_CONTROLLED=yes
ONBOOT=yes
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
HWADDR=52:54:00:91:6a:b3
PEERROUTES=yes
IPADDR=192.168.122.89 NETMASK=255.255.255.0 GATEWAY=192.168.122.1
DNS1=192.168.122.1
USERCTL=no
#
 
 
 
 
修改 hostname :
vi /etc/sysconfig/network
 
HOSTNAME=xora.monster.tw
 
 
 
 
 
 

 

REF: http://oracle-base.com/articles/11g/oracle-db-11gr2-installation-on-oracle-linux-6.php

 

關掉 iptables

service iptables stop

從開機 service 移除

chkconfig iptables off

 

 

 

設定 .bash_profile

 

// ————————— vi .bash_profile

# export LANG=”en_US.UTF-8″

# Oracle Settings

export TMP=/tmp export TMPDIR=$TMP # export ORACLE_HOSTNAME=xora.monster.tw export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 export ORACLE_SID=orcl export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib export PATH=/usr/sbin:$ORACLE_HOME/bin:$PATH #

 

 

 

 

cat /etc/hosts

127.0.0.1   localhost
192.168.1.104   xora.monster.tw xora

主機名稱也要一樣

hostname xora.monster.tw

 

 

Oracle Linux 有個 preinstall 套件

yum install oracle-rdbms-server-11gR2-preinstall

 

 

安裝必要套件

yum install binutils-2*x86_64* glibc-2*x86_64* glibc-2*i686* compat-libstdc++-33*x86_64* glibc-common-2*x86_64* glibc-devel-2*x86_64* glibc-devel-2*i686* glibc-headers-2*x86_64* elfutils-libelf-0*x86_64* elfutils-libelf-devel-0*x86_64* gcc-4*x86_64* gcc-c++-4*x86_64* ksh-*x86_64* libaio-0*x86_64* libaio-devel-0*x86_64* libaio-0*i686* libaio-devel-0*i686* libgcc-4*x86_64* libgcc-4*i686* libstdc++-4*x86_64* libstdc++-4*i686* libstdc++-devel-4*x86_64* make-3.81*x86_64* numactl-devel-2*x86_64* sysstat-9*x86_64* compat-libstdc++-33*i686* compat-libcap*

 

 

yum update

 

 

 

/etc/sysctl.conf

fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586

 

 

 

/etc/security/limits.conf

oracle              soft    nproc   16384
oracle              hard    nproc   16384
oracle              soft    nofile  4096
oracle              hard    nofile  65536
oracle              soft    stack   10240
 

 

執行安裝指令:

./runInstaller -ignoreSysPrereqs

 

 

 

Screenshot 2015 02 17 22 08 34 Screenshot 2015 02 17 22 08 51 Screenshot 2015 02 17 22 19 33 Screenshot 2015 02 17 22 19 54 Screenshot 2015 02 17 22 39 12

 

 

Screenshot 2015 02 17 22 39 28

 

 

 

/u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

 

螢幕快照 2015 02 17 上午9 51 18

 

 

 

 

lsnrctl start

 

螢幕快照 2015 02 17 上午9 53 51

 

 

螢幕快照 2015 02 17 上午9 59 35

 

 

LISTENER 開了 , 但是 database 還沒 startup 的 error msg:

螢幕快照 2015 02 17 上午9 59 58

 

 

螢幕快照 2015 02 17 上午10 01 57

 

 

螢幕快照 2015 02 17 上午10 02 47

 

 

TEST SCHEMA:
create table tbl_info_daily
(
PK number(20),
XDATE DATE,
XHOUR NUMBER(2) default 0,
TAG1 VARCHAR2(100),
TAG2 VARCHAR2(40),
VAL NUMBER(10) default 0
)
;

create index tbl_info_daily_XDATE on tbl_info_daily (XDATE)
;

 

 

 

 

————————-

設定 IP address :

rm /etc/udev/rules.d/70-persistent-net.rules

 

reboot

 

 

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
# BOOTPROTO=dhcp
DNS1=168.95.1.1
DOMAIN=monster.tw
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=08:00:27:53:BB:E2
UUID=b2ef339f-b2db-4c4f-927d-8faf062ace80
IPADDR=10.10.10.22
NETMASK=255.255.254.0
GATEWAY=10.10.10.254
DNS1=168.95.1.1

UUID :

# uuidgen eth0

cb2bcc03-d590-4ae4-8bb2-4f8a41779de3