RHEL 6.5 64位系统安装Oracle 11g R2.docx_第1页
RHEL 6.5 64位系统安装Oracle 11g R2.docx_第2页
RHEL 6.5 64位系统安装Oracle 11g R2.docx_第3页
RHEL 6.5 64位系统安装Oracle 11g R2.docx_第4页
RHEL 6.5 64位系统安装Oracle 11g R2.docx_第5页
已阅读5页,还剩15页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1. 安装包检查需要选择以下组件:GNOME桌面、编辑器、开发工具、开发库等。查看系统已经安装的组件:rootgnome dev# yum grouplistLoaded plugins: product-id, refresh-packagekit, subscription-managerThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.Setting up Group Processlocal | 3.9 kB 00:00 . Installed Groups: Additional Development Desktop Desktop Platform Desktop Platform Development Dial-up Networking Support Directory Client E-mail server Fonts General Purpose Desktop Graphical Administration Tools Input Methods Internet Browser Legacy X Window System compatibility Network Infrastructure Server Perl Support Security Tools X Window SystemInstalled Language Groups: Arabic Support ar Armenian Support hy Bhutanese Support dz Chinese Support zh Ethiopic Support am Georgian Support ka Hebrew Support he Inuktitut Support iu Japanese Support ja Khmer Support km Konkani Support kok Korean Support ko Kurdish Support ku Lao Support lo Myanmar (Burmese) Support my Tajik Support tg Venda Support veAvailable Groups: Backup Client Backup Server Base CIFS file server Client management tools Compatibility libraries Console internet tools Debugging Tools Desktop Debugging and Performance Tools Development tools Directory Server Eclipse Emacs FCoE Storage Client FTP server Graphics Creation Tools Hardware monitoring utilities Identity Management Server Infiniband Support Java Platform KDE Desktop Large Systems Performance Legacy UNIX compatibility Mainframe Access Messaging Client Support MySQL Database client MySQL Database server NFS file server Network Storage Server Network file system client Networking Tools PHP Support Performance Tools PostgreSQL Database client PostgreSQL Database server Print Server Printing client Remote Desktop Clients Ruby Support SNMP Support Scientific support Server Platform Server Platform Development Smart card support Storage Availability Tools System Management System administration tools TeX support Technical Writing TurboGears application framework Virtualization Virtualization Client Virtualization Platform Virtualization Tools Web Server Web Servlet Engine Web-Based Enterprise Management iSCSI Storage ClientAvailable Language Groups: Afrikaans Support af Albanian Support sq Amazigh Support ber Assamese Support as Azerbaijani Support az Basque Support eu Belarusian Support be Bengali Support bn Brazilian Portuguese Support pt_BR Breton Support br Bulgarian Support bg Catalan Support ca Chhattisgarhi Support hne Chichewa Support ny Coptic Support cop Croatian Support hr Czech Support cs Danish Support da Dutch Support nl English (UK) Support en_GB Esperanto Support eo Estonian Support et Faroese Support fo Fijian Support fj Filipino Support fil Finnish Support fi French Support fr Frisian Support fy Friulian Support fur Gaelic Support gd Galician Support gl German Support de Greek Support el Gujarati Support gu Hiligaynon Support hil Hindi Support hi Hungarian Support hu Icelandic Support is Indonesian Support id Interlingua Support ia Irish Support ga Italian Support it Kannada Support kn Kashmiri Support ks Kashubian Support csb Kazakh Support kk Kinyarwanda Support rw Latin Support la Latvian Support lv Lithuanian Support lt Low Saxon Support nds Luxembourgish Support lb Macedonian Support mk Maithili Support mai Malagasy Support mg Malay Support ms Malayalam Support ml Maltese Support mt Manx Support gv Maori Support mi Marathi Support mr Mongolian Support mn Nepali Support ne Northern Sotho Support nso Norwegian Support nb Occitan Support oc Oriya Support or Persian Support fa Polish Support pl Portuguese Support pt Punjabi Support pa Romanian Support ro Russian Support ru Sanskrit Support sa Sardinian Support sc Serbian Support sr Sindhi Support sd Sinhala Support si Slovak Support sk Slovenian Support sl Somali Support so Southern Ndebele Support nr Southern Sotho Support st Spanish Support es Swahili Support sw Swati Support ss Swedish Support sv Tagalog Support tl Tamil Support ta Telugu Support te Tetum Support tet Thai Support th Tibetan Support bo Tsonga Support ts Tswana Support tn Turkish Support tr Turkmen Support tk Ukrainian Support uk Upper Sorbian Support hsb Urdu Support ur Uzbek Support uz Vietnamese Support vi Walloon Support wa Welsh Support cy Xhosa Support xh Zulu Support zuDoneOracle官方文档中确定要安装的包如下: binutils-.6 compat-libstdc+-33-3.2.3 compat-libstdc+-33-3.2.3 (32 bit) elfutils-libelf-0.125 elfutils-libelf-devel-0.125 gcc-4.1.2 gcc-c+-4.1.2 glibc-2.5-24 glibc-2.5-24 (32 bit) glibc-common-2.5 glibc-devel-2.5 glibc-devel-2.5 (32 bit) glibc-headers-2.5 ksh-20060214 libaio-0.3.106 libaio-0.3.106 (32 bit) libaio-devel-0.3.106 libaio-devel-0.3.106 (32 bit) libgcc-4.1.2 libgcc-4.1.2 (32 bit) libstdc+-4.1.2 libstdc+-4.1.2 (32 bit) libstdc+-devel-4.1.2 make-3.81 numactl-devel-0.9.8.x86_64 sysstat-7.0.2rootgnome dev# rpm -q -qf %NAME-%VERSION-%RELEASE (%ARCH)n binutils compat-libstdc+-33-3.2.3 elfutils-libelf elfutils-libelf-devel gcc gcc-c+ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc+ libstdc+-devel make numactl-devel sysstatbinutils-.2-5.36.el6 (x86_64)package compat-libstdc+-33-3.2.3 is not installedelfutils-libelf-0.152-1.el6 (x86_64)package elfutils-libelf-devel is not installedpackage gcc is not installedpackage gcc-c+ is not installedglibc-2.12-1.132.el6 (x86_64)glibc-common-2.12-1.132.el6 (x86_64)glibc-devel-2.12-1.132.el6 (x86_64)glibc-headers-2.12-1.132.el6 (x86_64)package ksh is not installedpackage libaio is not installedpackage libaio-devel is not installedlibgcc-4.4.7-4.el6 (x86_64)libstdc+-4.4.7-4.el6 (x86_64)package libstdc+-devel is not installedmake-3.81-20.el6 (x86_64)package numactl-devel is not installedpackage sysstat is not installedrootgnome dev#2. 配置本地YUM源RHEL6配置本地YUM源1.挂载光盘mount /dev/cdrom /mnt/rhel62.建立yum配置文件vi /etc/yum.repos.d/local.repo内容如下:localname=localbaseurl=file:/mnt/rhel6gpgcheck=0enable=13.修改YUM源地址vi /usr/lib/python2.6/site-packages/yum/yumRepo.py修改yumRepo.py文件vi /usr/lib/python2.6/site-packages/yum/yumRepo.py查找remote = url + / +relative改成remote = url + /local_yum_source + relative4. 现在即可使用本地的YUM进行安装软件yum -y install xxx3. 安装缺少的rpm包 rootgnome yum# yum -y install elfutils-libelf-develrootgnome yum# yum -y install gcc rootgnome yum# yum -y install gcc-c+rootgnome yum# yum -y install glibc-devel rootgnome yum# yum -y install glibc-headersrootgnome yum# yum -y install libaio-develrootgnome yum# yum -y install libstdc+-develrootgnome yum# yum -y install numactl-develrootgnome yum# yum -y install sysstat4. 重新检查安装包rootgnome dev# rpm -q -qf %NAME-%VERSION-%RELEASE (%ARCH)n binutils compat-libstdc+-33-3.2.3 elfutils-libelf elfutils-libelf-devel gcc gcc-c+ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc+ libstdc+-devel make numactl-devel sysstatbinutils-.2-5.36.el6 (x86_64)compat-libstdc+-33-3.2.3-69.el6 (x86_64)elfutils-libelf-0.152-1.el6 (x86_64)elfutils-libelf-devel-0.152-1.el6 (x86_64)gcc-4.4.7-4.el6 (x86_64)gcc-c+-4.4.7-4.el6 (x86_64)glibc-2.12-1.132.el6 (x86_64)glibc-common-2.12-1.132.el6 (x86_64)glibc-devel-2.12-1.132.el6 (x86_64)glibc-headers-2.12-1.132.el6 (x86_64)ksh-20120801-10.el6 (x86_64)libaio-0.3.107-10.el6 (x86_64)libaio-devel-0.3.107-10.el6 (x86_64)libgcc-4.4.7-4.el6 (x86_64)libstdc+-4.4.7-4.el6 (x86_64)libstdc+-devel-4.4.7-4.el6 (x86_64)make-3.81-20.el6 (x86_64)numactl-devel-2.0.7-8.el6 (x86_64)sysstat-9.0.4-22.el6 (x86_64)rootgnome dev# 安装需要的32位rpm包compat-libstdc+-33-3.2.3-69.el6.i686glibc-2.12-1.132.el6.i686glibc-devel-2.12-1.132.el6.i686libaio-0.3.107-10.el6.i686libaio-devel-0.3.107-10.el6.i686libgcc-4.4.7-4.el6.i686libstdc+-4.4.7-4.el6.i686重新检查安装包rootgnome dev# rpm -q -qf %NAME-%VERSION-%RELEASE (%ARCH)n binutils compat-libstdc+-33-3.2.3 elfutils-libelf elfutils-libelf-devel gcc gcc-c+ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio-devel libgcc libstdc+ libstdc+-devel make numactl-devel sysstatbinutils-.2-5.36.el6 (x86_64)compat-libstdc+-33-3.2.3-69.el6 (x86_64)compat-libstdc+-33-3.2.3-69.el6 (i686)elfutils-libelf-0.152-1.el6 (x86_64)elfutils-libelf-devel-0.152-1.el6 (x86_64)gcc-4.4.7-4.el6 (x86_64)gcc-c+-4.4.7-4.el6 (x86_64)glibc-2.12-1.132.el6 (x86_64)glibc-2.12-1.132.el6 (i686)glibc-common-2.12-1.132.el6 (x86_64)glibc-devel-2.12-1.132.el6 (x86_64)glibc-devel-2.12-1.132.el6 (i686)glibc-headers-2.12-1.132.el6 (x86_64)ksh-20120801-10.el6 (x86_64)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)libgcc-4.4.7-4.el6 (x86_64)libgcc-4.4.7-4.el6 (i686)libstdc+-4.4.7-4.el6 (x86_64)libstdc+-4.4.7-4.el6 (i686)libstdc+-devel-4.4.7-4.el6 (x86_64)make-3.81-20.el6 (x86_64)numactl-devel-2.0.7-8.el6 (x86_64)sysstat-9.0.4-22.el6 (x86_64)rootgnome dev# 5.创建oracle用户及管理组以root用户登录,执行以下命令rootlocalhost #groupadd dbarootlocalhost # groupadd oinstallrootlocalhost # cat /etc/group添加oracle用户rootlocalhost #useradd -g oinstall -G dba oracleChanging password for user oracle.New UNIX password: oracleBAD PASSWORD: it is based on a dictionary wordRetype new UNIX password: oraclepasswd: all authentication tokens updated successfully.创建安装目录rootlocalhost #mkdir -p /u01/oraclerootlocalhost #mkdir -p /u01/oracle/product/11.2.0/dbhome_1rootlocalhost #mkdir -p /u01/oraInventoryrootlocalhost #mkdir -p /u01/oracle/oradata设置目录的所有者所属组和权限rootlocalhost #chown -R oracle.oinstall /u01/oraclerootlocalhost #chown -R oracle.dba /u01/oraInventoryrootlocalhost #chown -R oracle.oinstall /u01/oracle/product/11.2.0/dbhome_1 rootlocalhost #chown -R oracle.oinstall /u01/oracle/oradatarootlocalhost #chmod -R 775 /u01/oracle设置用户oracle的环境变量#su - oracleoraclelocalhost $ vi /home/oracle/.bash_profile在文件底部添加export ORACLE_BASE=/u01/oracleexport ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1export ORACLE_SID=orclexport ORACLE_OWNER=oracleexport ORACLE_TERM=xtermexport PATH=$PATH:$ORACLE_HOME/bin:$HOME/binexport PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/libexport LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibCLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlibexport CLASSPATHPATH=$PATH:/usr/sbin; export PATHPATH=$PATH:/usr/bin; export PATH执行以下命令让配置马上生效或以oracle用户登录使设置生效oraclelocalhost $ source .bash_profile# echo $ORACLE_BASE # echo $ORACLE_HOME6调整内核参数及用户限制以下所有相关操作需要root用户执行,并且重启动操作系统才能完全生效。(1) 编辑/etc/sysctl.conf文件设置相关参数的系统默认值。如果该文件中已有相关参数的设置,则确保参数值不小于如下对应值;如果还没有相关参数的设置,则按照如下格式添加相应的参数设置行。vim /etc/sysctl.conffs.aio-max-nr = 1048576fs.file-max = 6815744kernel.shmall = 2097152kernel.shmmax = 980742144kernel.shmmni = 4096kernel.sem = 250 32000 100 128net.ipv4.ip_local_port_range = 9000 65500net.core.rmem_default = 262144net.core.rmem_max = 4194304net.core.wmem_default = 262144net.core.wmem_max = 1048586执行以下命令时参数生效: # /sbin/sysctl -p(2) 编辑/etc/security/limits.conf文件修改操作系统对oracle用户资源的限制。在该文件中添加如下行。vim /etc/security/limits.conforacle soft nproc 2047oracle hard nproc 16384oracle soft nofile 1024oracle hard nofile 65536oracle hard stack 10240增加下面的内容到文件 /etc/pam.d/login 中,使shell limit生效 vi /etc/pam.d/login session required /lib64/security/pam_limits.so(3) 修改profilevim /etc/profile在尾部加入if $USER = oracle ;thenif $SHELL = /bin/ksh ; thenulimit -p 16384ulimit -n 65536elseulimit -u 16384 -n 65536fifi7.解压安装包oraclelocalhost oracle$ cd /home/oracle/oraclelocalhost $ lslinux_11gR2_database_1of2.zip linux_11gR2_database_2of2.ziporaclelocalhost oracle$ unzip linux_11gR2_database_1of2.ziporaclelocalhost oracle$ unzip linux_11gR2_database_2of2.zip如果上传的不是/home/oracle/目录,要保证上传的目录oracle用户有足够的权限,假如上传到/u01/soft目录要切换回root用户进行解压:oraclelocalhost oracle$ su rootrootlocalhost # cd /u01/soft/解压压缩包:rootlocalhost soft# unzip linux_11gR2_database_1of2.ziprootlocalhost soft# unzip linux_11gR2_database_2of2.zip给解压后的目录赋权限给oracle用户#chown -R oracle database#chgrp -R oinstall database8.开始安装重启系统将配置信息生效进入服务器界面,以Oracle用户登录,执行以下命令rootlocalhost #cd /home/oracle/databaserootlocalhost #./runInstaller然后进入图形化安装过程。注意我们先安装oracle软件,安装完软件之后再配置监听程序和数据库。内存:最小1GB,推荐2GB或以上交换空间: 内存大小是1-2GB时,交换空间是内存的1.5倍,内存大小2-16GB时,交换空间等于内存大小,内存大小16G以上时,交换空间为16GB.检查已分配的内存/交换空间大小,输入free或cat /proc/swaps或cat /proc/meminfo | grep MemTotal# free # cat /proc/swaps # cat /proc/meminfo | grep MemTotal 缺少rpm包yum -y install unixODBC yum -y install unixODBC-2.2.14-12.el6_3.i686yum -y install unixODBC-develyum -y install unixODBC-devel-2.2.14-12.el6_3.i686添加SWAP分区1、查看哪个分区比较大rootgnome /# df -hFilesystem Size Used Avail Use% Mounted on/dev/mapper/vg_gnome-lv_root 37G 9.6G 26G 28% /tmpfs 939M 228K 938M 1% /dev/shm/dev/sda1 485M 34M 426M 8% /boot.host:/ 501G 450G 51G 90% /mnt/hgfs/dev/sr0 3.6G 3.6G 0 100% /media/RHEL_6.5 x86_64 Disc 12、创建一个2048M的文件,名字为根目录下的swapfilerootgnome tmp# dd if=/dev/zero of=/swapfile bs=1M count=20482048+0 records in2048+0 records out2147483648 bytes (2.1 GB) copied, 11.239 s, 191 MB/srootgnome /# ll -h /swapfile-rw-r-r-. 1 root root 2.0G Apr 3 22:44 /swapfile3、格式化创建的swapfile文件, rootgnome /# mkswap /swapfilemkswap: /swapfile: warning: dont erase bootbits sectors on whole disk. Use -f to force.Setting up swapspace version 1, size = 2097148 KiBno label, UUID=df71c346-0dff-4d27-8d08-47539ac0dce44、激活swaprootgnome /# free -m total used free shared buffers cachedMem: 1876 1730 146 0 7 1338-/+ buffers/cache: 384 1491Swap: 2015 0 2015rootgnome /# swapon /swapfile5、写入fstab文件,不一定非要使用uuid号,# /etc/fstab# Created by anaconda on Wed Mar 25 23:07:53 2015# Accessible filesystems, by reference, are maintained under /dev/disk# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info# /etc/fstab# Created by anaconda on Wed Mar 25 23:07:53 2015# Accessible filesystems, by reference, are maintained under /dev/disk# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info#/dev/mapper/vg_gnome-lv_root / ext4 defaults 1 1UUID=d3478807-b243-4586-bacf-3b6c40edb7d4 /boot ext4 defaults 1 2/dev/mapper/vg_gnome-lv_swap swap swap defaults 0 0/swapfile swap swap swap defaults 0 0tmpfs /dev/shm tmpfs defaults 0 0devpts /dev/pts devpts gid=5,mode=620 0 0sysfs /sys sysfs defaults 0 0proc /proc proc defaults 0 0 查看swap的优先级rootgnome /# swapon -sFilenameTypeSizeUsedPriority/dev/dm-1 partition20643760-1/swapfile file20971440-2这里是数字越大,优先级越高。要更改他们的优先级也很简单,只需要在fstab中增加pri参数就OK。注意,这个pri后面的数值不能是负数!/etc/fstab修改的主要内容如下。注意:不是必要情况下,系统默认的最好。为了使设置生效,需要先关闭swap再开启rootgnome /# swapoff -arootgnome

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论