CentOS 6.5_x64安裝Oracle 11g R2

來源:互聯網
上載者:User

安裝環境:
作業系統:CentOS6.5_x64 Desktop
主機名稱:Oracledb
記憶體:1G(官方最低要求1G)
硬碟:40G(企業版安裝所需4.29G和1.7G資料檔案)
安裝前系統準備:
#修改主機名稱
[root@oracledb ~]# sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb/" /etc/sysconfig/network
[root@oracledb ~]# hostname oracledb
#添加主機名稱與IP對應記錄
[root@oracledb ~]# vi /etc/hosts
192.168.1.160    oracledb
#關閉Selinux
[root@oracledb ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config 
[root@oracledb ~]# setenforce 0
1、安裝依賴包
[root@oracledb ~]# yum -y install  gcc gcc-c++ make binutilscompat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-commonglibc-devel
libaio libaio-devel libgcclibstdc++ libstdc++-devel unixODBC unixODBC-devel

2、建立使用者和組
[root@oracledb ~]# sysctl -p
[root@oracledb ~]# groupadd -g 200 oinstall
[root@oracledb ~]# groupadd -g 201 dba
[root@oracledb ~]# useradd -u 440 -g oinstall -G dba oracle
[root@oracledb ~]# passwd oracle

3、修改核心參數
[root@oracledb ~]# vi/etc/sysctl.conf  #末尾添加如下
net.ipv4.ip_local_port_range= 9000 65500
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576

4、修改系統資源限制
[root@oracledb ~]# vi/etc/security/limits.conf #末尾添加如下
oracle  soft  nproc  2047
oracle  hard  nproc  16384
oracle  soft  nofile  1024
oracle  hard  nofile  65536

[root@oracledb ~]# vi/etc/pam.d/login
session    required    pam_namespace.so  #下面添加一條pam_limits.so
session    required    pam_limits.so


123456789 [root@oracledb ~]# vi/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

5、建立安裝目錄及設定許可權

[root@oracledb ~]# mkdir /opt/oracle/app/
[root@oracledb ~]# mkdir /opt/oracle/oradata/
[root@oracledb ~]# chmod 755/opt/oracle/
[root@oracledb ~]# chmod 775/opt/oracle/app/
[root@oracledb ~]# chown oracle.oinstall -R /opt/oracle/

6、設定oracle環境變數

[oracle@oracledb ~]$ vi ~/.bash_profile
exportORACLE_BASE=/opt/oracle/app
exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
exportPATH=$PATH:$ORACLE_HOME/bin
export ROACLE_PID=orcl
[oracle@oracledb ~]$ source .bash_profile  #立即生效

7、安裝oracle

下載並解壓:
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
[root@oracledb~]# unzip /media/linux.x64_11gR2_database_1of2.zip
[root@oracledb~]# unzip /media/linux.x64_11gR2_database_2of2.zip
[root@oracledb~]# xhost +  #使所有使用者都能訪問圖形案頭
[root@oracledb~]# su –oracle
[oracle@oracle~]#./media/database/runInstaller

#輸入接受一些安全問題的郵件地址

# 選擇安裝資料庫軟體並建立資料,也可以選擇第二項僅安裝資料庫軟體

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 下一頁

相關文章

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.