您好,登錄后才能下訂單哦!
1、安裝RPM包
# yum install binutils \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
expat \
gcc \
gcc-c++ \
glibc \
glibc-common \
glibc-devel \
glibc-headers \
libaio \
libaio-devel \
libgcc \
libstdc++ \
libstdc++-devel \
make \
pdksh \
sysstat \
unixODBC \
unixODBC-devel
備注:部分機(jī)器 估計(jì) libaio的32和64包都需要,沒(méi)有還不行。
2、固定IP地址,hostname,hosts記錄
[root@localhost ~]
# vim /etc/sysconfig/network
hostname=oracle11g.example.com
[root@oracle11g ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:0C:29:1E:68:68
ONBOOT=yes
IPADDR=192.168.1.16
NETMASK=255.255.255.0
GATEWAY=192.168.1.254
[root@oracle11g ~]
# ifconfig eth0 | head -n 2
eth0 Link encap:Ethernet HWaddr 00:0C:29:9F:DF:4A
inet addr:192.168.1.16 Bcast:192.168.1.255 Mask:255.255.255.0
[root@oracle11g ~]
# grep -v '^#' /etc/hosts
127.0.0.1localhost.localdomain localhost
192.168.1.16 oracle11g.example.com
3、設(shè)置系統(tǒng)的操作資源
[root@oracle11g ~]
#vim /etc/sysctl.conf 添加到文件底端
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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[root@oracle11g ~]
#sysctl -p
shell限制
[root@oracle11g ~]
# grep -v '^#' /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@oracle11g ~]
# grep 'limit' /etc/pam.d/system-auth
session required pam_limits.so
4、設(shè)置oracle用戶
建議指定GID和UID方式(尤其集群環(huán)境)
[root@oracle11g ~]
# groupadd -g 1000 oinstall
[root@oracle11g ~]
# groupadd -g 1001 dba
[root@oracle11g ~]
# useradd -u 1000 -g oinstall -G dba oracle
[root@oracle11g ~]
# passwd oracle
建立oracle軟件安裝文件目錄
[root@oracle11g ~]
# mkdir -p /u01/oracle
[root@oracle11g ~]
# chown -R oracle:oinstall /u01/
設(shè)置oracle環(huán)境變量
[root@oracle11g ~]
vi ~oracle/.bash_profile
umask 022
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
export ORACLE_SID=oracle11g
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
加載配置
oracle用戶注銷重新登錄 或 #
#su - oracle
#source .bash_profile
5、解壓安裝文件
#unzip linux.x64_11gR2_database_1of2.zip -d /mnt
#unzip linux.x64_11gR2_database_2of2.zip -d /mnt
6、修改配置文件
[root@oracle11g ~]# grep -v '^#' /mnt/database/response/db_install.rsp (參考 靜默安裝----配置文件 說(shuō)明)
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=oracle11g.example.com
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/oracle
SELECTED_LANGUAGES=en,zh_CN,zh_TW (選擇要支持的語(yǔ)言)
ORACLE_HOME=/u01/oracle/product/11.2.0
ORACLE_BASE=/u01/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.isCustomInstall=true
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.characterSet=AL32UTF8 (根據(jù)生產(chǎn)環(huán)境中的需要,進(jìn)行修改字符集)
oracle.install.db.config.starterdb.memoryOption=true
oracle.install.db.config.starterdb.installExampleSchemas=false
oracle.install.db.config.starterdb.enableSecuritySettings=true
oracle.install.db.config.starterdb.control=DB_CONTROL
oracle.install.db.config.starterdb.automatedBackup.enable=false
DECLINE_SECURITY_UPDATES=true (要家上,要不然會(huì)報(bào)錯(cuò) 【server】
email address 錯(cuò)誤
)
7、靜默安裝數(shù)據(jù)庫(kù)
[root@oracle11g ~]#cd /mnt/database/response
[root@oracle11g response]$ chown -R oracle:oinstall /mnt/database/response/db_install.rsp
[root@oracle11g response]$chmod 700 db_install.rsp
#su - oracle
#cd /mnt/database/
$ ./runInstaller -silent -force -responseFile /mnt/database/response/db_install.rsp (注意要寫(xiě)絕對(duì)路徑)
如報(bào) ins-13014 錯(cuò)誤 不需要理會(huì) 報(bào) ins-07001 配置文件中的有些文件找不到,對(duì)安裝沒(méi)有
多大影響
(日志文件 看安裝進(jìn)度 )
#tail -100f /u01/oracle/logs/installActions2013-06-10_04-01-32PM.log
帶出現(xiàn)以下內(nèi)容,說(shuō)明安裝成功
#!/bin/sh
#Root scripts to run
/u01/oracle/orainstRoot.sh
/u01/oracle/product/11.2.0/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
4. Return to this window and hit "Enter" key to continue
Successfully Setup Software.
注意:必須用root用戶跑一下腳本
#/u01/oracle/orainstRoot.sh
#/u01/oracle/product/11.2.0/root.sh
[root@oracle11g 11.2.0]# su - oracle
[oracle@oracle11g ~]$ ps aux |grep ora_
oracle 18649 0.0 0.0 61188 744 pts/2 S+ 16:31 0:00 grep ora_ (說(shuō)明沒(méi)有數(shù)據(jù)庫(kù)) 只安裝了實(shí)例
[oracle@oracle11g ~]$ sql
sqlite3 sqlldr sqlldrO sqlplus
[oracle@oracle11g ~]$ sqlplus / as sysdba (出現(xiàn)錯(cuò)誤,但實(shí)例已安裝完成)
sqlplus: error while loading shared libraries: /u01/oracle/product/11.2.0/lib/libclntsh.so.11.1: cannot restore segment prot after reloc: Permission denied
(關(guān)閉防火墻與sensetforce )
[root@oracle11g ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
[root@oracle11g ~]# getenforce
Enforcing
[root@oracle11g ~]# setenforce 0
[root@oracle11g ~]# getenforce
Permissive
[oracle@oracle11g ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 10 16:40:29 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL>
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。