CentOS5.5安装Oracle10g
更新时间:2023-08-20 05:01:01 阅读量: 高等教育 文档下载
CentOS5.5安装Oracle10g
1、配置swap大小
在安装Linux划分分区的时候,请根据下表来设置Swap的大小。
2、修改host
在/etc/hosts里增加IP地址和电脑名,以便域名解析。
[root@centosCentOS]#vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
192.168.0.16 centos
3、安装rpm包
x64位版的Linux需要检查是否安装以后包,例如使用命令:rpm –qa |grepbinutils查询,如果没有,请使用命令:rpm –ivhbinutils-2.15.92.0.2-10.EL4安装。
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
libXp-1.0.0-8.1.el5.x86_64.rpm
libXp-1.0.0-8.1.el5.i386.rpm
compat-libstdc++-33-3.2.3-61.i386.rpm
compat-libstdc++-33-3.2.3-61.x86_64.rpm
4、调整内核参数
编辑/etc/sysctl.conf加入以下内容。
kernel.shmall = 2097152
kernel.shmmax = 2147483648
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
使用sysctl –p命令重新加载内核
用vi命令编辑以下文件并加入内容。
1.)/etc/security/limits.conf
* softnproc 2047
* hardnproc 16384
* softnofile 1024
* hardnofile 65536
2.)/etc/pam.d/login
session required pam_limits.so
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、创建用户和组
[root@centos /]#groupaddoinstall
[root@centos /]# groupadddba
[root@centos /]# groupaddoper
[root@centos /]# useradd -g oinstall -G dba,oper oracle
[root@centos /]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba),502(oper)
[root@centos /]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
6、创建安装oracle的文件夹,并设置其相应权限给Oracle用户 mkdir -p /data/app/oracle/product/10.2.0.1
chown -R oracle:oinstall/data/app
chmod 775 /data/app
7、伪装cp /etc/redhat-release /etc/redhat-release.bak 使用vi命令编辑 /etc/redhat-release,替换为如下代码:
Red Hat Enterprise Linux AS release 4 (Nahant Update 4)
8、设置Oracle环境变量
使用命令vi /home/oracle/.bash_profile增加环境变量
LANG=en
DISPLAY=192.168.89.6:0.0
ORACLE_BASE=/data/app/oracle
ORACLE_SID=his
ORACLE_HOME=$ORACLE_BASE/product/10.2.0.1
PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export PATH LANG DISPLAY ORACLE_BASE ORACLE_SID ORACLE_HOME LD_LIBRARY_PATH CLASSPATH
9、解压安装包文件,安装jdk
gunzip 10201_database_linux_x86_64.cpio.gz
cpio -idmv< 10201_database_linux_x86_64.cpio
[root@centos soft]# ./jdk-6u22-linux-x64-rpm.bin
10、以oracle身份登录图形界面进行安装
[root@centos ~]# xhost +
access control disabled, clients can connect from any host
[root@centos ~]# su - oracle
[oracle@centos ~]$ xclock
先安装软件
./runInstaller
安装完成后,以root用户执行
./orainstRoot.sh
./root.sh
安装数据库
dbca
配置监听
netca
11、设置oracle自动启动
1.)编辑dbstart
[root@centos /]#vi /data/app/oracle/product/10.2.0.1/bin/dbstart # Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
应该是在78行,将其改为:
# Set this to bring up Oracle Net Listener
ORACLE_HOME_LISTNER=$ORACLE_HOME
2.)编辑 /etc/oratab
最下一行
his:/data/app/oracle/product/10.2.0.1:N
更改为:
his:/data/app/oracle/product/10.2.0.1:Y
3.)新建一个文件vi /etc/init.d/oracle
#!/bin/bash
#
# oracledb This Starts/Stops the Oracle Server
# chkconfig: 345 99 10
# description: script for the Oracle Instance, Listener
# /etc/init.d/oracledb
#
# Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab
export ORACLE_OWNR=oracle
export ORACLE_HOME=/data/app/oracle/product/10.2.0.1
echo "Oracle Script init.d"
if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
then
echo "Oracle startup: cannot start"
exit 1
fi
case "$1" in
start)
# Oracle listener and instance startup
echo -n "Starting Oracle: "
su - $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" su - $ORACLE_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole" touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
su - $ORACLE_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole" su - $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME" rm -f /var/lock/oracle
echo "OK"
;;
reload|restart)
$0 stop
$0 start
;;
*)
echo "Usage: `basename $0` start|stop|restart|reload"
exit 1
esac
exit 0
4.)增加启动项
[root@centos /]# chmod +x /etc/rc.d/init.d/oracle
[root@centos /]# chkconfig --add oracle
[root@centos /]#chkconfig --list|grep oracle
oracle 0:关闭 1:关闭 2:关闭 3:启用 4:启用
[root@centos 10.2.0.1]# cd /usr/bin
[root@centos bin]# pwd 5:启用 6:关闭
/usr/bin
[root@centos bin]# ln -s /etc/rc.d/init.d/oracle
12、日常操作
上述已经设置好了服务器开机后会自动启动oracle服务,也可以用如下命令操作。
1.)启动oracle
oracle start
2.)关闭oracle
oracle stop
3.)重启oracle
oracle restart
正在阅读:
CentOS5.5安装Oracle10g08-20
电气考试题及答案10-13
广播电视大学(电大)期末考试2017年度《外科护理学》课程(水电解质酸碱平衡)重点打印版汇总09-15
案场标准化管理手册10-23
工作票制度实施细则11-07
追悼会生平介绍103-28
小学安全工作预案05-30
电气设备预试方案02-26
《特殊家庭学生心理危机表现预防与干预研究》研究报告04-15
只要努力就能成功作文700字06-30
- 2012诗歌鉴赏讲座 师大附中张海波
- 2012-2013学年江苏省苏州市五市三区高三(上)期中数学模拟试卷(一)
- 市政基础设施工程竣工验收资料
- 小方坯连铸机专用超越离合器(引锭杆存放用)
- 荀子的学术性质之我见
- 氩弧焊管轧纹生产线操作说明
- 小学科学六年级上册教案
- (商务)英语专业大全
- 外汇储备的快速增长对我国经济发展的影响
- 幼儿园中班优秀语言教案《小猴的出租车》
- 第七章 仪表与显示系统
- 身份证号码前6位行政区划与籍贯对应表
- 单位(子单位)工程验收通知书
- 浅谈地铁工程施工的项目成本管理
- 沉积学知识点整理
- 前期物业管理中物业服务企业的法律地位
- 2014微量养分营养试卷
- 地质专业校内实习报告范文(通用版)
- 内部审计视角下我国高校教育经费支出绩效审计研究
- 高次插值龙格现象并作图数值分析实验1
- Oracle10g
- 安装
- CentOS
- 5.5
- 2011春教研计划
- 输液残留液收集装置
- 过零丁洋历年中考鉴赏阅读试题(最新整理)
- 学前教育专业实施性教学计划
- (完整word版)sppb简易体能状况量表
- 浅析双层玻璃窗的功效论文
- 2016-2022年中国TO系列集成电路封装测试市场发展现状及十三五投资动向预测报告
- 上海市高三数学基础练习【7B.2012.3】
- 生烤羊腿腌料独家配方及烤制工艺
- 泡沫混凝土施工方案
- 大学语文辅导资料
- 500强企业校园招聘经典面试问题汇编(含答案)
- 顶新国际集团SAP成本核算
- 铁办【2008】247号文激励约束考核费
- 五年级下册教材分析
- 婴儿智力发育判断标准及危险表现
- 新考选教师岗前培训开班仪式上的讲话
- 数据挖掘_datamiming_韩家炜_04OLAP
- 2020年预备党员半年总结
- 专业汉语资料2