Plone技术资料

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 548|回复: 0

fedora 20 安装oracle 11g过程

[复制链接]
发表于 2019-10-23 11:24:25 | 显示全部楼层 |阅读模式
This article presents how to install Oracle 11G on Fedora 20.
Read following article how to install Fedora 20 Linux: Install Fedora 20 (for comfort set 2G memory for your virtual machine before proceeding with Oracle software installation).
Installation software is available on OTN version 11.2.0.1 or metalink 11.2.0.4. In this installation I’m presenting installation for 11.2.0.4 but for previous version 11.2.0.X it shouldn’t be different.
Oracle software which I verified
release 11.2.0.4
p13390677_112040_Linux-x86-64_1of7.zip p13390677_112040_Linux-x86-64_2of7.zip
OS configuration and preparation
OS configuration is executed as root. To login as root just execute following command in terminal.
  1. su - root
复制代码

Add groups
--required groups
  1. /usr/sbin/groupadd -g 501 oinstall
  2. /usr/sbin/groupadd -g 502 dba
  3. /usr/sbin/groupadd -g 503 oper
复制代码

Add user Oracle
  1. /usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle
复制代码

Change password for user
  1. passwd oracle
复制代码


Add kernel parameters to /etc/sysctl.conf
  1. kernel.shmmni = 4096
  2. kernel.shmmax = 4398046511104
  3. kernel.shmall = 1073741824
  4. kernel.sem = 250 32000 100 128

  5. fs.aio-max-nr = 1048576
  6. fs.file-max = 6815744
  7. net.ipv4.ip_local_port_range = 9000 65500
  8. net.core.rmem_default = 262144
  9. net.core.rmem_max = 4194304
  10. net.core.wmem_default = 262144
  11. net.core.wmem_max = 1048586
复制代码


Apply kernel parameters
  1. /sbin/sysctl -p
复制代码

Add following lines to set shell limits for user oracle in file /etc/security/limits.conf
  1. oracle   soft   nproc    131072
  2. oracle   hard   nproc    131072
  3. oracle   soft   nofile   131072
  4. oracle   hard   nofile   131072
  5. oracle   soft   core     unlimited
  6. oracle   hard   core     unlimited
  7. oracle   soft   memlock  50000000
  8. oracle   hard   memlock  50000000
复制代码

The “/etc/hosts” file must contain a fully qualified name for the server.
  1. <IP-address>  <fully-qualified-machine-name>  <machine-name>
复制代码

For example.
  1. 127.0.0.1 fedora fedora.dbaora.com localhost localhost.localdomain
复制代码

Modify .bash_profile for user oracle in his home directory
# Oracle Settings
  1. export TMP=/tmp

  2. export ORACLE_HOSTNAME=fedora.dbaora.com
  3. export ORACLE_UNQNAME=ORA11G
  4. export ORACLE_BASE=/ora01/app/oracle
  5. export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
  6. export ORACLE_SID=ORA11G

  7. PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin

  8. export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
  9. export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

  10. alias cdob='cd $ORACLE_BASE'
  11. alias cdoh='cd $ORACLE_HOME'
  12. alias tns='cd $ORACLE_HOME/network/admin'
  13. alias envo='env | grep ORACLE'

  14. umask 022
复制代码

Check which packages are installed and which are missing
  1. rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE}(%{ARCH})\n' binutils \
  2. compat-libstdc++-33 \
  3. elfutils-libelf \
  4. elfutils-libelf-devel \
  5. gcc \
  6. gcc-c++ \
  7. glibc \
  8. glibc-common \
  9. glibc-devel \
  10. glibc-headers \
  11. ksh \
  12. libaio \
  13. libaio-devel \
  14. libgcc \
  15. libstdc++ \
  16. libstdc++-devel \
  17. make \
  18. sysstat \
  19. unixODBC \
  20. unixODBC-devel
复制代码

Install missing packages. It’s just example (many in one step):
  1. yum install unixODBC unixODBC-devel sysstat
复制代码

Create directory structure
  1. mkdir -p /ora01/app
  2. chown oracle:oinstall /ora01/app
  3. chmod 775 /ora01/app
复制代码


create ORACLE_BASE directory for oracle
  1. mkdir -p /ora01/app/oracle
  2. chown oracle:oinstall /ora01/app/oracle
  3. chmod 775 /ora01/app/oracle
复制代码


Create ORACLE_HOME directory for oracle
  1. mkdir -p /ora01/app/oracle/product/11.2.0/db_1
  2. chown oracle:oinstall -R /ora01/app/oracle
复制代码


Disable secure linux by editing the “/etc/selinux/config” file, making sure the SELINUX flag is set as follows. It requires REBOOT to be effective !!!
  1. SELINUX=disabled
复制代码

Edit the “/etc/redhat-release” file replacing the current release information “Fedora release 20 (Heisenbug)” with the following.
  1. redhat release 5
复制代码

In Fedora 20 /tmp data is stored on tmpfs which consumes memory and is too small. To revert it back to storage just run following command and REBOOT machine to be effective.
  1. systemctl mask tmp.mount
复制代码

Install database software
Let’s start with database software installation as oracle user.
  1. su - oracle
复制代码


--unizp software 11.2.0.3
  1. unzip p10404530_112030_Linux-x86-64_1of7.zip
  2. unzip p10404530_112030_Linux-x86-64_2of7.zip

  3. --or unzip software 11.2.0.4
  4. p13390677_112040_Linux-x86-64_1of7.zip
  5. p13390677_112040_Linux-x86-64_2of7.zip
  6. --I defined 4 aliases in .bash_profile of user oracle to make
  7. --administration heaven :)

  8. [oracle@fedora ~]$ alias envo cdob cdoh tns
  9. alias envo='env | grep ORACLE'
  10. alias cdob='cd $ORACLE_BASE'
  11. alias cdoh='cd $ORACLE_HOME'
  12. alias tns='cd $ORACLE_HOME/network/admin'

  13. --run alias command envo to display environment settings
  14. envo
  15. ORACLE_UNQNAME=ORA11G
  16. ORACLE_SID=ORA11G
  17. ORACLE_BASE=/ora01/app/oracle
  18. ORACLE_HOSTNAME=fedora.dbaora.com
  19. ORACLE_HOME=/ora01/app/oracle/product/11.2.0/db_1

  20. --run alias command cdob and cdoh to check ORACLE_BASE, ORACLE_HOME
  21. [oracle@fedora ~]$ cdob
  22. [oracle@fedora oracle]$ pwd
  23. /ora01/app/oracle

  24. [oracle@fedora db_1]$ cdoh
  25. [oracle@fedora db_1]$ pwd
  26. /ora01/app/oracle/product/11.2.0/db_1

  27. --run installation
  28. ./runInstall
复制代码


1. Uncheck checkbox “I wish to receive security updates via My Oracle Support” and then click “Next” button.
2. Ignore following message and click “Yes” button.
3. Select “Skip software updates” and click “Next” button.
4. Select “Create and configure a database” then click “Next” button.
5. Select “Server Class” then click “Next” button.
6. Select “Single instance database installation” and click “Next” button.
7. Select “Typical Install” and click “Next” button.
8. Enter database name, administration password for user and click “Next” button.
9. Just click “Next” button.
10. Check checkbox “Ignore All” to ignore this error. Then click “Next” button.
11. Just click “Yes” button to continue with installation.
12. Summary screen just before installation. Click “Install” button.
13. Boring installation …
14. I received following error during linking binaries
To fix this error edit $ORACLE_HOME/sysman/lib/ins_emagent.mk, search for the line
  1. $(MK_EMAGENT_NMECTL)
复制代码

and replace the line with
  1. $(MK_EMAGENT_NMECTL) -lnnz11
复制代码

then click “Retry” button
15. Database Configuration will start and create database for you.
16. You should see summary screen for your new database. Click “OK” button to continue with installation.
17. In the “middle” of installation you will be asked to run 2 scripts as user root. when scripts are executed just click “OK” button. Installation will proceed.
--execute scripts
  1. /ora01/app/oraInventory/orainstRoot.sh
  2. /ora01/app/oracle/product/11.2.0/db_1/root.sh
复制代码


18. Installation completed. Just click “Close” button.
Post installation steps
Edit the “/etc/redhat-release” file to restore original release information.
  1. Fedora release 20 (Heisenbug)
复制代码

Edit the “/etc/oratab” file to set restart flag for ORA11G to ‘Y’.
  1. ORA11G:/u01/app/oracle/product/11.2.0/db_1:Y
复制代码


本文转载自:http://dbaora.com/install-oracle-11g-11-2-0-4-on-fedora-20/
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|Plone技术资料 ( 湘ICP备14006519号-1 )

GMT+8, 2019-11-16 04:20 , Processed in 0.049067 second(s), 16 queries , Gzip On.

Powered by Plone! X3.4

© 2001-2019 Plone.org.

快速回复 返回顶部 返回列表