linux系统 oracle 11g字符界面详细安装过程

论坛 期权论坛 脚本     
已经匿名di用户   2022-5-29 19:27   1809   0

oracle 11g字符界面详细安装过程


1. 修改主机名

sed -i "s/HOSTNAME=localhost.localdomain/HOSTNAME=oracledb/"

2./etc/sysconfig/network //注意替换主机名

hostname oracledb

3.添加主机名与IP对应记录

vi /etc/hosts

172.16.210.224 oracledb

4. 关闭Selinux

sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config

setenforce 0

5. 创建用户和组(root用户:创建Oracle安装组oinstall,数据库管理员组dba,及oracle用户)

\#

groupadd -g 200 oinstall

groupadd -g 201 dba

useradd -u 440 -g oinstall -G dba oracle (主组oinstall,其它组:dba)

passwd oracle \#(P)

6. 修改内核参数(root用户:修改 /etc/sysctl.conf 文件,加上如下参数)

    vi /etc/sysctl.conf


    net.ipv4.ip_local_port_range= 9000 65500
    fs.file-max = 6815744
    kernel.shmall = 10523004
    kernel.shmmax = 6465333657
    kernel.shmmni = 4096
    kernel.sem = 250 32000 100128
    net.core.rmem_default=262144
    net.core.wmem_default=262144
    net.core.rmem_max=4194304
    net.core.wmem_max=1048576
    fs.aio-max-nr = 1048576


    \# sysctl -p \#使配置生效


7. 修改系统资源限制(root用户:修改 /etc/security/limits.conf
文件,加上下面的参数)

vi /etc/security/limits.conf

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

8.修改用户验证选项(root用户下:修改/etc/pam.d/login文件加上如下参数)

vi /etc/pam.d/login

\#\#session required pam_namespace.so \#下面添加一条pam_limits.so
session required pam_limits.so

9.创建安装目录及设置权限

mkdir -p /opt/app/oracle/

chmod 755 /opt/app/oracle/

chown oracle.oinstall -R /opt/app/oracle/

10.设置oracle环境变量

使用oracle账户

su - oracle

vi \~/.bash_profile

\#设置oracle

export ORACLE_BASE=/opt/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1
export PATH=\$PATH:\$ORACLE_HOME/bin
export ORACLE_SID=orcl
export NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/usr/lib:/usr/lib64

11.在/opt目录下 解压oracle软件

上传包至/opt目录,并且修改相应权限

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

chown oracle.oinstall -R /opt/database/

12.检查安装依赖包

Linux 7
https://download.csdn.net/download/ukakasu/10490472

binutils-2.23.52.0.1-12.el7.x86_64

compat-libcap1-1.10-3.el7.x86_64

compat-libstdc++-33-3.2.3-71.el7.i686

compat-libstdc++-33-3.2.3-71.el7.x86_64

gcc-4.8.2-3.el7.x86_64

gcc-c++-4.8.2-3.el7.x86_64

glibc-2.17-36.el7.i686

glibc-2.17-36.el7.x86_64

glibc-devel-2.17-36.el7.i686

glibc-devel-2.17-36.el7.x86_64

ksh

libaio-0.3.109-9.el7.i686

libaio-0.3.109-9.el7.x86_64

libaio-devel-0.3.109-9.el7.i686

libaio-devel-0.3.109-9.el7.x86_64

libgcc-4.8.2-3.el7.i686

libgcc-4.8.2-3.el7.x86_64

libstdc++-4.8.2-3.el7.i686

libstdc++-4.8.2-3.el7.x86_64

libstdc++-devel-4.8.2-3.el7.i686

libstdc++-devel-4.8.2-3.el7.x86_64

libXi-1.7.2-1.el7.i686

libXi-1.7.2-1.el7.x86_64

libXtst-1.2.2-1.el7.i686

libXtst-1.2.2-1.el7.x86_64

make-3.82-19.el7.x86_64

sysstat-10.1.5-1.el7.x86_64

linux 7

binutils-2.20.51.0.2-5.11.el6 (x86_64)

compat-libcap1-1.10-1 (x86_64)

compat-libstdc++-33-3.2.3-69.el6 (x86_64)

compat-libstdc++-33-3.2.3-69.el6.i686

gcc-4.4.4-13.el6 (x86_64)

gcc-c++-4.4.4-13.el6 (x86_64)

glibc-2.12-1.7.el6 (i686)

glibc-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6 (x86_64)

glibc-devel-2.12-1.7.el6.i686

ksh

libgcc-4.4.4-13.el6 (i686)

libgcc-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6 (x86_64)

libstdc++-4.4.4-13.el6.i686

libstdc++-devel-4.4.4-13.el6 (x86_64)

libstdc++-devel-4.4.4-13.el6.i686

libaio-0.3.107-10.el6 (x86_64)

libaio-0.3.107-10.el6.i686

libaio-devel-0.3.107-10.el6 (x86_64)

libaio-devel-0.3.107-10.el6.i686

make-3.81-19.el6

sysstat-9.0.4-11.el6 (x86_64)

rpm -q binutils compat-libstdc++-33 elfutils elfutils-libelf-devel gcc gcc-c++
glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc
libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel |grep “is not
installed”

yum install binutils compat-libstdc++-33 elfutils elfutils-libelf-devel gcc
gcc-c++ glibc glibc-common glibc-devel glibc-headers libaio libaio-devel libgcc
libstdc++ libstdc++-devel make sysstat unixODBC unixODBC-devel

______________________________________________________________________________________________________________________________________________

13.修改配置文件 su - oracle

备份/opt/database/response目录

修改/opt/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=pcs6.ambari

UNIX_GROUP_NAME=oinstall

INVENTORY_LOCATION=/opt/app/oracle/oraInventory

SELECTED_LANGUAGES=en,zh_CN

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

ORACLE_BASE=/opt/app/oracle

oracle.install.db.InstallEdition=EE

oracle.install.db.isCustomInstall=false

oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0

oracle.install.db.DBA_GROUP=dba

oracle.install.db.OPER_GROUP=oinstall

oracle.install.db.CLUSTER_NODES=

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

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

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

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

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

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

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.dbcontrol.enableEmailNotification=false

oracle.install.db.config.starterdb.dbcontrol.emailAddress=

oracle.install.db.config.starterdb.dbcontrol.SMTPServer=

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=

oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

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

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

MYORACLESUPPORT_USERNAME=

MYORACLESUPPORT_PASSWORD=

SECURITY_UPDATES_VIA_MYORACLESUPPORT=

DECLINE_SECURITY_UPDATES=true

PROXY_HOST=

PROXY_PORT=

PROXY_USER=

PROXY_PWD=

____________________________________________________________________________________________________________________________

14.修改/opt/database/response/dbca.rsp

GDBNAME = “orcl” 全局数据库的名字=SID

SID=”orcl” 149行 SID

CHARACTERSET=”AL32UTF8” // 编码 修改并去掉注释

NATIONALCHARACTERSET=”UTF8” // 编码 修改并去掉注释

____________________________________________________________________________________________________________________________

15.安装数据库服务

/opt/database/runInstaller -silent -force -ignorePrereq -responseFile
/opt/database/response/db_install.rsp

如果报错添加 -ignorePrereq //忽略错误

$ORACLE_HOME/bin/netca /silent /responseFile /opt/database/response/netca.rsp

$ORACLE_HOME/bin/dbca -silent -responseFile /opt/database/response/dbca.rsp
-sysPassword oracle -systemPassword oracle

16.创建表空间及用户

sqlplus sys/oracle as sysdba

CREATE TABLESPACE suanfa LOGGING DATAFILE
‘/opt/app/oracle/oradata/ora11g/suanfa1.dbf’ SIZE 10240M AUTOEXTEND ON NEXT 32M
EXTENT MANAGEMENT LOCAL;

CREATE USER taizhou IDENTIFIED BY taizhou DEFAULT TABLESPACE suanfa TEMPORARY
TABLESPACE TEMP;

grant connect,resource,dba to taizhou;

grant create session to taizhou;

分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:81
帖子:4969
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP