概述
red hat enterprise 6安装
挂载光驱
mount -t auto -o ro /dev/cdrom /mnt
[root@oracledb Packages]# uname -r
2.6.32-71.el6.x86_64
[root@oracledb Packages]# uname -m
x86_64
[root@oracledb Packages]# cat /proc/version
Linux version 2.6.32-71.el6.x86_64 (mockbuild@x86-007.build.bos.redhat.com) (gcc version 4.4.4 20100726 (Red Hat 4.4.4-13) (GCC) ) #1 SMP Wed Sep 1 01:33:01 EDT 2010
需要的packages
The following or later version of packages for Oracle Linux 6, and Red Hat Enterprise Linux 6 must be installed:
binutils-2.20.51.0.2-5.11.el6 (x86_64)
compat-libcap1-1.10-1 (x86_64)
compat-libstdc++-33-3.2.3-69.el6 (x86_64) *
compat-libstdc++-33-3.2.3-69.el6.i686
gcc-4.4.4-13.el6 (x86_64)
gcc-c++-4.4.4-13.el6 (x86_64)
glibc-2.12-1.7.el6 (i686)
glibc-2.12-1.7.el6 (x86_64)
glibc-devel-2.12-1.7.el6 (x86_64)*
glibc-devel-2.12-1.7.el6.i686
ksh
libgcc-4.4.4-13.el6 (i686) --
libgcc-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6 (x86_64)
libstdc++-4.4.4-13.el6.i686 --
libstdc++-devel-4.4.4-13.el6 (x86_64)
libstdc++-devel-4.4.4-13.el6.i686 ---
libaio-0.3.107-10.el6 (x86_64)
libaio-0.3.107-10.el6.i686
libaio-devel-0.3.107-10.el6 (x86_64)
libaio-devel-0.3.107-10.el6.i686
make-3.81-19.el6
sysstat-9.0.4-11.el6 (x86_64)
Oracle ODBC Drivers
On Oracle Linux 6 and Red Hat Enterprise Linux 6
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
***使用yum 安装 依赖包
yum install binutils compat-libcap1 compat-libstdc++ compat-libstdc++-33-3.2.3-69.el6.i686 gcc-4.4.4-13.el6 gcc-c++-4.4.4-13.el6 glibc-2.12-1.7.el6 glibc-2.12-1.7.el6 glibc-devel-2.12-1.7.el6 glibc-devel-2.12-1.7.el6.i686 ksh libgcc-4.4.4-13.el6 libgcc-4.4.4-13.el6 libstdc++-4.4.4-13.el6 libstdc++-4.4.4-13.el6.i686 libstdc++-devel-4.4.4-13.el6 libstdc++-devel-4.4.4-13.el6.i686 libaio-0.3.107-10.el6 libaio-0.3.107-10.el6.i686 libaio-devel-0.3.107-10.el6 libaio-devel-0.3.107-10.el6.i686 make-3.81-19.el6 sysstat-9.0.4-11.el6 unixODBC-2.2.14-11.el6 unixODBC-2.2.14-11.el6.i686 unixODBC-devel-2.2.14-11.el6 unixODBC-devel-2.2.14-11.el6.i686
最后还需要安装libXp这个Library,这个一定要安装,否则安装Oracle时会出现java Exception。
# yum install libXp
安装过程中发现实际需要安装的包和官方的有区别
gcc-3.4.6
libaio-0.3.105 (i386)
glibc-2.3.4-2.41 (i686)
compat-libstdc++-33-3.2.3 (i386)
compat-libstdc++-33-3.2.3 (x86_64)
elfutils-libelf-devel-0.97
glibc-devel-2.3.4 (x86_64)
glibc-headers-2.3.4
gcc-c++-3.4.6
libaio-devel-0.3.105 (i386)
libaio-devel-0.3.105 (x86_64)
libgcc-3.4.6 (i386)
libstdc++-3.4.6 (i386)
libstdc++-devel-3.4.6 (x86_64)
unixODBC-2.2.11 (i386)
unixODBC-devel-2.2.11 (i386)
unixODBC-devel-2.2.11 (x86_64)
pdksh-5.2.14
实际配置yum 安装【oracle安装过程中会提示i386类包,忽略即可】
yum install gcc libaio glibc compat-libstdc++ elfutils-libelf-devel glibc-devel glibc-headers gcc-c++ libaio-devel libgcc libstdc++ unixODBC pdksh
vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0c:29:e2:e6:3a
NM_CONTROLLED=yes
ONBOOT=yes
IPADDR=192.168.1.12
BOOTPROTO=none
NETMASK=255.255.255.0
TYPE=Ethernet
GATEWAY=192.168.1.1
DNS1=192.168.1.1
IPV6INIT=no
USERCTL=no
创建用户设置主机名称
4 添加用户及目录
groupadd oinstall
groupadd dba
mkdir -p /u01/app/oracle/product/11g/db_1
useradd -g oinstall -G dba -d /u01/app/oracle oracle
passwd oracle 修改密码
chown -R oracle:oinstall /u01
vi /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=oracledb
vi /etc/hosts
# Do not remove the following line, orvarious programs
# that require network functionality willfail.
127.0.0.1 localhost
192.168.1.120 oracledb
* Configuring Kernel Parameters
/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
# /sbin/chkconfig boot.sysctl on
# /sbin/sysctl -p
/sbin/sysctl -a
/sbin/chkconfig boot.sysctl on
For example, where the oinstall group GID is 500:
# echo 500 > /proc/sys/vm/hugetlb_shm_group
After running this command, use vi to add the following text to /etc/sysctl.conf, and enable the boot.sysctl script to run on system restart:
vm.hugetlb_shm_group=500
Check Resource Limits for the Oracle Software Installation Users
/etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
修改文件/etc/selinux/config (可能要修改)
修改 vi /etc/pam.d/login (注意不能写错否则造成无法登录系统)
##session required /lib/security/pam_limits.so 实用32位
session required /lib64/security/pam_limits.so ##实用64位
session required pam_limits.so
Creating Required Directories
# mkdir -p /u01/app/
# chown -R oracle:oinstall /u01/app/
# chmod -R 775 /u01/app/
Configuring the oracle User's Environment
Set the default file mode creation mask (umask) to 022
su -oracle
echo $SHELL /bin/bash
设置/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
6.To run the shell startup script, enter one of the following commands
$ . ./.bash_profile
设置环境 临时路径
$ TMP=/u01/tmp
$ TMPDIR=/u01/tmp
$ export TMP TMPDIR
设置用户环境变量
ORACLE_BASE=/u01/app/oracle/
ORACLE_HOME=$ORACLE_BASE/product/11g/db_1
ORA_CRS_HOME=$ORACLE_BASE/crs
ORACLE_PATH=$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
LIBPATH=$LIBPATH:$ORA_CRS_HOME/lib:$ORACLE_HOME/lib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib:$ORACLE_HOME/jlib:$ORACLE_HOME/network/jlib:$ORACLE_HOME/JRE
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/lib32:/usr/local/lib:/usr/lib:/lib
NLS_LANG=AMERICAN_AMERICA.UTF8
NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
ORACLE_SID=oracledb
PATH=$ORACLE_HOME/bin:$PATH
ORACLE_OWNER=oracle
ORACLE_UNQNAME=$ORACLE_SID
export ORACLE_BASE ORACLE_HOME ORA_CRS_HOME ORACLE_PATH LIBPATH CLASSPATH ORACLE_SID PATH ORACLE_OWNR ORACLE_UNQNAME LD_LIBRARY_PATH NLS_LANG NLS_DATE_FORMAT
export LANG=en_US
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORACLE_TERM=xterm
export LD_BIND_NOW=1 ###需要加上oracle11g在该系统下面的bug
-----------------------------------------
建立临时路径
$ sudo mkdir /u01/tmp
$ sudo chmod a+wr /u01/tmp
$ unset ORACLE_HOME
$ unset TNS_ADMIN
---------------------------------------------------------
Creating the oraInst.loc File
If Oracle software was installed previously on the system, the oraInst.loc file might exist. If the file does exist, you do not have to create a file
To create the oraInst.loc file, follow these steps:
1.Switch the user to root:
$ su - root
2.Create the /etc/ directory if it does not exist:
# mkdir /etc/
3.Change the directory:
# cd /etc/
4.Use a text editor to create the oraInst.loc file, containing the following lines:
inventory_loc=u01/app/oraInventory
inst_group=oinstall
In this example, inventory_loc is the location of the Oracle inventory; and the inst_group parameter shows the name of the Oracle Inventory group (in this example, oinstall).
5.Enter the following commands to set the appropriate owner, group, and permissions on the oraInst.loc file:
# chown oracle:oinstall oraInst.loc
# chmod 664 oraInst.loc
***如果远程安装需要启动图像界面按照如下步骤
export DISPLAY=192.168.1.1:0.0 (IP为客户机ip即自己的pc电脑)
xhost +
----------------------------------------------
Preparing a Response File (可以通过 interactive mode 的方式安装后保存一个响应(response)文件) 其中密码信息不会被保存
1.Copy the response file from the response file directory to a directory on your system:
$ cp /directory_path/response/response_file.rsp local_directory
In this example, directory_path is the path to the database directory on the installation media. If you copy the software to a hard drive, then edit the file in the response directory.
2.Open the response file in a text editor:
$ vi /local_dir/response_file.rsp
4.Change the permissions on the file to 700(因为这个文件 含有秘密信息):
$ chmod 700 /local_dir/response_file.rsp
--------------------------------------------------------
再次校验 Installing the Oracle Pre-Install or Oracle Validated RPM with ULN Support
(针对ORACLE LINUX)
---------------------------------------------------------------------------------
$ /directory_path/runInstaller [-silent] [-noconfig] -ignoreSysPrereqs
-responseFile responsefilename
./runInstaller -silent -noconfig -ignorePrereq -responseFile
查看下logs安装日志
-----------------------
Running Net Configuration Assistant Using a Response File
oracle@oracledb lib]$ $ORACLE_HOME/bin/netca -silent -responsefile /u01/app/cfg.responses/netca.rsp
****DISPLAY environment variable not set!
Oracle Net Configuration Assistant is a GUI tool
which requires that DISPLAY specify a location
where GUI tools can display.
Set and export DISPLAY, then re-run.
换种方式 :
[oracle@oracledb lib]$ $ORACLE_HOME/bin/netca /silent /responsefile=/u01/app/cfg.responses/netca.rsp
UnsatisfiedLinkError exception loading native library: njni11
java.lang.UnsatisfiedLinkError: /u01/app/oracle/product/11g/db_1/lib/libnjni11.so: /u01/app/oracle/product/11g/db_1/lib/libclntsh.so.11.1: undefined symbol: nnfyboot
java.lang.UnsatisfiedLinkError: jniGetOracleHome
at oracle.net.common.NetGetEnv.jniGetOracleHome(Native Method)
at oracle.net.common.NetGetEnv.getOracleHome(Unknown Source)
at oracle.net.ca.NetCALogger.getOracleHome(NetCALogger.java:230)
at oracle.net.ca.NetCALogger.initOracleParameters(NetCALogger.java:215)
at oracle.net.ca.NetCALogger.initLogger(NetCALogger.java:130)
at oracle.net.ca.NetCA.main(NetCA.ja
va:404)
最后
以上就是俏皮鲜花为你收集整理的oracle11g redhat6的全部内容,希望文章能够帮你解决oracle11g redhat6所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复