centos5.8 x86_64安装oracle10g
2013-05-09 23:16 cmsd 阅读(228) 评论(0) 编辑 收藏 举报安装 oracle
0.安装依赖的库
yum -y groupinstall "Development Libraries" "Development Tools"
yum -y install compat-db* compat-libc* compat-gcc* libXp.so.6 libc-* libaio* openmotif glibc-devel* libgcc* gnome-lib* libXtst
ln -s /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.5 ##不链接的话中途会报错
1.修改hosts
vim /etc/hosts
192.168.1.104 laoguang
2.添加组oinstall ,dba以及oracle用户
groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle
3.修改内核参数 vim /etc/sysctl.conf
-------------------
kernel.core_users_pid = 1
kernel.shmall = 2097152
kernel.shmmax = 21474883648
##这些已经存在
-------------------
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
4.修改 /etc/security/limits.conf 添加如下
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
5.修改/etc/pam.d/login添加
session required pam_limits.so
6.修改 /etc/profile添加如下:
if [ $USER = "oracle" ];then
if [ $SHELL = "/bin/ksh" ];then
ulimit -p 16384 ulimit -n 65536
else ulimit -u 16384 -n 65536
fi
fi
7.建立目录
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01
8.设置环境变量
vim /etc/profile.d/oracle.sh
export ORACLE_BASE=/u01/app/oracle export
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
export ORACLE_SID=jiagulun
export NLS_LANG=american_america.zhs16gbk
export PATH=$PATH:ORACLE_HOME/bin
9.解压
cd /home/oracle
gzip -d 10201_database_linux_x86_64.cpio.gz
cpid -ivcdu < 10201_database_linux_x86_64.cpio
10.修改系统版本号欺骗10g
vim /etc/redhat-release
改为 redhat 4
11.安装
su - oracle cd database
./runInstaller --> Advanced Install --> Next --> Custome --> Next --> 选上ISQO*Plus --> 检查环境(我这semmsl报错) --> Next --> Install database Software only --> Install
12.出现提示以root身份执行这两个shell
su root
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh
安装成功提示isqlplus的地址http://$hostname:5560/isqlplus
exit
建立数据库
1.以oracle用户运行
su - oracle
dbca
next --> Create --> General --> zhongsou(这个是数据库名,注意与环境变量的一致) --> Next --> 密码(SYS,SYSTEM,SYSMAN,DBSNMP) --> FileSystem(安装在存储) --> Use Common --> Next --> Next --> Finish
到此建立完毕,提示em http://$host:1158/em
server parameter file : /u01/app/oracle/product/10.2.0/db_1/dbs/spfilezhongsou