centos5.6x oracle10g安裝

 

官網參考:http://download.oracle.com/docs/html/B10811_01/toc.htmphp

                http://www.oracle-base.com/articles/10g/OracleDB10gInstallationOnFedora1.phphtml

                 http://www.oracle-base.com/articles/10g/Oracle10gGridControlInstallationOnRedHatAS3.phpc++

其餘參考:http://youkao.iteye.com/blog/245374數據庫

1首先安裝環境centos

  • X Window System
  • GNOME Desktop Environment
  • Editors
  • Graphical Internet
  • Text-based Internet
  • Server Configuration Tools
  • Development Tools
  • Administration Tools
  • System Tools

2安裝須要準備的軟件,準備環境。bash

yum install -y binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-develsession

3 添加用戶及用戶組oracle

[root@centos56 ~]# groupadd oinstall
[root@centos56 ~]# groupadd dba
[root@centos56 ~]# groupadd oper
[root@centos56 ~]# useradd -g oinstall -G dba oracle
[root@centos56 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.dom

4創建安裝目錄,賦予權限ui

[root@centos56 data]# mkdir /data/oracle
[root@centos56 data]# mkdir /data/oracle/10g
[root@centos56 data]# chown -R oracle:oinstall /data/oracle

5 更改oracle 安裝的環境變量

5.1vi /etc/sysctl.conf

# Controls the maximum number of shared memory segments, in pages
#kernel.shmall = 4294967296
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=4194304
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=262144

運行#sysctl -p應用以上參數

5.2. vi /etc/security/limits.conf

#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file

5.3vi /etc/pam.d/login

加上
# pam_limits.so  oracle install variable set
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so

5.4 vi /etc/profile


if [$USER = "oracle"]; then
  if [$SHELL = "/ben/ksh"];then
     ulimit -p 16384
     ulimit -n 65536
  else
     ulimit -u 16384 -n 65536
  fi
fi

運行#source /etc/profile

5.5[root@centos56 oracle]# vi .bash_profile

PATH=$ORACLE_HOME/bin:$PATH
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
ORACLE_BASE=/data/oracle
ORACLE_HOME=$ORACLE_BASE/10g
ORACLE_SID=ynxd56
PATH=$ORACLE_HOME/bin:$PATH

export $ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
~

5.6[root@centos56 oracle]# vi /etc/redhat-release

#CentOS release 5.6 (Final)//經實踐這段不能要
redhat-4
~

6 yum -y install libXp

7用oracle進入終端,

sh /oracle安裝文件目錄/runInstaller

8常見錯誤

checking network configuration requirements

修改/etc/hosts

error in invoking target 'all_no_orcl'

compat-libstdc++-33這個包沒裝

error checking oracle home incompatiblities

前面裝的oracl沒裝完又被鎖定了,網上說刪除 /var/opt/oracle/orainst.loc file (or/var/etc/oracle/orainst.loc。我機器上沒有前面說的文件,但我在tmp把oracle安裝的臨時文件刪掉也就過了.

後面又重裝一片,實在找不到地方刪了,改了另一個ORACLE_HOME路徑過的。

9安裝完後執行$oracle_home\root.sh,建立/etc/oratab文件

10用oracle用戶登陸,dbstart運行會暈說/ade/vikrkuma_new/oracle不存在。

修改$ORACLE_HOME\bin\dbstart,修改ORACLE_HOME_LISTNER=$ORACLE_HOME

再修改/etc/oratab中 orcl:....N 改N爲Y

11 這時候dbstart顯示啓動數據庫信息了。

12添加自啓動 ,修改/etc/rc.d/rc.local 或者添加chkconfig

相關文章
相關標籤/搜索