1.create user oracle
[root@node2 ~]# groupadd oinstall
[root@node2 ~]# groupadd dba
[root@node2 ~]# useradd -g oinstall -G dba oracle
[root@node2 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
2.create directory
[root@node2 /]# ll
drwxr-xr-x. 3 root root 4096 Jun 5 21:05 oracle
drwxr-xr-x. 3 root root 4096 Jun 5 21:05 oradata
[root@node2 /]# chown -R oracle:oinstall oracle
[root@node2 /]# chown -R oracle:oinstall oradata
[root@node2 /]# chmod -R 775 oracle
[root@node2 /]# chmod -R 775 oradata
[root@node2 /]# ll
drwxrwxr-x. 3 oracle oinstall 4096 Jun 5 21:05 oracle
drwxrwxr-x. 3 oracle oinstall 4096 Jun 5 21:05 oradata
3.check the package
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3(32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2(32 bit)
libstdc++-4.1.2
libstdc++-4.1.2(32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11(32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11(32 bit)
rpm –qa package_name check
rpm –ivh package_name install
yum 配置
[root@node2 Server]# more /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
baseurl=file:///mnt/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
4. 配置环境变量
[root@node2 /]# vi /etc/security/limits.conf
加入
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@node2 /]# vi /etc/pam.d/login
加入
session required /lib/security/pam_limits.so
[root@node2 /]# vi /etc/sysctl.conf
加入
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967296
kernel.shmmni = 4096
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
sysctl -p 生效
5. 配置 oracle account 的环境变量
[root@node2 /]# su - oracle
[oracle@node2 ~]$ vi .bash_profile
加入
stty erase ^h
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=node2
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
exportLD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/
exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022
6. 安装 oracle 软件
[root@node2opt]# xhost +
access control disabled, clients can connect from any host
[root@node2 opt]# su - oracle
[oracle@node2 ~]$ cd /opt/database/
[oracle@node2 database]$ ./runInstaller
后面就是一步一步的安装了,可以忽略
安装到94%的时候,会跳出要执行两个脚本,记得执行
7.使用dbca create database.
[root@node2 ~]# groupadd oinstall
[root@node2 ~]# groupadd dba
[root@node2 ~]# useradd -g oinstall -G dba oracle
[root@node2 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
2.create directory
[root@node2 /]# ll
drwxr-xr-x. 3 root root 4096 Jun 5 21:05 oracle
drwxr-xr-x. 3 root root 4096 Jun 5 21:05 oradata
[root@node2 /]# chown -R oracle:oinstall oracle
[root@node2 /]# chown -R oracle:oinstall oradata
[root@node2 /]# chmod -R 775 oracle
[root@node2 /]# chmod -R 775 oradata
[root@node2 /]# ll
drwxrwxr-x. 3 oracle oinstall 4096 Jun 5 21:05 oracle
drwxrwxr-x. 3 oracle oinstall 4096 Jun 5 21:05 oradata
3.check the package
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3(32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
ksh-20060214
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2(32 bit)
libstdc++-4.1.2
libstdc++-4.1.2(32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11(32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11(32 bit)
rpm –qa package_name check
rpm –ivh package_name install
yum 配置
[root@node2 Server]# more /etc/yum.repos.d/rhel-source.repo
[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
#baseurl=ftp://ftp.redhat.com/pub/redhat/linux/enterprise/$releasever/en/os/SRPMS/
baseurl=file:///mnt/Server
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
4. 配置环境变量
[root@node2 /]# vi /etc/security/limits.conf
加入
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@node2 /]# vi /etc/pam.d/login
加入
session required /lib/security/pam_limits.so
[root@node2 /]# vi /etc/sysctl.conf
加入
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967296
kernel.shmmni = 4096
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
sysctl -p 生效
5. 配置 oracle account 的环境变量
[root@node2 /]# su - oracle
[oracle@node2 ~]$ vi .bash_profile
加入
stty erase ^h
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID=node2
export ORACLE_TERM=xterm
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
exportLD_LIBRARY_PATH=$ORACLE_HOME/bin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin/
exportCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
ulimit -u 16384 -n 65536
umask 022
6. 安装 oracle 软件
[root@node2opt]# xhost +
access control disabled, clients can connect from any host
[root@node2 opt]# su - oracle
[oracle@node2 ~]$ cd /opt/database/
[oracle@node2 database]$ ./runInstaller
后面就是一步一步的安装了,可以忽略
安装到94%的时候,会跳出要执行两个脚本,记得执行
7.使用dbca create database.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24237320/viewspace-2117690/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24237320/viewspace-2117690/