Linux x64系统上安装 oracle 11g R2 x64
1、首先到官网上下载oracle 11g x64位软件包
下载地址:
http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_1of2.zip
http://download.oracle.com/otn/linux/oracle11g/R2/linux.x64_11gR2_database_2of2.zip
2、安装包检测及安装
[root@struggle ~]# rpm -q binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc- gcc-c++ libaio-devel libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel pdksh
其中要安装几个32位的包:
binutils
compat-libstdc++
compat-libstdc++(32 bit)
elfutils-libelf
elfutils-libelf-devel
gcc
gcc-c++
glibc
glibc(32 bit)
glibc-common
glibc-devel
glibc-devel(32 bit)
libaio
libaio(32 bit)
libaio-devel
libgcc
libgcc (32 bit)
libstdc++
libstdc++ (32 bit)
libstdc++-devel
make
sysstat
3、查看内在及swap,对于服务器来说,肯定是没有问题的(如果安装系统时分了swap分区则可以免去这一步)
[root@struggle ~]# grep MemTotal /proc/meminfo
[root@struggle ~]# grep SwapTotal /proc/meminfo
(1)创建/home/swap分区文件。文件的大小是5120000个block,1个block为1K。
dd if=/dev/zero of=/home/swap bs=1024 count=5120000
(2)把这个分区变成swap分区。
mkswap /home/swap
(3)把它加到fstab里面
echo "/home/swap swap swap defaults 0 0" >> /etc/fstab
4、配置内核
[root@struggle ~]# vim /etc/sysctl.conf
# Kernel paramaters required by Oracle 11gR1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
保存并使之生效: [root@struggle ~]# /sbin/sysctl -p
如果有如下提示错误,忽略!
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key
error: "net.bridge.bridge-nf-call-iptables" is an unknown key
error: "net.bridge.bridge-nf-call-arptables" is an unknown key
注意: kernel.shmmax's 的值是物理内存的一半。
5、对oracle 帐号进行资源限制
[root@struggle ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
6、登录认证配置pam模块
[root@struggle ~]# vim /etc/pam.d/login
session required pam_limits.so
session required /lib/security/pam_limits.so (如果是32位系统则要加上这一句)
7、为oracle用户在bash和ksh中设定资源限制编辑文件
[root@struggle ~]# vim /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
8、 创建操作系统用户,作为软件安装和支持组的拥有者
[root@struggle ~]# groupadd oinstall
[root@struggle ~]# groupadd dba
[root@struggle ~]# useradd -g oinstall -G dba oracle
[root@struggle ~]# passwd oracle
9、创建软件安装目录
[root@struggle ~]# mkdir -p /usr/u01/app/
[root@struggle ~]# chown -R oracle:oinstall /usr/u01/
[root@struggle ~]# chmod -R 755 /usr/u01/
10、设置环境变量
[root@struggle ~]# vi /home/oracle/.bash_profile
# .bash_profile # Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi # User specific environment and startup programs PATH=$PATH:$HOME/bin export PATH TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/usr/u01/app; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
umask 022
11、将下载的oracle 11g 安装包解压到/home/oracle目录下
[root@struggle ~]# unzip linux.x64_11gR2_database_1of2.zip -d /home/oracle [root@struggle ~]# unzip linux.x64_11gR2_database_2of2.zip -d /home/oracle
12、进入/home/oracle/database目录下检查文件是否都在
[root@struggle database]# cd /home/oracle/database
[root@struggle database]# ls -al
总用量 44
drwxr-xr-x. 8 root root 4096 8月 21 2009 .
drwx------. 5 oracle oinstall 4096 12月 5 14:19 ..
drwxr-xr-x. 12 root root 4096 8月 17 2009 doc
drwxr-xr-x. 4 root root 4096 8月 15 2009 install
drwxrwxr-x. 2 root root 4096 8月 15 2009 response
drwxr-xr-x. 2 root root 4096 8月 15 2009 rpm
-rwxr-xr-x. 1 root root 3226 8月 15 2009 runInstaller
drwxrwxr-x. 2 root root 4096 8月 15 2009 sshsetup
drwxr-xr-x. 14 root root 4096 8月 15 2009 stage
-rw-r--r--. 1 root root 5402 8月 18 2009 welcome.html
13、关闭防火墙
[root@struggle database]# service iptables stop
14、安装,用oracle用户登陆
[root@struggle database]# exit
[struggle@struggle ~]$ su - oracle
[oracle@struggle ~]$ cd /home/oracle/database/
[oracle@struggle ~]$./runInstaller -jreLoc /usr/lib/jvm/java-6-sun/jre (我是用自己的JDK安装)
第一步:填写email信息,以便得到支持(需要联网)

第二步:选择创建并配置一个数据库

第三步:选择服务端(看自己情况)

第四步:选择单实例数据库安装

第五步:选择自定义安装

第六步:选择产品语言

第七步:选择要安装的版本

第八步:选择安装路径(配置环境变量进的路径)
第九步:选择数据库实例名:orcl
第十步:选择数据字符集:ZHS16GBK
一路默认安装下去,到十七步的时候oracle检测必须组件,选择ignore all,这样选择安装完oracle后,oracle是可以正常工作的。
机器太卡,传图片太慢。。。
安装完成后进入sqlplus
SQL> sqlplus/nolog
SQL> conn /as sysdba
SQL> startup
配置开机启动:
/usr/u01/app/product/11.2.0/dbhome_1/bin下创建一个开机启动脚本:
[oracle@struggle dbhome_1]$ vim /usr/u01/app/product/11.2.0/dbhome_1/bin/oracledb
#!/bin/bash
## /etc/init.d/oracledb
## Run-level Startup script for the Oracle Listener and Instances
# It relies on the information on /etc/oratab ORACLE_BASE=/usr/u01/app
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_OWNR=oracle
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl
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"
touch /var/lock/oracle
echo "OK"
;;
stop)
# Oracle listener and instance shutdown
echo -n "Shutdown Oracle: "
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
修改脚本为可执行的:
[root@struggle ~]# chmod a+x /usr/u01/app/product/11.2.0/dbhome_1/bin/oracledb
创建连接:
[root@struggle ~]# ln -s /usr/u01/app/product/11.2.0/dbhome_1/bin/oracledb /etc/rc.d/init.d/oracledb
授权:
[root@struggle ~]# chmod 755 /etc/rc.d/init.d/
添加服务:
[root@struggle ~]# chkconfig --add oracledb
修改oracle启动配置
[root@struggle ~]# vim /etc/oratab
orcl:/usr/u01/app/product/11.2.0/dbhome_1:Y
把N改为Y。
测试:
service oracledb stop
service oracledb start
成功!
Linux x64系统上安装 oracle 11g R2 x64的更多相关文章
- Oracle Linux 6.3下安装Oracle 11g R2(11.2.0.3)
本文主要描写叙述了在Oracle Linux 6.3下安装Oracle 11gR2(11.2.0.3).从Oracle 11g開始,Oracle官方站点不再提供其Patch的下载链接,须要使用Meat ...
- 在 Oracle Linux 6.5 上安装 Oracle 11g 单实例数据库
Checking the Hardware Requirements 系统必须满足下面最小的硬件要求 Memory Requirements Minimum: 1 GB of RAMRecommend ...
- RHEL6.7 x64双节点安装Oracle 11g r2 RAC
基础环境 使用两台HP DL580服务器作为RAC节点,存储使用IBM V7000.具体环境如下: 设备 用途 IP地址 磁盘空间 HP DL580 RAC节点01 RAC01-pub:116.1.1 ...
- linux上安装Oracle 11g R2 标准版 64位
一.Oracle 安装前的准备 检查一下包,必须全部安装: binutils-2.20.51.0.2-5.43.el6.x86_64 compat-libstdc++-296-2.96-144.el6 ...
- Redhat Linux 下安装Oracle 11g R2
能够下载:http://download.csdn.net/detail/ykh554541184/8086647文档方便查阅 官方文档:http://docs.oracle.com/cd/E1188 ...
- Red Hat Enterprise Linux 6上安装Oracle 11G(11.2.0.4.0)缺少pdksh包的问题
RHEL 6上安装Oracle 11G警告缺少pdksh包 前言 相信很多刚刚接触学习Oracle的人,在RHEL6上安装11.2.0.3 or 11.2.0.4这两个版本的时候, 都遇到过先决条件检 ...
- CentOS 7静默安装Oracle 11g R2数据库软件
之前安装Oracle 11g R2数据库软件都是建立在图形界面上的,不过现在大部分服务器上都没有安装图形界面.图形界面安装较为方便,安装选项清晰,步骤明确,但Oracle还支持另一种安装方式,就是通过 ...
- centos 安装oracle 11g r2(一)-----软件安装
centos 安装oracle 11g r2(一)-----软件安装 1.进入管理员权限 [anzerong@localhost ~]# su - root password [root@localh ...
- 在Windows 10上安装Oracle 11g数据库出现的问题及解决
在Windows 10上安装Oracle 11g数据库,并且很多次出现过:当安装的进度条进行到快要结束的时候弹出一个提示框.如下: [Java(TM)2 Platform Standard Editi ...
随机推荐
- TensorFlow 常用的函数
TensorFlow 中维护的集合列表 在一个计算图中,可以通过集合(collection)来管理不同类别的资源.比如通过 tf.add_to_collection 函数可以将资源加入一个或多个集合中 ...
- 2018即将过去,立个flag
过去的2018 自己有没有值得有意义的地方呢? 没有, 自己有没有认识新的异性朋友呢? 没有, 自己都在忙啥呢? 敲代码,然后发现敲坏了一个键盘,换了HHKB,一个字舒服,还有就是通宵把一部电视剧看完 ...
- python魔法方法-反射运算和增量运算
反射运算 什么是反射运算符,其实就是反转了两个对象,下面先看一个普通运行符的实现: class Foo(object): def __init__(self, x): self.x = x def _ ...
- windows安全配置
比较重要的 1. 更改默认administrator用户名,密码复杂些 2. 开启防火墙(设置入站规则,入站出站默认全部阻止) 3. 杀毒软件 4. 删除默认共享(net share C$ /del) ...
- Codeforces 932G Palindrome Partition 回文树+DP
题意:给定一个串,把串分为偶数段 假设分为$s_1,s_2,s_3....s_k$ 求满足$ s_1=s_k,s_2=s_{ k-1 }... $的方案数模$10^9+7$ $|S|\leq 10^6 ...
- GitLab 安装(推荐)
参考文档: https://about.gitlab.com/installation/#centos-7 基础环境 [root@node1 ~]# uname -r -.el7.x86_64 [ro ...
- webstorm安装教程
之前有些一些破解的,但是独独忘记了安装的这个教程,现在补上:见下: 先来一官方的解释:WebStorm是JetBrains 推出的一款强大的HTML5编辑工具,拥有丰富的代码快速编辑,可以智能的补全代 ...
- Codeforces Round #532 (Div. 2)
Codeforces Round #532 (Div. 2) A - Roman and Browser #include<bits/stdc++.h> #include<iostr ...
- 关于Linux的Putty连接访问
1.打开putty 2.点击Connection->SSH->Auth->Brower 3.输入root@域名,点击open 4.进入成功
- 8-06. 畅通project之局部最小花费问题(35)(最小生成树_Prim)(ZJU_PAT)
题目链接:http://pat.zju.edu.cn/contests/ds/8-06 某地区经过对城镇交通状况的调查.得到现有城镇间高速道路的统计数据,并提出"畅通project" ...