实测操作系统:redhat Linux 6.3 64位(内核:2.6.32-279.el6.x86_64)Oracle版本:Oracle 11g 64位
检查安装环境
查看内存和交换分区
# free
查看内核版本
# uname -r
2.6.32-71.el6.i686
1、安装RPM
binutils-2.20.51.0.2-5.11.el6.i686.rpm
cloog-ppl-0.15.7-1.2.el6.i686.rpm
compat-gcc-34-3.4.6-19.el6.i686.rpm
compat-gcc-34-c++-3.4.6-19.el6.i686.rpm
compat-gcc-34-g77-3.4.6-19.el6.i686.rpm
compat-glibc-headers-2.5-46.2.i686.rpm
compat-libf2c-34-3.4.6-19.el6.i686.rpm
compat-libgcc-296-2.96-144.el6.i686.rpm
compat-libstdc++-296-2.96-144.el6.i686.rpm
compat-libstdc++-33-3.2.3-69.el6.i686.rpm
cpp-4.4.4-13.el6.i686.rpm
elfutils-libelf-0.148-1.el6.i686.rpm
elfutils-libelf-devel-0.148-1.el6.i686.rpm
gcc-4.4.4-13.el6.i686.rpm
gcc-c++-4.4.4-13.el6.i686.rpm
gcc-gfortran-4.4.4-13.el6.i686.rpm
gcc-java-4.4.4-13.el6.i686.rpm
glibc-2.12-1.7.el6.i686.rpm
glibc-common-2.12-1.7.el6.i686.rpm
glibc-devel-2.12-1.7.el6.i686.rpm
glibc-headers-2.12-1.7.el6.i686.rpm
glibc-utils-2.12-1.7.el6.i686.rpm
kernel-2.6.32-71.el6.i686.rpm
kernel-headers-2.6.32-71.el6.i686.rpm
ksh-20100621-2.el6.i686.rpm
libaio-0.3.107-10.el6.i686.rpm
libaio-devel-0.3.107-10.el6.i686.rpm
libgcc-4.4.4-13.el6.i686.rpm
libstdc++-4.4.4-13.el6.i686.rpm
libstdc++-devel-4.4.4-13.el6.i686.rpm
make-3.81-19.el6.i686.rpm
mpfr-2.4.1-6.el6.i686.rpm
pdksh-5.2.14-1.src.rpm
ppl-0.10.2-11.el6.i686.rpm
sysstat-9.0.4-11.el6.i686.rpm
unixODBC-2.2.14-11.el6.i686.rpm
unixODBC-devel-2.2.14-11.el6.i686.rpm
安装方法rpm –ivh *
2、修改/f
添加如下内容
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmmni = 4096
kernel.shmmax = 536870912
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
---------------------------------------------------
可能需要的设置
fs.aio-max-nr =
fs.file-max =
---------------------------------------------------
使修改立刻生效
# sysctl -p
3、关闭selinux【需重启】
怎样测试oracle11g安装完成
vi /etc/selinux/config 将SELINUX=enforcing 改成SELINUX=disabled 创建oracle目录、用户、用户组、授权
3、创建用户组、用户
# groupadd oinstall
# groupadd dba
# useradd –m –g oinstall –G dba oracle
# passwd oracle
创建目录
# mkdir /home/db
授权
chown –R oracle:oinstall /home/db
chmod –R 777 /home/db
为oracle用户设置环境变量
4、修改/home/oracle/bash_profile
添加如下内容
ORACLE_SID=orcl
ORACLE_BASE=/home/db/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export ORACLE_SID ORACLE_BASE ORACLE_HOME
PATH=$PATH:/$ORACLE_HOME/bin:$HOME/bin
export PATH
5、修改/etc/f
添加如下内容
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
6、修改/etc/pam.d/login
添加如下内容
session required /lib/security/pam_limits.so
7、修改/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
安装oracle11g
8、使用oracle用户登录通过命令进入oracle11g软件存放目录,运行./ runInstaller 图形安装界面可以参考《Oracle_11g_R2安装手册(图文教程)》
9、以root用户执行如下两条脚本
sh /home/db/oraInventory/orainstRoot.sh
Changing permissions of /home/db/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /home/db/oraInventory to oinstall.
The execution of the script is complete.
sh /home/db/oracle/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /home/db/oracle/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.
10、配置
11、启动
[oracle@sqc ~]$ lsnrctl start
LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 25-OCT-2013 20:59:13
Copyright (c) 1991, 2009, Oracle. All rights reserved.
Starting /home/db/oracle/product/11.2.0/dbhome_1/bin/tnslsnr: TNSLSNR for Linux: Version 11.2.0.1.0 - Production
System parameter file is
/home/db/oracle/product/11.2.0/dbhome_1/network/a
Log messages written to /home/db/oracle/diag/tnslsnr/sqc/listener/l Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.254)(PORT=1521)))
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.254)(PORT=1521))) STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
Start Date 25-OCT-2013 20:59:14
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File
/home/db/oracle/product/11.2.0/dbhome_1/network/a
Listener Log File /home/db/oracle/diag/tnslsnr/sqc/listener/l Listening
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.254)(PORT=1521)))
The listener supports no services
The command completed successfully
12、启动实例
[oracle@sqc ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production on Fri Oct 25 21:03:23 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
SQL> conn / as sysdba
Connected to an idle instance.
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论