手把手教你在LINUX上面安裝ORACLE 11G

dbhelper發表於2014-12-04

一、準備工作:

1、執行環境包的檢查;

/media/OL6.3 x86_64 Disc 1 20120626/Packages

[root@idbtcsv1222 Packages]# cd /media/OL6.3\ x86_64\ Disc\ 1\ 20120626/Packages/

rpm -ivh compat-libcap1-1.10-1.x86_64.rpm
rpm -ivh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
rpm -ivh libgcc-4.4.6-4.el6.i686.rpm
rpm -ivh kernel-headers-2.6.32-279.el6.x86_64.rpm
rpm -ivh glibc-headers-2.12-1.80.el6.x86_64.rpm
rpm -ivh glibc-devel-2.12-1.80.el6.x86_64.rpm
rpm -ivh libgomp-4.4.6-4.el6.x86_64.rpm

rpm -ivh mpfr-2.4.1-6.el6.x86_64.rpm
rpm -ivh ppl-0.10.2-11.el6.x86_64.rpm
rpm -ivh cpp-4.4.6-4.el6.x86_64.rpm
rpm -ivh cloog-ppl-0.15.7-1.2.el6.x86_64.rpm
rpm -ivh gcc-4.4.6-4.el6.x86_64.rpm
rpm -ivh libstdc++-devel-4.4.6-4.el6.x86_64.rpm
rpm -ivh gcc-c++-4.4.6-4.el6.x86_64.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.x86_64.rpm
rpm -ivh libaio-devel-0.3.107-10.el6.i686.rpm
rpm -ivh xinetd-2.3.14-34.el6.x86_64.rpm
rpm -ivh rsh-server-0.17-60.el6.x86_64.rpm
rpm -ivh ksh-20100621-16.el6.x86_64.rpm
rpm -ivh tigervnc-server-1.0.90-0.17.20110314svn4359.el6.x86_64.rpm

2、建立組和使用者
[root@andb Packages]# groupadd -g 200 oinstall
[root@andb Packages]# groupadd -g 201 dba
[root@andb Packages]# groupadd -g 202 oper
[root@andb Packages]# useradd -u 200 -g oinstall -G dba,oper oracle

3、建立路徑
[root@andb Packages]# mkdir -p /u01/app/oracle
[root@andb Packages]# chown -R oracle:oinstall /u01/app/oracle
[root@andb Packages]# chmod 775 /u01/app/oracle
[root@andb Packages]# mkdir -p /u01/app/oraInventory
[root@andb Packages]# chown -R oracle:oinstall /u01/app/oraInventory
[root@andb Packages]# chmod 775 /u01/app/oraInventory

4、設定引數限制
a)vi /etc/profile  新增以下內容

    if [ $SHELL = "/bin/ksh" ]; then
       ulimit -u 16384
       ulimit -n 65536
    else
       ulimit -u 16384 -n 65536
    fi
fi
b) vi /etc/sysctl.conf 增加以下內容(以16G記憶體計算)
kernel.shmmax = 15461882265

kernel.shmall = 3774873
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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

c)然後執行使用之生效

/sbin/sysctl -p

d)修改引數限制
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

e)修改軟限制
vi /etc/pam.d/login
session required pam_limits.so

5、host新增解析

vi /etc/hosts

6、修改環境變數

vi /home/oracle/.bash_profile

ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID
export ORACLE_HOME=/u01/app/oracle/product/OraDb11g_home1
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
# export NLS_LANG="SIMPLIFIED CHINESE_CHINA".ZHS16GBK
# export NLS_DATE_FORMAT='YYYY-MM-DD'

二、安裝資料庫軟體

1、加壓安裝包
unzip xxx

2、安裝 ./runInstaller
clip_image001
clip_image002
clip_image003
clip_image004
clip_image005
clip_image006
clip_image007
clip_image008
clip_image009
clip_image010
clip_image011
clip_image012
clip_image013
/u01/app/oraInventory/orainstRoot.sh
/u01/app/oracle/product/OraDb11g_home1/root.sh

三、建立例項

clip_image014
clip_image015
clip_image016
clip_image017
clip_image018
記錄密碼:joeone
clip_image019
clip_image020
clip_image021
select userenv('language') from dual;
clip_image022
修改字符集跟源庫一致;
clip_image023
clip_image024
clip_image025
clip_image026

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/8494287/viewspace-1356162/,如需轉載,請註明出處,否則將追究法律責任。

相關文章