静默安装11g单机

静默安装11g单机

Oracle安装包上传解压,oraclelinux的iso文件上传挂载

#### firewall ####

service iptables stop

chkconfig iptables off

#### selinux ####

vim /etc/selinux/config =>SELINUX=disabled

setenforce 0

#### ip ####

vim/etc/sysconfig/network-scripts/ifcfg-ethX

=>

DEVICE=ethX

TYPE=Ethernet

ONBOOT=yes

NM_CONTROLLED=yes

BOOTPROTO=none

IPADDR=192.168.1.XXX

PREFIX=24

DEFROUTE=yes

IPV4_FAILURE_FATAL=yes

IPV6INIT=no

NAME="System ethX"

UUID=

HWADDR=

#iso作为yum镜像源

cd /etc/yum.repos.d/

将iso挂载

vi CentOS-Base.repo

[Base]

name=CentOS-7 -Base

baseurl=file:///iso/oraclelinux/ --挂载目录

gpgcheck=0

enabled=1

yum clean all

yum makecache

yum -y install binutils compat-libcap1compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.develcompat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devellibaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686libstdc++-devel libstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686make sysstat unixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

创建目录、用户和组

groupadd -g 1010 oinstall

groupadd -g 1020 dba

useradd -u 1100 -g oinstall -G dba oracle

mkdir -p/u01/app/oracle/product/11.2.0/db_1

mkdir /u01/app/oraInventory

mkdir /u01/app/oradata

mkdir /u01/app/recovery_data

chown -R oracle:oinstall /u01

chmod -R 775 /u01

oracle用户下

Vim ~/.bash_profile

export ORACLE_BASE=/u01/app/oracle

exportORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

exportPATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

export ORACLE_SID=orcl

export ORACLE_PID=ora11g

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib

source ~/.bash_profile # 使配置立即生效

#### sysctl,limits,login ####

vim /etc/sysctl.conf

=>

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmmax = 12025908428

kernel.shmall = 2936012

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048586

kernel.shmmax:官方建议值:物理内存值 -1 byte

kernel.shmall:物理内存值/4k

sysctl -p

修改系统资源限制

vim /etc/security/limits.conf # 编辑 limits.conf,末尾处添加下面的参数

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

修改用户验证选项

vim /etc/pam.d/login

找到这一行:session required pam_namespace.so ,在其下一行添加一条pam_limits.so

session required pam_limits.so

安装依赖包

yum -y install binutils compat-libcap1compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.develcompat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devellibgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devellibstdc++-devel*.devel libXi libXi*.i686 libXtst libXtst*.i686 make sysstatunixODBC unixODBC*.i686 unixODBC-devel unixODBC-devel*.i686

cd /packages/database/response # 进入 response 目录

cp db_install.rsp db_install_copy.rsp # 将 db_install.rsp 备份一份,以免修改出错

vim db_install.rsp # 编辑

如下

[oracle@localhost recovery_data]$ !85

less/packages/database/response/db_install.rsp |grep -v "#"|grep -v"^$"

oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

oracle.install.option=

ORACLE_HOSTNAME=localhost.localdomain

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/u01/app/oraInventory

SELECTED_LANGUAGES=en,zh_CN

ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

ORACLE_BASE=/u01/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.EEOptionsSelection=false

oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,oracle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

oracle.install.db.CLUSTER_NODES=

oracle.install.db.isRACOneInstall=

oracle.install.db.racOneServiceName=

oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

oracle.install.db.config.starterdb.globalDBName=ora11g

oracle.install.db.config.starterdb.SID=orcl

oracle.install.db.config.starterdb.characterSet=ZHS16GBK

oracle.install.db.config.starterdb.memoryOption=true

oracle.install.db.config.starterdb.memoryLimit=15940

oracle.install.db.config.starterdb.installExampleSchemas=false

oracle.install.db.config.starterdb.enableSecuritySettings=true

oracle.install.db.config.starterdb.password.ALL=oracle

oracle.install.db.config.starterdb.password.SYS=

oracle.install.db.config.starterdb.password.SYSTEM=

oracle.install.db.config.starterdb.password.SYSMAN=

oracle.install.db.config.starterdb.password.DBSNMP=

oracle.install.db.config.starterdb.control=DB_CONTROL

oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

oracle.install.db.config.starterdb.automatedBackup.enable=false

oracle.install.db.config.starterdb.automatedBackup.osuid=

oracle.install.db.config.starterdb.automatedBackup.ospwd=

oracle.install.db.config.starterdb.storageType=FILE_SYSTEM_STORAGE

oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=/home/oradata

oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=/home/recovery_data

oracle.install.db.config.asm.diskGroup=

oracle.install.db.config.asm.ASMSNMPPassword=

MYORACLESUPPORT_USERNAME=

MYORACLESUPPORT_PASSWORD=

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

DECLINE_SECURITY_UPDATES=true

PROXY_HOST=

PROXY_PORT=

PROXY_USER=

PROXY_PWD=

PROXY_REALM=

COLLECTOR_SUPPORTHUB_URL=

oracle.installer.autoupdates.option=

oracle.installer.autoupdates.downloadUpdatesLoc=

AUTOUPDATES_MYORACLESUPPORT_USERNAME=

AUTOUPDATES_MYORACLESUPPORT_PASSWORD=

su - oracle # 切换到 oracle 用户

cd /packages/database/

./runInstaller -silent -force -responseFile /packages/database/response/db_install.rsp

# 安装

tail -f 日志文件 #查看安装日志

执行两个脚本

/u01/app/oracle/oraInventory/orainstRoot.sh

/u01/app/oracle/product/11.2.0/db_1/root.sh

查看监听和库是否正常

开启归档

Archive log list;

Startup mount

Alter database archivelog;

Alter database open;

alter system setlog_archive_dest_1='location=/u01/app/recovery_data';

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值