Linux Learning Notes (vii) installation of Oracle database

Source: Internet
Author: User

Note # root user $oracle User 1. Turn off security # Chkconfig iptables off//permanently shut down Firewall # Serviceiptables stop//temporarily shut down the firewall, restart the system will automatically open # sed-i "S/selinux=enforcing/selin ux=disabled/"/etc/selinux/config//Off SELinux 2. Verify Hardware 2.1 Memory: Required: Memory minimum 1G, recommended 2G or higher. View command: # grep memtotal/proc/meminfo 2.2 Swap: Required:
RAW Swap
1G to 2G 1.5 times times
2G to 16G Equal to Raw
Above 16G 16G
View command: # grep swaptotal/proc/meminfo # free 3. Verifying the Software 3.1 operating system
    • Asianux Server 3 SP2
    • Oracle Linux 4 Update 7
    • Oracle Linux 5 Update 2 (with Red Hat Compatible Kernel)
    • Oracle Linux 5 Update 5
    • Oracle Linux 6
    • Oracle Linux 6 (with Red Hat Compatible Kernel)
    • Red Hat Enterprise Linux 4 Update 7
    • Red Hat Enterprise Linux 5 Update 2
    • Red Hat Enterprise Linux 5 Update 5 (with the Oracle Unbreakable Enterprise Kernel for Linux)
    • Red Hat Enterprise Linux 6
    • Red Hat Enterprise Linux 6 (with the Oracle Unbreakable Enterprise Kernel for Linux)
    • SUSE Linux Enterprise Server Ten SP2
    • SUSE Linux Enterprise Server 11
CentOS7 This article is configured in red Hat Enterprise Linux 6来. # Cat/proc/version//view version 3.2 kernel
  • On Oracle Linux 4 and Red Hat Enterprise Linux 4 2.6.9 or later
  • On the Oracle Linux 5 Update 2 with Red Hat Compatible Kernel 2.6.18 or later
  • On the Oracle Linux 5 Update 5 with Red Hat Compatible Kernel 2.6.18 or later
  • On the Oracle Linux 5 Update 5 with unbreakable Enterprise Kernel 2.6.32-100.0.19 or later
  • On Oracle Linux 6 2.6.32-100.28.5.el6.x86_64 or later
  • On the Oracle Linux 6 with Red Hat Compatible Kernel 2.6.32-71.el6.x86_64 or later
  • On Red Hat Enterprise Linux 5 Update 2 2.6.18 or later
  • On Red Hat Enterprise Linux 5 Update 5 2.6.18 or later
  • On Red Hat Enterprise Linux 5 Update 5 with unbreakable Enterprise Kernel 2.6.32 or later
  • On Red Hat Enterprise Linux 6 2.6.32-71.el6.x86_64 or later
  • On Red Hat Enterprise Linux 6 with Unbreakable Enterprise Kernel 2.6.32-100.28.5.el6.x86_64 or later
  • On Asianux Server 3 2.6.18 or later
  • On SUSE Linux Enterprise Server ten 2.6.16.21 or later
  • On SUSE Linux Enterprise Server one 2.6.27.19 or later
# UNAME-R 3.3 Verify the required package: # RPM-QA binutils compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers glibc-static kernel-headers Pdksh Libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel libstdc++-static make numactl-devel sysstat UnixODBC UnixODB C-devel//Verification Command 26 packages
  • Kernel-headers-3.10.0-123.el7.x86_64
  • Gcc-c++-4.8.2-16.el7.x86_64
  • Numactl-devel-2.0.9-2.el7.x86_64
  • Glibc-headers-2.17-55.el7.x86_64
  • Glibc-common-2.17-55.el7.x86_64
  • Binutils-2.23.52.0.1-16.el7.x86_64
  • Unixodbc-devel-2.3.1-10.el7.x86_64
  • Libaio-0.3.109-12.el7.x86_64
  • Make-3.82-21.el7.x86_64
  • Elfutils-libelf-0.158-3.el7.x86_64
  • Elfutils-libelf-devel-0.158-3.el7.x86_64
  • Sysstat-10.1.5-4.el7.x86_64
  • Glibc-static-2.17-55.el7.x86_64
  • Glibc-devel-2.17-55.el7.x86_64
  • Glibc-2.17-55.el7.x86_64
  • Elfutils-libelf-devel-static-0.158-3.el7.x86_64
  • libaio-0.3.109-12.el7.i686
  • Gcc-4.8.2-16.el7.x86_64
  • libgcc-4.8.2-16.el7.i686
  • Libstdc++-static-4.8.2-16.el7.x86_64
  • Libaio-devel-0.3.109-12.el7.x86_64
  • Libstdc++-4.8.2-16.el7.x86_64
  • libaio-devel-0.3.109-12.el7.i686
  • Unixodbc-2.3.1-10.el7.x86_64
  • Libstdc++-devel-4.8.2-16.el7.x86_64
  • Compat-libstdc++-33-3.2.3-71.el7.x86_64
  • Libgcc-4.8.2-16.el7.x86_64
  • Libgomp-4.8.2-16.el7.x86_64
#rpm-IVH Install package name//install package 4. Create groups and users # Groupadd DBA
# Groupadd Oinstall
# useradd-m-G oinstall-g dba Oracle
# passwd Oracle
If the nobody user does not exist (the ID Nobody command is viewed), it is created:
# Useradd Nobody 5. Configure kernel Note: Configuration changes are required to configure larger than system data, otherwise no configuration is required. Required configuration:
Parameters Minimum value File Command
Semmsl
Semmns
semopm
Semmni
50
32000
100
128
/proc/sys/kernel/sem #/sbin/sysctl-a | grep sem
Shmall 2097152 /proc/sys/kernel/shmall #/sbin/sysctl-a | grep SHM
Shmmax 4294967296 /proc/sys/kernel/shmmax
Maximum shared memory, official document recommendation is 1/2 of memory
My server is 8G memory, so for 4*1024*1024*1024
Minimum value is 536870912 (1G memory/2)
#/sbin/sysctl-a | grep SHM
Shmmni 4096 /proc/sys/kernel/shmmni #/sbin/sysctl-a | grep SHM
File-max 6815744 /proc/sys/fs/file-max #/sbin/sysctl-a | grep File-max
Ip_local_port_range 9000 65500 /proc/sys/net/ipv4/ip_local_port_range #/sbin/sysctl-a | grep ip_local_port_range
Rmem_default 262144 /proc/sys/net/core/rmem_default #/sbin/sysctl-a | grep Rmem_default
Rmem_max 4194304 /proc/sys/net/core/rmem_max #/sbin/sysctl-a | grep Rmem_max
Wmem_default 262144 /proc/sys/net/core/wmem_default #/sbin/sysctl-a | grep Wmem_default
Wmem_max 1048576 /proc/sys/net/core/wmem_max #/sbin/sysctl-a | grep Wmem_max
Aio-max-nr 1048576
# vi/etc/sysctl.conf added according to system value: 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 after saving effective command: #/sbin/sysctl-p 6. Create the installation directory # Mkdir-p/opt/oracle/product/11.2.0.1
# chown-r oracle:oinstall/opt/oracle# mkdir/var/oracle
# chown Oracle:oinstall/var/oracle
# chmod 755/var/oracle 7. Configure the environment variable Vi/etc/profile to add the following line:
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
FI uses Oracle User login:
Su-oracle
VI ~/.bash_profile
The following is the contents of the configuration file, the existing part of it does not have to be added at a time.
#. Bash_profile
# Get the aliases and functions
If [-f ~/.BASHRC]; Then
. ~/.bashrc
Fi
# User specific environment and startup programs
Umask 022
# +--------------------------+
# | SETUP ORACLE Environment |
# +--------------------------+tmp=/tmp
Tmpdir=/tmp
Export TMP TMPDIR
# If there is a problem with the installation, please block the following 5 lines,
# Install and then unblock these environment variable settings
Export oracle_home=/opt/oracle/product/11.2.0.1
Export Oracle_base=/opt/oracle
Export ORACLE_SID=AFCSC
Export tns_admin= $ORACLE _home/network/admin
Export Nls_lang=american_america. Zhs16gbk
Export path= $PATH: $ORACLE _home/bin
# +--------------------------+
# | LINUX STUFF |
# +--------------------------+
Export Lang=american_america. Zhs16gbk
Unset USERNAME
# +-------------+
# | "GREETINGS" |
# +-------------+
echo ". Bash_profile executed" execution: source ~/.bash_profile 8. To set the number of processes and the maximum number of sessions edit file: # vi/etc/security/limits.conf Add the following statement:
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536 9. Association settings
Edit file: Vi/etc/pam.d/login Add the following statement:
Session Required Pam_limits.so
(Note: Based on the comments of the last session rule, it should be added before the last rule)

9. Unzip the Linux.x64_11gR2_database_1of2.zip and Linux.x64_11gR2_database_2of2.zip to move to the/tmp directory for decompression. $ cd/tmp$ Unzip linux.x64_11gr2_database_1of2.zip$ unzip Linux.x64_11gR2_database_2of2.zip 10. Install $ cd/tmp/database/$./runinstaller Note:
Select Advance Install
Database home set to/opt/oracle/product/11.2.0.1
Database global name is set to AFCSC
Character Set selection Simplified Chinese ZHS16GBK The graphical installation interface is run after checking. There are two errors when connecting to the library during installation:
    • The first one:
/lib64/libstdc++.so in [email protected]_2.4 not found. Problem: GLIBC is a 2.17 library and the connection is looking for a 2.14 library. Workaround: Change to static link. See if/USR/LIB64/LIBC.A exists. Modify the ORACLE installation directory: $ORACLE _HOME/CTX/LIB/INS_CTX.MKCTXHX: $ (ctxhxobj)
$ (LINK_CTXHX) $ (ctxhxobj) $ (inso_link) modified to: Ctxhx: $ (ctxhxobj)
-static $ (LINK_CTXHX) $ (ctxhxobj) $ (inso_link)/USR/LIB64/LIBC.A then click Retry Pass.
    • The second one:
Problem: undefinied reference symbol ' B_destroykeyobject ', view the log, the actual is not found Nnz11 this library. Workaround: Modify/opt/oracle/product/11.2.0.1/sysman/lib/ins_emagent$ (MK_EMAGENT_NMECTL) to: $ (mk_emagent_nmectl)-  Lnnz11 then click Retry to pass. Note: Installation requires a remote graphical connection to install Oracle, specific ways and software here is not said.

Linux Learning Notes (vii) installation of Oracle database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.