oracle安装.docx
《oracle安装.docx》由会员分享,可在线阅读,更多相关《oracle安装.docx(22页珍藏版)》请在冰豆网上搜索。
oracle安装
OracleDatabase10gRelease2(10.2.0.1.0)Enterprise/StandardEditionforLinuxx86-64
oraclelinux6.0安装oracle10gR2(2012-06-2019:
07:
07)转载▼
标签:
oraclelinux安装it
Oraclelinux6.0installoracle10gdatabase
oracle是一个可动态配置的系统,无须对内核进行重新链接。
但是oracle在安装和配置时却需要重新链接。
为了安装oracle需要事先安装连接器。
web用户需要访问oracle数据库,需要使用CGI,即通用网关接口(CommongatewayInterface)
安装oracle软件前,你的机子最好是静态IP。
首先修改系统release参数:
[因为oracle的官方只支持到RHEL4为止,所以要修改版本说明。
把RedHatEnterpriseLinuxServerrelease6.0(Santiago)这一行注释掉,前面加上一行redhat-4。
当然oracle安装完成后要修改回来。
redhat-4必须为redhat-release文件的第一行,否则安装时还会报警告。
∙修改/etc/redhat-release
如果你的LINUX系统是redhat-5版本的话,请进入/etc/redhat-release打开,将RedHat将其中的内容RedHatEnterpriseLinuxServerrelease5(Tikanga)修改为RedHatEnterpriseLinuxASrelease4(NahantUpdate4)
在此目录下找到此文件
/etc/selinux/config,找到这段:
#ThisfilecontrolsthestateofSELinuxonthesystem.
#SELINUX=cantakeoneofthesethreevalues:
#enforcing-SELinuxsecuritypolicyisenforced.
#permissive-SELinuxprintswarningsinsteadofenforcing.
#disabled-SELinuxisfullydisabled.
SELINUX=enforcing
把SELINUX=enforcing注释掉:
#SELINUX=enforcing,然后新加一行为:
SELINUX=disabled
∙修改/etc/redhat-release
如果你的LINUX系统是redhat-5版本的话,请进入/etc/redhat-release打开,将RedHat将其中的内容RedHatEnterpriseLinuxServerrelease5(Tikanga)修改为RedHatEnterpriseLinuxASrelease4(NahantUpdate4)
在此目录下找到此文件
/etc/selinux/config,找到这段:
#ThisfilecontrolsthestateofSELinuxonthesystem.
#SELINUX=cantakeoneofthesethreevalues:
#enforcing-SELinuxsecuritypolicyisenforced.
#permissive-SELinuxprintswarningsinsteadofenforcing.
#disabled-SELinuxisfullydisabled.
SELINUX=enforcing
把SELINUX=enforcing注释掉:
#SELINUX=enforcing,然后新加一行为:
SELINUX=disabled
保存,关闭。
编辑/etc/sysconfig/selinux,找到:
#ThisfilecontrolsthestateofSELinuxonthesystem.
#SELINUX=cantakeoneofthesethreevalues:
#enforcing-SELinuxsecuritypolicyisenforced.
#permissive-SELinuxprintswarningsinsteadofenforcing.
#disabled-SELinuxisfullydisabled.
SELINUX=enforcing
如果SELINUX已经是SELINUX=disabled,那么就不用改了,否则就把SELINUX=enforcing注释掉,新加一行:
SELINUX=disabled
保存,退出。
在/etc/ld.so.conf中加入
/u01/app/oracle/product/11.2.0/db_1/lib
/usr/local/lib
这两行。
然后执行
#/sbin/ldconfig-v。
检查系统安装包,rpm-qa|grep****(包名)make-3.79.1,gcc-3.2.3-34,glibc-2.3.2-95.20,compat-db-4.0.14-5,compat-gcc-7.3-2.96.128,compat-gcc-c++-7.3-2.96.128,compat-libstdc++-7.3-2.96.128,compat-libstdc++-devel-7.3-2.96.128,openmotif21-2.1.30-8,setarch-1.3-1,unixODBC
[root@xiepaup~]#
[root@xiepaup~]#rpm-qa|grepmake
automake-1.11.1-1.2.el6.noarch
make-3.81-19.el6.i686
[root@xiepaup~]#rpm-qa|grepgcc-
libgcc-4.4.4-13.el6.i686
gcc-c++-4.4.4-13.el6.i686
gcc-4.4.4-13.el6.i686
gcc-gfortran-4.4.4-13.el6.i686
[root@xiepaup~]#rpm-qa|grepglibc-
glibc-headers-2.12-1.7.el6.i686
glibc-2.12-1.7.el6.i686
glibc-common-2.12-1.7.el6.i686
glibc-devel-2.12-1.7.el6.i686
[root@xiepaup~]#rpm-qa|grepcompat-
xz-lzma-compat-4.999.9-0.3.beta.20091007git.el6.i686
lpg-java-compat-1.1.0-4.1.el6.noarch
geronimo-specs-compat-1.0-3.4.M2.el6.noarch
rarian-compat-0.8.1-5.1.el6.i686
[root@xiepaup桌面]#rpm-qa|grepunix
unixODBC-2.2.14-11.el6.i686
[root@xiepaup~]#rpm-qa|grepcompat-db
[root@xiepaup~]#rpm-qa|grepcompat-gcc
[root@xiepaup~]#rpm-qa|grepcompat-libst
[root@xiepaup~]#rpm-qa|grepopenmotif
[root@xiepaup~]#rpm-qa|grepsetarch
[root@xiepaup~]#
[root@xiepaup桌面]#yuminstallcompat*-y
Loadedplugins:
refresh-packagekit,rhnplugin
ThissystemisnotregisteredwithULN.
ULNsupportwillbedisabled.
SettingupInstallProcess
ResolvingDependencies
-->Runningtransactioncheck
…..................................................................................................................
Installed:
compat-db.i6860:
4.6.21-15.el6
compat-db42.i6860:
4.2.52-15.el6
compat-db43.i6860:
4.3.29-15.el6
compat-expat1.i6860:
1.95.8-8.el6
compat-gcc-34.i6860:
3.4.6-19.el6
compat-gcc-34-c++.i6860:
3.4.6-19.el6
compat-gcc-34-g77.i6860:
3.4.6-19.el6
compat-glibc.i6861:
2.5-46.2.0.1
compat-glibc-headers.i6861:
2.5-46.2.0.1
compat-libcap1.i6860:
1.10-1
compat-libf2c-34.i6860:
3.4.6-19.el6
compat-libgcc-296.i6860:
2.96-144.el6
compat-libgfortran-41.i6860:
4.1.2-39.el6
compat-libstdc++-296.i6860:
2.96-144.el6
compat-libstdc++-33.i6860:
3.2.3-69.el6
compat-libtermcap.i6860:
2.0.8-49.el6
compat-openldap.i6860:
2.4.19_2.3.43-15.el6
compat-readline5.i6860:
5.2-17.1.el6
Complete!
[root@xiepaup桌面]#yuminstallopenmotif*setarch*-y
Loadedplugins:
refresh-packagekit,rhnplugin
ThissystemisnotregisteredwithULN.
ULNsupportwillbedisabled.
SettingupInstallProcess
Packageutil-linux-ng-2.17.2-6.el6.i686alreadyinstalledandlatestversion
ResolvingDependencies
-->Runningtransactioncheck
…........................................................................................................................................
Installed:
openmotif.i6860:
2.3.3-1.el6openmotif-devel.i6860:
2.3.3-1.el6
openmotif22.i6860:
2.2.3-19.el6
DependencyInstalled:
fontconfig-devel.i6860:
2.8.0-3.el6freetype-devel.i6860:
2.3.11-5.el6
libICE-devel.i6860:
1.0.6-1.el6libSM-devel.i6860:
1.1.0-7.1.el6
libX11-devel.i6860:
1.3-2.el6libXau-devel.i6860:
1.0.5-1.el6
libXdmcp-devel.i6860:
1.0.3-1.el6libXext-devel.i6860:
1.1-3.el6
libXft-devel.i6860:
2.1.13-4.1.el6libXmu-devel.i6860:
1.0.5-1.el6
libXp.i6860:
1.0.0-15.1.el6libXp-devel.i6860:
1.0.0-15.1.el6
libXrender-devel.i6860:
0.9.5-1.el6libXt-devel.i6860:
1.0.7-1.el6
libjpeg-devel.i6860:
6b-46.el6libpng-devel.i6862:
1.2.44-1.el6
libxcb-devel.i6860:
1.5-1.el6xorg-x11-proto-devel.noarch0:
7.4-35.el6
zlib-devel.i6860:
1.2.3-25.el6
Complete!
检查系统最低要求
检查总的物理内存:
(至少1024MB)
检查交换区大小:
(大小为物理内存1.5倍,若物理内存大于2048MB,可以和物理内存一样大).
检查剩余磁盘空间:
(至少为600MB)。
[root@xiepaup桌面]#
[root@xiepaup桌面]#grepMemTotal/proc/meminfo
MemTotal:
2071180kB
[root@xiepaup桌面]#grepSwapTotal/proc/meminfo
SwapTotal:
4800504kB
[root@xiepaup桌面]#df-k/tmp
文件系统1K-块已用可用已用%挂载点
/dev/sda36719449681291885565201213%/
修改系统参数
[root@xiepaup桌面]#vi/etc/sysctl.conf
kernel.shmall=2097152
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.sem=25032000100128
fs.file-max=65536
net.ipv4.ip_local_port_range=102465000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
[root@xiepaup/]#/sbin/sysctl-p
net.ipv4.ip_forward=0
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.default.accept_source_route=0
kernel.sysrq=0
kernel.core_uses_pid=1
net.ipv4.tcp_syncookies=1
error:
"net.bridge.bridge-nf-call-ip6tables"isanunknownkey
error:
"net.bridge.bridge-nf-call-iptables"isanunknownkey
error:
"net.bridge.bridge-nf-call-arptables"isanunknownkey
kernel.shmall=2097152
kernel.shmmax=2147483648
kernel.shmmni=4096
kernel.sem=25032000100128
fs.file-max=65536
net.ipv4.ip_local_port_range=102465000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144
添加用户和用户组
[root@xiepaup桌面]#groupaddoinstall
[root@xiepaup桌面]#groupadddba
[root@xiepaup桌面]#mkdir/u01
[root@xiepaup桌面]#useradd-d/u01oracle
[root@xiepaup桌面]#usermod-goinstall-Gdbaoracle
[root@xiepaup桌面]#chown-Roracle:
oinstall/u01
[root@xiepaup/]#
[root@xiepaup/]#cat/etc/passwd|greporacle
oracle:
x:
500:
502:
:
/u01:
/bin/bash
6.修改/etc/security/limit.conf
[root@xiepaup/]#vi/etc/security/limits.conf
在文件末尾加入:
:
oraclesoftnproc2047
oraclehardnproc16384
oraclesoftnofile1024
oraclehardnofile65536
7.修改/etc/pam.d/login
[root@xiepaup/]#vi/etc/pam.d/login
sessionrequired/lib/security/pam_limits.so
sessionrequiredpam_limits.so
8.修改oracle.bash_profile
#.bash_profile
#Getthealiasesandfunctions
if[-f~/.bashrc];then
.~/.bashrc
fi
#Userspecificenvironmentandstartupprograms
exportORACLE_SID=orcl
exportORACLE_BASE=/u01/app/oracle
exportORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
exportPATH=$PATH:
/ORACLE_HOME/bin:
$HOME/bin
exportLD_LIBRARY_PATH=$ORACLE_HOME/lib:
/usr/lib
exportLC_CTYPE=en_US.UTF-8
~
~
9.修改/etc/profile
[root@xiepaup/]#vi/etc/profile
加入如下命令:
if[$USER="oracle"];then
if[$SHELL="/bin/ksh"];then
ulimit-p16384
ulimit-n65536
else
ulimit-u16384-n65536
fi
fi
10.修改/etc/hosts文件
把127.0.0.1改为具体的ip地址,注意最好去掉那些无用的
192.168.1.3xiepaup#AddedbyNetworkManager
127.0.0.1localhost.localdomainlocalhost
11.关闭SeLinuxiptables
因为SeLinux对oracle有影响,所以把SecureLinux设成Permissive,编辑文件/etc/selinux/config:
[root@xiepaup/]#/etc/init.d/iptablesstop
iptables:
清除防火墙规则:
[确定]
iptables:
将链设置为政策ACCEPT:
filter[确定]
iptables:
正在卸载模块:
[确定]
[root@xiepaup/]#
[root@xiepaup/]#getenforce
Enforcing
[root@xiepaup/]#setenforce0
[root@xiepaup/]#getenforce
Permissive
[root@xiepaup/]#
现在最好是重启机子............................................然后以oracle用户登录。
安装oracle10g
[oracle@xiepaup~]$./runInstaller
正在启动OracleUniversalInstaller...
正在检查安装程序要求...
检查操作系统版本:
必须是redhat-3,SuSE-9,redhat-4,UnitedLinux-1.0,asianux-1orasianux-2
通过
所有安装程序要求均已满足。
准备从以下地址启动OracleUniversalInstaller/tmp/OraInstall2012-06-20_09-02-47[oracle@xiepaup~]$StartingInstallerinadvancedmode...
OracleUniversalInstaller,Version10.2