vmware server 2.0 + redhat5.4 + oracle 11g r2 asm 单节点安装!
准备工作:创建虚拟机,安装redhat5.4系统。--------------------------------------------------------一、以root执行下面的操作:--------------------------------------------------------1.编辑 /etc/sysconfig/i18n 修改为如下配置LAN
准备工作:创建虚拟机,安装redhat5.4系统。
--------------------------------------------------------
一、以root执行下面的操作:
--------------------------------------------------------
1.编辑 /etc/sysconfig/i18n 修改为如下配置
LANG="zh_CN.GB18030"
SUPPORTED="zh_CN.GB18030:zh_CN.GB2312:zh_CN.UTF-8:zh_CN:zh:zh_TW.UTF-8:zh_TW:zh:en_US.UTF-8:en_US:en"
SYSFONT="latarcyrheb-sun16"
--------------------------------------------------------
2.修改Oracle对中文的支持:
mkdir -p /usr/share/fonts/zh_CN/TrueType
mv zysong.ttf /usr/share/fonts/zh_CN/TrueType/
cd /usr/share/fonts/zh_CN/TrueType
ls -l
--------------------------------------------------------
3.安装sql*plus方向键
从官方下最新
rlwrap-0.37.tar.gz http://utopia.knoware.nl/~hlub/uck/rlwrap/
安装
[root@sunsyk src]# tar xvfz rlwrap-0.37.tar.gz
[root@sunsyk src]# cd rlwrap-0.37
[root@sunsyk rlwrap-0.30]# ./configure --prefix=/usr/local/rlwrap
[root@sunsyk rlwrap-0.30]# make && make install
使用
[oracle@oracle10g ~]$ vi .bash_profile
添加
alias sqlplus='/usr/local/rlwrap/bin/rlwrap sqlplus'
alias rman='/usr/local/rlwrap/bin/rlwrap rman'
--------------------------------------------------------
4.编辑文件:/etc/hosts 改成加入,然后 ping oracle10g 检查。
[hostip] [hostname] localhost.localdomain localhost
--------------------------------------------------------
5.编辑文件:/etc/sysctl.conf 加入以下内容,然后 sysctl -p 使他生效。
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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 = 1048576
--------------------------------------------------------
6.编辑文件:/etc/security/limits.conf 加入以下内容。
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
--------------------------------------------------------
7.编辑文件:/etc/pam.d/login 加入以下内容。
session required /lib/security/pam_limits.so
session required pam_limits.so
--------------------------------------------------------
8.编辑文件:/etc/profile 加入以下内容。
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
--------------------------------------------------------
9.创建用户
# groupadd oinstall
# groupadd dba
# groupadd asmdba
# groupadd asmadmin
# useradd -g oinstall -G dba,asmdba,asmadmin oracle
# passwd oracle
# useradd -g oinstall -G dba,asmdba,asmadmin grid
# passwd grid
# mkdir -p /u01/app/grid
# mkdir /u01/app/oracle
# chown -R oracle:oinstall /u01
# chmod -R g+w /u01
# chown grid:oinstall /u01/app/grid
# chown oracle:oinstall /u01/app/oracle
--------------------------------------------------------
10.设置Oracle用户环境变量:
export ORACLE_SID=orcl
export ORACLE_BASE=/u01/app
export ORACLE_HOME=/u01/app/oracle
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
export NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
umask 022
stty erase ^h
alias sqlplus='/usr/local/rlwrap/bin/rlwrap sqlplus'
alias rman='/usr/local/rlwrap/bin/rlwrap rman'
--------------------------------------------------------
11.设置grid用户环境变量
export ORACLE_SID=+ASM
export ORACLE_BASE=/u01/app
export ORACLE_HOME=/u01/app/grid
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=.:$PATH:$HOME/bin:$ORACLE_HOME/bin
export NLS_LANG='SIMPLIFIED CHINESE_CHINA.ZHS16GBK'
umask 022
stty erase ^h
alias sqlplus='/usr/local/rlwrap/bin/rlwrap sqlplus'
alias rman='/usr/local/rlwrap/bin/rlwrap rman'
--------------------------------------------------------
12.磁盘分区并添加相应的权限
# fdisk /dev/sdb
# fdisk /dev/sdc
# fdisk /dev/sdd
分别输入n p 1 回车 回车 w ,然后以下配置就是为了让oracle用户对磁盘有读/写的权限:编辑 /etc/sysconfig/rawdevices 添加如下内容:
/dev/raw/raw1 /dev/sdb1
/dev/raw/raw2 /dev/sdc1
/dev/raw/raw3 /dev/sdd1
修改/etc/udev/rules.d/60-raw.rules 文件添加如下内容:
ACTION=="add", KERNEL=="sdb1",RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="sdc1",RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="sdd1",RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="raw[1-3]", OWNER="oracle", GROUP="oinstall", MODE="660"
注意:如果这里有22个磁盘,写为 KERNEL=="raw[1-22]" 这里是有问题的额。应该写为:KERNEL=="raw*"。
重启系统和验证一下:
# raw -qa# ll /dev/raw/raw*
# ls -l /dev/raw
--------------------------------------------------------
13.安装rpm包:
-rw-r--r-- 1 root root 3096965 01-30 22:46 binutils-2.17.50.0.6-12.el5.i386.rpm
-rw-r--r-- 1 root root 1756815 01-30 22:46 compat-db-4.2.52-5.1.i386.rpm
-rw-r--r-- 1 root root 2439269 01-30 22:46 compat-gcc-7.3-2.96.128.i386.rpm
-rw-r--r-- 1 root root 1850257 01-30 22:46 compat-gcc-c++-7.3-2.96.128.i386.rpm
-rw-r--r-- 1 root root 1559375 01-30 22:46 compat-libgcj-devel-7.3-2.96.128.i386.rpm
-rw-r--r-- 1 root root 92078 01-30 22:46 compat-libstdc++-296-2.96-138.i386.rpm
-rw-r--r-- 1 root root 362214 01-30 22:46 compat-libstdc++-devel-7.3-2.96.128.i386.rpm
-rw-r--r-- 1 root root 2797397 01-30 22:46 control-center-2.16.0-16.el5.i386.rpm
-rw-r--r-- 1 root root 5446109 01-30 22:46 gcc-4.1.2-46.el5.i386.rpm
-rw-r--r-- 1 root root 3541264 01-30 22:46 gcc-c++-4.1.2-46.el5.i386.rpm
-rw-r--r-- 1 root root 4608034 01-30 22:46 glibc-2.5-42.i386.rpm
-rw-r--r-- 1 root root 17250754 01-30 22:46 glibc-common-2.5-42.i386.rpm
-rw-r--r-- 1 root root 3910058 01-30 22:46 gnome-libs-1.4.1.2.90-44.1.src.rpm
-rw-r--r-- 1 root root 11784 01-30 22:46 libaio-devel-0.3.106-5.i386.rpm
-rw-r--r-- 1 root root 369535 01-30 22:46 libstdc++-4.1.2-46.el5.i386.rpm
-rw-r--r-- 1 root root 2960902 01-30 22:46 libstdc++-devel-4.1.2-46.el5.i386.rpm
-rw-r--r-- 1 root root 22996 01-30 22:46 libXp-1.0.0-8.1.el5.i386.rpm
-rw-r--r-- 1 root root 478082 01-30 22:46 make-3.81-3.el5.i386.rpm
-rw-r--r-- 1 root root 1377121 01-30 22:46 openmotif22-2.2.3-18.i386.rpm
-rw-r--r-- 1 root root 1607576 01-30 22:46 openmotif-2.3.1-2.el5.i386.rpm
-rw-r--r-- 1 root root 3099372 01-30 22:46 openmotif-devel-2.3.1-2.el5.i386.rpm
-rw-r--r-- 1 root root 202286 01-30 22:46 pdksh-5.2.14-36.el5.i386.rpm
-rw-r--r-- 1 root root 9924 01-30 22:46 setarch-2.0-1.1.i386.rpm
-rw-r--r-- 1 root root 173582 01-30 22:46 sysstat-7.0.2-3.el5.i386.rpm
-rw-r--r-- 1 root root 851658 01-30 22:46 unixODBC-2.2.11-7.1.i386.rpm
-rw-r--r-- 1 root root 756505 01-30 22:46 unixODBC-devel-2.2.11-7.1.i386.rpm
-rw-r--r-- 1 root root 4271312 01-30 22:46 xscreensaver-4.18-5.rhel4.2.src.rpm
执行命令:# rpm -Uvh *.rpm --nodeps
--------------------------------------------------------
二、以oracle执行下面的操作:
--------------------------------------------------------
1、下面开始安装
1)安装grid infrastructure
2)安装database
3)创建ASM磁盘组asmca
4)创建数据库dbca
更多推荐
所有评论(0)