1. 用Root用户登录系统
2. 检查Oracle安装依赖的软件包
binutils-2.17.50.0.6-14.el5.i386.rpm
compat-db-4.2.52-5.1.i386.rpm
compat-libstdc++-33-3.2.3-61.i386.rpm
gcc-4.1.2-48.el5.i386.rpm
gcc-c++-4.1.2-48.el5.i386.rpm
gd-2.0.33-9.4.el5_4.2.i386.rpm
gdb-7.0.1-23.el5.i386.rpm
gd-progs-2.0.33-9.4.el5_4.2.i386.rpm
glibc-2.5-49.i686.rpm
glibc-common-2.5-49.i386.rpm
glibc-devel-2.5-49.i386.rpm
glibc-headers-2.5-49.i386.rpm
glibc-utils-2.5-49.i386.rpm
libaio-0.3.106-5.i386.rpm
libstdc++-4.1.2-48.el5.i386.rpm
libstdc++-devel-4.1.2-48.el5.i386.rpm
libXp-1.0.0-8.1.el5.i386.rpm
make-3.81-3.el5.i386.rpm
openmotif-2.3.1-2.el5_4.1.i386.rpm
setarch-2.0-1.1.i386.rpm
sysstat-7.0.2-3.el5.i386.rpm
3. 创建需要的用户组及用户
# groupadd dba
# groupadd oinstall
# useradd -g oinstall -G dba -d /home/oracle oracle
# passwd oracle
4. 配置内核参数
修改:/etc/sysctl.conf 文件
# shmall - maximum number of shared memory pages. If you set it to too low value can slowdown any program usng shared memory
# shmmax - maximum size of shared memory segment that can be allocated in the memory. For servers with lots of memory can be increased to 80% of memory to avoid shared memory fragmentation
# shmmni - maximum number of segments. It's good idea to change it only by vendor recommendation
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
# semmsl - maximum number of semaphores per semaphore identifier. Very big number will eat memory not used later
# semmns - maximum number of semaphores in the system. Size it carefully because of above reason
# semopm - Define maximum number of semaphore operations per system call
# semmni ¨C maximum number of semaphore identifier. Do not increase it over needed limit, because of waste of memory
kernel.sem = 250 32000 100 128
# the maximum number of file handles
fs.file-max = 65536
# ip_local_port_range - define full range of local ports in Linux, normally upper limit is 32000
# rmem_default - Default Receive Window
# rmem_max Maximum - Receive Window
# wmem_default - Default Send Window
# wmem_max - Maximum Send Window
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
5. 为oracle用户提高shell限额,配置环境变量
To improve the performance of the software on Linux systems, you must increase the following shell limits for the oracle user:
nofile - Maximum number of open file descriptors
nproc - Maximum number of processes available to a single user
5.1 修改/etc/security/limits.conf 文件:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
5.2 修改/etc/pam.d/login文件:
session required /lib/security/pam_limits.so
session required pam_limits.so
5.3 修改/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
5.4 修改/etc/oratab文件
#oradb:/opt/oracle/product/10.2.0/db_1:N
oradb:/opt/oracle/product/10.2.0/db_1:Y
5.5 设置bash下环境变量,修改
.bash_profile文件
ORACLE_BASE=/opt/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=oradb; export ORACLE_SID
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
6. 解压oracle安装文件 ./runInstaller,根据提示开始安装
7. 将Oracle设为系统服务,并开机自启动
7.1 编写
/etc/init.d/oracle脚本
#!/bin/bash
#description:starts the oracle database deamons
ORA_HOME="/opt/oracle/product/10.2.0/db_1"
ORA_OWNER="oracle"
case $1 in
'start')
echo -n "***Starting Oracle***"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbstart"
;;
'stop')
echo -n "***Stopping Oracle***"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c "$ORA_HOME/bin/dbshut"
;;
'restart')
echo -n "***Restarting Oracle***"
$0 stop
$0 start
;;
'isqlstart')
echo "***Starting Oracle iSQL PLus***"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl start"
echo "*** Note:You can access service at url:http://$(hostname):5560/isqlplus"
;;
'isqlstop')
echo "***Stopping Oracle iSQL Plus***"
su - $ORA_OWNER -c "$ORA_HOME/bin/isqlplusctl stop"
;;
'emstart')
echo "***Starting Oracle Enterprise Manager 10g Database control***"
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
echo "Note:You can access service as url:http://$(hostname):1158/em"
;;
'emstop')
echo "***Stopping Oracle Enterprise Manager 10g Database control***"
su - $ORA_OWNER -c "ORA_HOME/bin/emctl stop dbconsole"
;;
'*')
echo "Usage:$0 {start|stop|isqlstart|isqlstop|emstart|emstop}"
exit 1
esac
exit 0
7.2 设置Oracle服务开机启动
#chkconfig oracle on
分享到:
相关推荐
CentOS5.5安装Oracle11gR2,亲测成功
CentOS5.5安装Oracle11gR2,亲测成功
centos5.5安装oracle10g: 自己写的文档,学习用的,供大家参考
centos5.5 安装oracle10g centos5.5 安装oracle10g centos5.5 安装oracle10g
CentOS5.5安装oracle10g
Centos5.5+oracle11gR2_database--installation-step-by-step.rar
CentOS5.5+Oracle10g安装配置RAC详细步骤,存储方式包含ASM、OCFS及裸磁盘等多种方式。
centos 5.5 安装 Oracle 10g 挺实用的,学习数据库肯定Oracle 10g ,11g,12c都要会安装,也肯定都有这3个版本学习。
CentOS5.5安装 Oracle 11g
CentOS5.5下安装oracle10g,本人按照相关文档一步一步总结出来的,绝对原创,只要各位童鞋有一点linux的基础,就可以顺利安装的傻瓜教程~
CentOS5.5安装Oracle11g.pdf
CentOS5.5安装 Oracle 11g
自己写的安装手记,已测试过多次,放心使用,有事请Q我,或到我的blog留言 http://blog.csdn.net/flexitime
CentOS7安装Oracle 11gR2 图文详解 CentOS7安装Oracle 11gR2 图文详解
linux centos5.5下oracle11g 详细安装oracle在centos5.5下可以安装成功!!!!!
CentOS下Oracle10gR2之静默安装+手工建库.pdf
自己写的安装手记,已经安装过N次了(N>10),无问题,放心下载~~
在centOS5.5下安装oracle10g(10.2.0.1),升级(10.2.0.5)
CentOS 5.5安装全过程 这个介绍的很细的。