本文将为您提供关于CentOS卸载Oracle11gR2(x64)的详细介绍,同时,我们还将为您提供关于64位CentOS5.6下Oracle11gR2安装笔记、CentOS6下Oracle11gR2
本文将为您提供关于CentOS卸载Oracle 11gR2(x64)的详细介绍,同时,我们还将为您提供关于64位CentOS 5.6下Oracle 11gR2 安装笔记、CentOS 6 下 Oracle11gR2 设置开机自启动、CentOS 6.3环境Oracle 11gR2数据库安装、CentOS 6.4下安装Oracle 11gR2的实用信息。
本文目录一览:- CentOS卸载Oracle 11gR2(x64)
- 64位CentOS 5.6下Oracle 11gR2 安装笔记
- CentOS 6 下 Oracle11gR2 设置开机自启动
- CentOS 6.3环境Oracle 11gR2数据库安装
- CentOS 6.4下安装Oracle 11gR2
CentOS卸载Oracle 11gR2(x64)
环境
OS: CentOS 7.4; hosts: L134; IP: 192.168.1.134 Oracle安装文件目录:/opt/oracle_install ORACLE_BASE:/data/app/oracle ORACLE_HOME: /data/app/oracle/product/11.2.0/db_1 oraInventory: /data/app/oraInventory Oracle数据目录:/data/app/oradata/
方法1:使用oracle自带的deinstall卸载
[[email protected] ~]$ cd $ORACLE_HOME/deinstall [[email protected] /data/app/oracle/product/11.2.0/db_1/deinstall]$ ./deinstall
然后根据提示一步一步进行操作即可。最后一步是确认操作,选择y,回车。
Do you want to continue (y - yes,n - no)? [n]: y
最后还要需要以root身份删除/etc/oraInst.loc这个文件。
我觉得方法2删除更方便更彻底。
方法2:手动删除相关文件和目录
- 关闭实例
sqlplus / as sysdba sql> shutdown immediate
-
关闭listener
lsnrctl stop
-
删除安装目录
su - rm -rf /data/app/oracle/ /data/app/oraInventory/ /data/app/oradata/
-
以root权限删除/usr/bin下的相关文件。下周
cd /usr/local/bin/ rm -f dbhome oraenv coraenv
-
删除/etc/oratab
rm -f /etc/oratab
-
删除
rm -f /etc/oraInst.loc
-
删除oracle用户和用户组(如有必要)
userdel -r oracle groupdel oinstall groupdel dba groupdel oper
-
删除启动服务
chkconfig --del oracle
扩展
oracle自带的deinstall卸载的提示和日志信息
[[email protected] /data/oracle/11g2/deinstall]$ ./deinstall Checking for required files and bootstrapping ... Please wait ... Location of logs /tmp/deinstall2018-03-08_08-53-24-AM/logs/ ############ ORACLE DEINSTALL & DECONfig TOOL START ############ ######################## CHECK OPERATION START ######################## Install check configuration START Checking for existence of the Oracle home location /data/app/oracle/product/11.2.0/db_1 Oracle Home type selected for de-install is: SIDB Oracle Base selected for de-install is: /data/app/oracle Checking for existence of central inventory location /data/app/oraInventory Install check configuration END Network Configuration check config START Network de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/netdc_check1471463216126639250.log Specify all Single Instance listeners that are to be de-configured [LISTENER]: Network Configuration check config END Database Check Configuration START Database de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/databasedc_check5326208000777792237.log Use comma as separator when specifying list of values as input Specify the list of database names that are configured in this Oracle home [orclyz]: ###### For Database ‘orclyz‘ ###### Single Instance Database The diagnostic destination location of the database: /data/app/oracle/diag/rdbms/orclyz Storage type used by the Database: FS Database file location: /data/app/oracle/oradata/orclyz,/data/app/oracle/flash_recovery_area/orclyz Flash recovery area location: /data/app/oracle/flash_recovery_area/ORCLYZ database spfile location: /data/app/oracle/product/11.2.0/db_1/dbs/spfileorclyz.ora The details of database(s) orclyz have been discovered automatically. Do you still want to modify the details of orclyz database(s)? [n]: Database Check Configuration END Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/emcadc_check.log Checking configuration for database orclyz Enterprise Manager Configuration Assistant END Oracle Configuration Manager check START OCM check log file location : /tmp/deinstall2018-03-08_08-53-24-AM/logs//ocm_check5456.log Oracle Configuration Manager check END ######################### CHECK OPERATION END ######################### ####################### CHECK OPERATION SUMMARY ####################### Oracle Home selected for de-install is: /data/app/oracle/product/11.2.0/db_1 Inventory Location where the Oracle home registered is: /data/app/oraInventory Following Single Instance listener(s) will be de-configured: LISTENER The following databases were selected for de-configuration : orclyz Database unique name : orclyz Storage used : FS No Enterprise Manager configuration to be updated for any database(s) No Enterprise Manager ASM targets to update No Enterprise Manager listener targets to migrate Checking the config status for CCR Oracle Home exists with CCR directory,but CCR is not configured CCR check is finished Do you want to continue (y - yes,n - no)? [n]: y A log of this session will be written to: ‘/tmp/deinstall2018-03-08_08-53-24-AM/logs/deinstall_deconfig2018-03-08_08-53-33-AM.out‘ Any error messages from this session will be written to: ‘/tmp/deinstall2018-03-08_08-53-24-AM/logs/deinstall_deconfig2018-03-08_08-53-33-AM.err‘ ######################## CLEAN OPERATION START ######################## Enterprise Manager Configuration Assistant START EMCA de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/emcadc_clean.log Updating Enterprise Manager ASM targets (if any) Updating Enterprise Manager listener targets (if any) Enterprise Manager Configuration Assistant END Database de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/databasedc_clean1081110075195191916.log Database Clean Configuration START orclyz This operation may take few minutes. Database Clean Configuration END orclyz Network Configuration clean config START Network de-configuration trace file location: /tmp/deinstall2018-03-08_08-53-24-AM/logs/netdc_clean1072295666521765217.log De-configuring Single Instance listener(s): LISTENER De-configuring listener: LISTENER Stopping listener: LISTENER Listener stopped successfully. Deleting listener: LISTENER Listener deleted successfully. Listener de-configured successfully. De-configuring Naming Methods configuration file... Naming Methods configuration file de-configured successfully. De-configuring backup files... Backup files de-configured successfully. The network configuration has been cleaned up successfully. Network Configuration clean config END Oracle Configuration Manager clean START OCM clean log file location : /tmp/deinstall2018-03-08_08-53-24-AM/logs//ocm_clean5456.log Oracle Configuration Manager clean END Oracle Universal Installer clean START Detach Oracle home ‘/data/app/oracle/product/11.2.0/db_1‘ from the central inventory on the local node : Done Delete directory ‘/data/app/oracle/product/11.2.0/db_1‘ on the local node : Done Delete directory ‘/data/app/oraInventory‘ on the local node : Done Delete directory ‘/data/app/oracle‘ on the local node : Done Oracle Universal Installer cleanup was successful. Oracle Universal Installer clean END Oracle install clean START Clean install operation removing temporary directory ‘/tmp/install‘ on node ‘PostalDataDG‘ Oracle install clean END ######################### CLEAN OPERATION END ######################### ####################### CLEAN OPERATION SUMMARY ####################### Successfully de-configured the following database instances : orclyz Following Single Instance listener(s) were de-configured successfully: LISTENER Cleaning the config for CCR As CCR is not configured,so skipping the cleaning of CCR configuration CCR clean is finished Successfully detached Oracle home ‘/data/app/oracle/product/11.2.0/db_1‘ from the central inventory on the local node. Successfully deleted directory ‘/data/app/oracle/product/11.2.0/db_1‘ on the local node. Successfully deleted directory ‘/data/app/oraInventory‘ on the local node. Successfully deleted directory ‘/data/app/oracle‘ on the local node. Oracle Universal Installer cleanup was successful. Run ‘rm -rf /etc/oraInst.loc‘ as root on node(s) ‘PostalDataDG‘ at the end of the session. Oracle install successfully cleaned up the temporary directories. ####################################################################### ############# ORACLE DEINSTALL & DECONfig TOOL END #############
64位CentOS 5.6下Oracle 11gR2 安装笔记
64位CentOS 5.6下Oracle 11gR2 安装笔记
基本Linux操作
uname -r 查看内核版本号
df -m 查看各存储设备空间
du -sh 查看当前目录空间大小
查看进程及IO情况: top 、 mpstat -P ALL 1 100 、iostat -x 1 10(测试IO性能)
强制删除目录 rm -rf
删除空目录 rmdir
设置Linux系统vi /etc/sysctl.confg
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
net.ipv4.tcp_syncookies = 1
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
kernel.msgmnb = 65536
kernel.msgmax = 655360
kernel.shmmax = 68719476736
kernel.shmall = 4294967296 (表示页 32位系统 1页=4k)
kernel.shmmni=4096
kernel.sysrq = 0
kernel.core_uses_pid = 1
kernel.sem=250 32000 100 128
fs.file-max=6815744
fs.aio-max-nr=1048576
应用参数 sysctl -p
进行 vi /etc/security/limits.conf 设置
Oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
进行 vi /etc/pam.d/login 设置
session required /lib/security/pam_limits.so
session required pam_limits.so
groupadd oinstall
groupadd dba
useradd -g oinstall -g dba -m oracle
passwd oracle
接下来就是创建Oralce 根目录与安装目录
mkdir /data/ora11g
mkdir /data/ora11g/product/11.2.0.1/dbhome_1
设置 Oracle 目录 .bash_profile
export ORACLE_BASE=/data/ora11g
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.1/dbhome_1
export ORACLE_SID=xxxx
export ORACLE_TERM=xterm
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64
#export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export LD_ASSUME_KERNEL=2.6.18
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16GBK"
#export NLS_LANG="zh_CN.UTF-8"
export LANG=zh_CN.UTF-8
export LC_ALL=zh_CN.GB2312
umask 022
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
从 root 用户切换到 oracle 用户进行安装前一定要执行 xhost + 命令,否则找不到显示输出
注:第二张盘中的stage中的文件全部拷贝到第一张盘中的 stage ,否则安装过程中报错,就是报找到不第二张盘中的文件(不知有没有其他办法)
安装好 oracle 软件(先不创建数据库)
最后执行 $ORACLE_BASE/oraInventory/orainstRoot.sh 、 $ORACLE_HOME/root.sh 二个脚本
使用 dbca 、netca 、netmgr 来创建数据、配置本地监听、管理连接
启动oracle监听 lsnrctl start/stop/reload/status
目录 diag
oracle的alert日志在ORACLE_BASE下ORACLE_BASE/diag/{product_type}/{product_id}/{instance_id}
alter下是以xml格式 log.xml
trace是文本格式 alter_{instance}.log
目录 admin
目前存放创建数据库的脚本,,以前的alertlog已经不在这个地方了
安装好 oracle后,启动sqlplus提示错误
libclntsh.so.11.1: cannot restore segment prot after reloc: Permission deni
解决方法:
在root权限下
执行
semanage fcontext -a -t textrel_shlib_t 路径\libclntsh.so.11.1
执行 restorecon -R -v 路径\libclntsh.so.11.1
再增加环境变量
vi /etc/profile
export
export ORACLE_HOME=路径
export ORACLE_SID=orcl
export PATH=:$ORACLE_HOME
即可
dbca netca 无法启动
需设置
vi /etc/sysconfig/network 中的 HOSTNAME=重设置命名
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=mytest
GATEWAY=127.0.0.1
再编辑
vi /etc/hosts
在
127.0.0.1 localhost.localdomain localhost
后台增加上面同样的命名
127.0.0.1 localhost.localdomain localhost mytest
保存
[root@localhost#]hostname mytest
即可
CentOS 6 下 Oracle11gR2 设置开机自启动
[1] 更改 /etc/oratab
# This file is used by ORACLE utilities. It is created by root.sh
# and updated by the Database Configuration Assistant when creating
# a database.
# A colon, '':'', is used as the field terminator. A new line terminates
# the entry. Lines beginning with a pound sign, ''#'', are comments.
#
# Entries are of the form:
# $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively. The third filed indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/usr/oracle/app/product/11.2.0/dbhome_1:Y
[2] oracle 用户 profile 文件中增加 SID 环境变量
[root@oracledb oracle]# vi /usr/oracle/.bash_profile
# 在文件末尾添加
export ORACLE_SID=orcl
[3] 创建启动 Oracle 的 Init 脚本
[root@oracledb oracle]# vi /etc/rc.d/init.d/oracle
# this is an example
#!/bin/bash
# oracle: Start/Stop Oracle Database 11g R2
#
# chkconfig: 345 90 10
# description: The Oracle Database is an Object-Relational Database Management System.
#
# processname: oracle
. /etc/rc.d/init.d/functions
LOCKFILE=/var/lock/subsys/oracle
ORACLE_HOME=/usr/oracle/app/product/11.2.0/dbhome_1
ORACLE_USER=oracle
case "$1" in
''start'')
if [ -f $LOCKFILE ]; then
echo $0 already running.
exit 1
fi
echo -n $"Starting Oracle Database:"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl start"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl start dbconsole"
touch $LOCKFILE
;;
''stop'')
if [ ! -f $LOCKFILE ]; then
echo $0 already stopping.
exit 1
fi
echo -n $"Stopping Oracle Database:"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl stop"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbshut"
su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl stop dbconsole"
rm -f $LOCKFILE
;;
''restart'')
$0 stop
$0 start
;;
''status'')
if [ -f $LOCKFILE ]; then
echo $0 started.
else
echo $0 stopped.
fi
;;
*)
echo "Usage: $0 [start|stop|status]"
exit 1
esac
exit 0
[4] 更改启动脚本权限
[root@oracledb oracle]# chmod 755 /etc/rc.d/init.d/oracle
[5] 启动 oracle 数据库
[root@oracledb oracle]# service oracle start
[6] 关闭 oracle 数据库
[root@oracledb oracle]# service oracle stop
[7] 设置 oracle 为开机自启动
[root@oracledb oracle]# chkconfig oracle on
[root@oracledb oracle]# chkconfig --list oracle
oracle 0:关闭 1:关闭 2:启用 3:启用 4:启用 5:启用 6:关闭
[root@oracledb oracle]#
[8] 重启电脑测试
原文地址:
CentOS Oracle11gR2 设置开机自启动
CentOS 6.3环境Oracle 11gR2数据库安装
CentOS 6.3环境Oracle 11gR2数据库安装 一、安装必要的操作系统安装包 建议的做法是在装操作系统的时候进行最大化安装,因为现在
centos 6.3环境oracle 11gr2数据库安装
一、安装必要的操作系统安装包
建议的做法是在装操作系统的时候进行最大化安装,因为现在的硬件对于最大化安装对数据库服务器的影响已经可以忽略不计了;所以进行最大化安装,以免给自己添加不必要的麻烦。
如果没有最大化安装,根据Oracle官方文档或安装进程中缺少包的提示,使用yum进行在线更新安装,确保服务器能够正常联网。如:
yum install gcc++
二、新建oracle用户以及用户组
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -g oinstall -G dba oracle (# /usr/sbin/usermod -g oinstall -G dba oracle)
# passwd oracle
三、创建安装目录
# mkdir -p /home/oracle/app/
# chown -R oracle:oinstall /home/oracle/app/
# chmod -R 775 /home/oracle/app/
四、修改相应的配置文件
root用户登录修改:
vim /etc/sysctl.conf
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
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
--------------------------------------
vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
五、oracle11g图形化安装
将Oracle11g安装包拷贝到对应的目录下;如/home/oracle/,在执行解压到Database文件夹下;
执行安装:$ /home/oracle/database/runInstaller
若在检查安装包的时候出现有失败的安装包,则再次用yum命令进行安装;安装包完成后,再重新进行数据库11g安装。
安装将结束时,根据提示在root下执行两脚本。
六、安装完成后,配置数据库监听以及本地数据库服务、防火墙
$ netmgr
$ netca
$ dbca
# setup配置对应的防火墙端口,或者直接关掉防火墙
pl/sql联通性测试...
七、ORACLE服务自动启动配置
1. root用户修改oratab
#vi /etc/oratab
xx:/opt/oracle/11.2.0:Y(N改为Y) --------xx为数据库实例名称
Esc:wq!保存
2.oracle用户修改dbstart,dbshut
#vi /opt/oracle/11.2.0/bin/dbstart
ORACLE_HOME_LISTNER=$ORACLE_HOME(原来为$1)
Esc:wq!保存
#vi /opt/oracle/11.2.0/bin/dbshut
ORACLE_HOME_LISTNER=$ORACLE_HOME(原来为$1)
Esc:wq!保存
3.root用户添加内容到 rc.local中
#vi /etc/rc.d/rc.local
把下面内容加入到文件中
su - oracle -c "lsnrctl start"
su - oracle -c "dbstart"
Esc:wq!保存
4.重新启动
#reboot
Oracle Linux 6.3 安装Oracle 11g R2 笔记
在CentOS 6.4下安装Oracle 11gR2(x64)
Oracle 11gR2 在VMWare虚拟机中安装步骤
Debian 下 安装 Oracle 11g XE R2
本文永久更新链接地址:
,CentOS 6.4下安装Oracle 11gR2
安装前须知:
- 内存(RAM)的最小要求是 1GB,建议 2GB 及以上。
- 虚拟内存 swap 建议:内存为 1GB~2GB 时建议swap大小为内存大小的 1.5 倍;内存为 2GB~16GB 时建议swap大小为内存的大小;内存超过 16GB 时swap保持16GB。
- 要求临时文件目录,如 /tmp 的磁盘空间至少 1GB。
- 磁盘空间要求:企业版为4.35GB的安装空间和1.7GB以上的数据文件空间;标准版为4.22GB的安装空间和1.5GB以上的数据文件空间。
- 需要 X window 图形界面。
- 需要 root 用户权限
本文安装环境:
- 操作系统 CentOS 6.4 2.6.32-358.el6.x86_64(desktop),2GB RAM,80GB 硬盘空间(4GB swap、100MB /boot、40GB /)
- 主机名 mophee, IP 192.168.80.19(静态)
- 环境:VMware Workstation 9.0
安装所需程序包(在root帐号下操作):
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.14-11.el6 (x86_64) or later unixODBC-2.2.14-11.el6.i686 or later unixODBC-devel-2.2.14-11.el6 (x86_64) or later unixODBC-devel-2.2.14-11.el6.i686 or later libXp
使用命令 yum list | grep 'package name' 或者 rpm -q 'package name' 或者 rpm -qa | grep 'package name' 查看程序包是否已经安装。
使用命令 yum install -y 'package name' 安装所缺的程序包,pdksh包除外。注意:要用yum安装32 bit的程序包,可先修改 vi /etc/yum.conf,添加一行:multilib_policy=all。oracle在检查环境的时候会要求安装i386,但CentOS 6.4光盘中32 bit的程序包都是i686,其实都一样,忽略这个差异问题应该不大(见下边的安装部分)。
yum install -y binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl sysstat libXp unixODBC unixODBC-devel
安装pdksh包(该程序包未被纳入CentOS的安装盘中):
使用命令:wget ftp://rpmfind.net/linux/centos/5.9/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm 将pdksh程序包下载到本地
使用命令 rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm 进行安装(注意:该程序包与ksh冲突,如果已经安装ksh,建议使用命令 rpm -e ksh-* 卸载)
创建所需的用户组(在root帐号下操作):
创建所需的帐号(在root帐号下操作):
使用命令 id oracle; 查看 oracle 帐号是否已存在,若未存在则使用如下命令进行创建
若oracle帐号已存在,则使用命令 usermod -a -G dba,oper oracle 将其加入群组 dba 和 oper中
修改内核参数(在root帐号下操作):
编辑内核参数配置文件 vi /etc/sysctl.conf,在该文件下修改或添加如下行:
再执行以下命令使以上配置立即生效:
修改系统资源限制(在root帐号下操作):
编辑系统资源限制配置文件 vi /etc/security/limits.conf,在该文件下添加如下行:
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240
今天关于CentOS卸载Oracle 11gR2(x64)的介绍到此结束,谢谢您的阅读,有关64位CentOS 5.6下Oracle 11gR2 安装笔记、CentOS 6 下 Oracle11gR2 设置开机自启动、CentOS 6.3环境Oracle 11gR2数据库安装、CentOS 6.4下安装Oracle 11gR2等更多相关知识的信息可以在本站进行查询。
本文标签: