按不同linux系统要求安装,建议查看官方文档
用户组: oinstall 和 dba
用户一般建: oracle
[root@]# vim /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_broadcasts = 1
fs.file-max = 6815744 #设置最大打开文件数
fs.aio-max-nr = 1048576
kernel.shmall = 2097152 #共享内存的总量,8G 内存设置:2097152*4k/1024/1024
kernel.shmmax = 2147483648 #最大共享内存的段大小
kernel.shmmni = 4096 #整个系统共享内存端的最大数
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500 #可使用的 IPv4 端口范围
net.core.rmem_default = 262144
net.core.rmem_max= 4194304
net.core.wmem_default= 262144
net.core.wmem_max= 1048576
[root@]# sysctl -p
[root@]# vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@]# vim /home/oracle/.bash_profile
export ORACLE_BASE=/u01/app/oracle #oracle 数据库安装目录
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1 #oracle 数据库路径
export ORACLE_SID=orcl #oracle 启动数据库实例名
export PATH=$ORACLE_HOME/bin:/user/sbin:$PATH
[root@]# su oracle # 切换oracle用户
[oracle@]# source /home/oracle/.bash_profile # 使环境变量生效
[oracle@]# export LANG=en_US # 防乱码
[oracle@]# vim database/response/db_install.rsp # 编辑响应文件
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=hostname
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.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
DECLINE_SECURITY_UPDATES=true
[oracle@]# ./runInstaller -ignorePrereq -ignoreSysPrereqs -noconfig -silent -responseFile /绝对路径/database/response/db_install.rsp
[oracle@]# vim database/response/netca.rsp
SHOW_GUI=false
[oracle@]# $ORACLE_HOME/bin/netca /silent /responseFile /绝对路径/database/response/netca.rsp
[oracle@]# vim database/response/dbca.rsp
SID = "oracle"
SYSPASSWORD = "password"
SYSTEMPASSWORD = "password"
SYSMANPASSWORD = "password"
DBSNMPPASSWORD = "password"
DATAFILEDESTINATION ="/u01/app/oracle/flash_recovery_area"
CHARACTERSET = "ZHS16GBK"
TOTALMEMORY = "6000"
SCRIPTDESTINATION ="/u01/app/oracle/product/11.2.0/db_1/sysman/admin/scripts"
[oracle@]# $ORACLE_HOME/bin/dbca -silent -responseFile /绝对路径/database/response/dbca.rsp
[oracle@]# su root
[root@]# /u01/app/oraInventory/orainstRoot.sh
[root@]# /u01/app/oracle/product/11.2.0/db_1/root.sh