Oracle Enterprise Linux 64 位安装Oracle 11g
来源:互联网 发布:交付软件需提供 编辑:程序博客网 时间:2024/05/21 19:22
参考:http://www.oracle.com/technetwork/cn/topics/smiley-11gr1-install-098235-zhs.html
在上面链接中:在配置linux内核参数时缺少编辑shmmax和shmmall:
kernel.shmall = 2097152
kernel.shmmax = 536870912
下面开始安装oracle 11g
第 1 部分:安装 Oracle Enterprise Linux 5
参考上面链接
安装必需的软件包版本(或更高):64位
运行下面的命令,验证所需的程序包已安装到您的系统上:
ps:去掉glibc-devel后面的数字
rpm -q --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" 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 sysstat
第 2 部分:针对 Oracle 配置 Linux
1、创建 Oracle 组和用户账户
# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba
# /usr/sbin/useradd -m -g oinstall -G dba oracle
# id oracle
uid=501(oracle) gid=502(oinstall) groups=502(oinstall),503(dba)
2、设置 oracle 帐户的口令:
passwd oracle
3、以 root 用户身份执行以下命令来创建目录:
mkdir -p /u01/app/oracle
chown -R oracle:oinstall /u01/app
chmod -R 775 /u01/app
4、配置 Linux 内核参数
vi /etc/sysctl.conf 添加如下内容(shmall 和shmmax已经存在,修改值即可 (内核参数配置也可以使用重定向追加写入))
kernel.shmall = 2097152
kernel.shmmax = 536870912
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=4194304
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=262144
注意,OEL 5 已经为 kernel.shmall 和 kernel.shmmax 定义了值。如果默认值等于或大于要求值,则使用默认值。
5、为 oracle 用户设置 Shell 限制
Oracle 建议对每个 Linux 帐户可以使用的进程数和打开的文件数设置限制。要进行这些更改,以 root 用户的身份执行下列命令:
cat >> /etc/security/limits.conf <<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login <<EOF
session required /lib/security/pam_limits.so
EOF
6、修改 bash 和 ksh 的默认配置文件以及 cshell 的默认登录脚本。
cat >> /etc/profile <<EOF
if [ \$USER = "oracle" ]; then
if [ \$SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
EOF
cat >> /etc/csh.login <<EOF
if ( \$USER == "oracle" ) then
limit maxproc 16384
limit descriptors 65536
umask 022
endif
EOF
第 3 部分:安装 Oracle
#创建目录用来存放oracle文件
[oracle@localhost ~]$ mkdir 11gR2_db
#将oracle zip文件放入并赋予权限(oracle:oinstall 775):
[root@localhost usr]# mv linux.x64_11gR2_database_* /home/oracle/11gR2_db/
[root@localhost 11gR2_db]# chown -R oracle:oinstall *
[root@localhost 11gR2_db]# chmod -R 775 *
#切换到oracle用户
[root@localhost 11gR2_db]# su - oracle
#进入zip目录并解压
[oracle@localhost 11gR2_db]$ cd 11gR2_db/
[oracle@localhost 11gR2_db]$ unzip linux.x64_11gR2_database_1of2.zip
[oracle@localhost 11gR2_db]$ unzip linux.x64_11gR2_database_2of2.zip
(ps:如果文件自解压一个,执行下一步安装时会报错:请检查 oraparam.ini 并指定有效的源路径。)
#启动oracle安装程序
[oracle@localhost 11gR2_db]$ ./database/runInstaller
#如果出现中文乱码可以使用linux中的jre启动,而不是用oracle自带jre启动,或者将编码改为英文
[oracle@localhost 11gR2_db]$ ./database/runInstaller -jreLoc /usr/java/jdk1.8.0_131/jre/
(ps:在ssh工具中无法启动图形安装界面)
启动图形界面之后根据自己的需求选择对应的配置安装.
第 4 部分:配置环境变量
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi .bash_profile
添加:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1/
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
#sqlplus luanma
#export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
#立即生效
[oracle@localhost ~]$ source .bash_profile
#启动sqlplus
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Fri May 26 17:11:35 2017
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ps:启动oracle时报错了:Oracle报错 ORA-01078
安装oracle后实例不存在:Oracle报错 ORA-01078
ORA-28000: the account is locked
解决办法:使用dba登录sqlplus:
[oracle@localhost ~]$ sqlplus / as sysdba
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin
#listener.oraSID_LIST_LISTENER = (SID_LIST = (SID_DESC = (GLOBAL_DBNAME = orcl) (ORACLE_HOME = /u01/app/oracle/product/11.2.0/dbhome_1) (SID_NAME = orcl) ) )LISTENER = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.100)(PORT = 1521)) )ADR_BASE_LISTENER = /u01/app/oracle
#tnsnames.oraLISTENER_ORCL =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.100)(PORT = 1521))ORCL = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.100)(PORT = 1521)) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) )
- Oracle Enterprise Linux 64 位安装Oracle 11g
- Oracle Enterprise Linux 5.5(64位)部署安装Oracle 11g R2 RAC(11.2.0.1)教程
- RedHat enterprise linux 5.3 X64下安装64位Oracle 11g (未测试)
- Red Hat Enterprise Linux 5(32Bit/64Bit)安装Oracle(10g/11g)!!!
- Redhat Enterprise Linux 6.3 x86_64 安装oracle 11g R2
- Oracle 11g for Red Hat Enterprise Linux 6安装
- Rad Hat Enterprise Linux 6.0安装Oracle 11g
- Linux下Oracle 11G r2 (64位)安装
- Linux下Oracle 11G r2 (64位)安装
- Redhat Enterprise 5 安装Oracle 11g
- Oracle Enterprise Linux 4.0下安装oracle 10G
- Oracle Linux(64位)安装64位Oracle 11g遇到ins_ctx.mk问题
- 在VMware虚拟机的Red Hat Enterprise Linux 6.5 64bit安装oracle 11g
- ubuntu 64位 安装 oracle 11G
- Red Hat Enterprise Linux 5安装Oracle(10g/11g)
- Red Hat Enterprise Linux 5 下安装 Oracle 10g
- Red Hat Enterprise Linux 4 下安装 Oracle 10g
- RedHat enterprise linux 5下安装 oracle 10g
- java wait()和sleep()的区别
- 对象权限+授予对象权限
- git 上传项目时提示Permission denied (publickey).的解决
- 微信小程序开发:各种页面特效集合(持续更新)
- JAVA设计模式初探之装饰者模式
- Oracle Enterprise Linux 64 位安装Oracle 11g
- No 'Access-Control-Allow-Origin' header is present on the requested resource.'Ajax跨域访问解决方案
- 深入理解Android消息处理系统——Looper、Handler、Thread
- hadoop异常: Operation category READ is not supported in state standby
- 1.13.1CMOS摄像头驱动1_画框架
- Java的四种引用
- 常用命令
- mysql中的if函数小总
- python之SMTP邮件的发送与接收