单实例手工建库
[oracle@sgdssd-32 response]$ vi /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
10.2.196.75 sgdssd-32
-------这一段新红旗操作系统不用加了
[root@effectiveness-db-05 ~]# vim /etc/profile
if [ $user = "oracle" ]||[ $user = "grid" ]; then
if [ $shell = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
-------
[root@effectiveness-db-05 ~]# vim /etc/security/limits.conf
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@effectiveness-db-05 ~]# vim /etc/pam.d/login
session required pam_limits.so
5、创建用户和组
groupadd -g 1000 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
groupadd -g 1003 asmadmin
groupadd -g 1004 asmdba
groupadd -g 1005 asmoper
useradd -u 2000 -g oinstall -g asmadmin,asmdba,asmoper,dba -d /home/grid grid
useradd -u 2001 -g oinstall -g asmdba,asmadmin,dba,oper -d /home/oracle oracle
passwd grid
passwd oracle
6、创建目录
mkdir -p /oracle/app/grid
mkdir -p /oracle/app/11.2.0/grid
chown -r grid:oinstall /oracle
mkdir -p /oracle/app/oracle
chown -r oracle:oinstall /oracle/app/oracle
chmod -r 775 /oracle
mkdir -p /lsi/oracle/oradata/
chown -r oracle:oinstall /lsi/oracle/oradata/
chown -r oracle:oinstall /lsi
7、设置环境变量
oracle用户:添加如下内容
[root@effectiveness-db-05 ~]# vim /home/oracle/.bash_profile
export oracle_unqname=tmsdb
export oracle_sid=tmsdb
export oracle_base=/oracle/app/oracle
export oracle_home=/oracle/app/oracle/product/11.2.0/db_1
export oracle_owner=oracle
export ld_library_path=$ld_library_path:$oracle_home/lib:/lib:/usr/lib:/usr/local/lib
export nls_lang='american_america.al32utf8'
export path=$path:$home/bin:$oracle_home/bin
unset username
umask 022
[root@effectiveness-db-05 ~]# source /home/grid/.bash_profile
[root@effectiveness-db-05 ~]# source /home/oracle/.bash_profile
大页内存
vi /etc/sysctl.conf
net.core.rmem_max=4194304
net.core.wmem_max=1048576
net.core.rmem_default=262144
net.core.wmem_default=262144
net.ipv4.ip_local_port_range =9000 65500
fs.file-max = 6815744
#fs.aio-max-nr =1048576
fs.aio-max-nr=4194304
kernel.shmmni =4096
####add by roger(hugepage)
vm.nr_hugepages = 100000
sysctl -p
vi /etc/security/limits.conf
oracle soft memlock 204800000
oracle hard memlock 204800000
=============================================================
一安装数据库软件
vi database/response/db_install.rsp
oracle.install.responsefileversion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
oracle.install.option=install_db_swonly
oracle_hostname=kanbanh11
unix_group_name=oinstall
inventory_location=/oracle/app/oracle/
selected_languages=en,zh_cn
oracle_home=/oracle/app/oracle/product/11.2.0/db_1
oracle_base=/oracle/app/oracle
oracle.install.db.installedition=ee
oracle.install.db.eeoptionsselection=false
oracle.install.db.dba_group=dba
oracle.install.db.oper_group=oinstall
oracle.install.db.config.starterdb.type=general_purpose
oracle.install.db.config.starterdb.globaldbname=tmsdb
oracle.install.db.config.starterdb.sid=tmsdb
oracle.install.db.config.starterdb.password.all=sys
oracle.install.db.config.starterdb.control=db_control
oracle.install.db.config.starterdb.automatedbackup.enable=false
oracle.install.db.config.starterdb.storagetype=file_system_storage
decline_security_updates=true
======================================================================
./runinstaller -responsefile /lsi/database/response/wty_db_install.rsp -silent -ignoresysprereqs
=========================================================
二、建库
dbca -silent -responsefile /lsi/database/response/gyc.rsp
[general]
responsefile_version = "11.2.0"
operation_type = "createdatabase"
[createdatabase]
gdbname = "tmsdb"
sid = "tmsdb"
templatename = "general_purpose.dbc"
syspassword = "sys"
systempassword = "sys"
datafiledestination = /lsi/oracle/oradata
storagetype=fs
characterset = "zhs16gbk"
nationalcharacterset= "al16utf16"