centos7.2 安装oracle 基于科大讯飞的自动化部署

部署前准备

  • 1.安装前请配置好网络,/etc/hosts/等
    参考
    hostname //查看主机名 结果如下图
    image.png

    vim /etc/hosts //加入一行 192.168.1.147 ISM ,需要reboot重启机器后,才能能看到
    2.依赖包的安装
    yum install binutils-2.* compat-libstdc++-33* elfutils-libelf-0.* elfutils-libelf-devel-* gcc-4.* gcc-c++-4.* glibc-2.* glibc-common-2.* glibc-devel-2.* glibc-headers-2.* ksh-2* libaio-0.* libaio-devel-0.* libgcc-4.* libstdc++-4.* libstdc++-devel-4.* make-3.* sysstat-7.* unixODBC-2.* unixODBC-devel-2.* pdksh*
    3.关闭防火墙
    参考

4、自动化部署程序修改 env_oracle_v2.sh

最好设置成一个统一的地址如/iflytek/oracle
IPADDR=ifconfig eth0|grep "inet addr"|awk '{print $2}'|cut -d: -f2 ##注意此处有的网卡可能并不是eth0,请根据实际情况修改

安装地址,根据实际情况
ORA_BASE_DIR=/opt/oracle/
ORA_INVENTORY=/opt/oraInventory/
useradd -g oinstall -G dba -m -d /home/oracle oracle

解压安装包

unzip -q pwd/linux.x64_11gR2_database_1of2.zip -d /home/oracle
unzip -q pwd/linux.x64_11gR2_database_2of2.zip -d /home/oracle
unzip -q pwd/rsp.zip -d /home/oracle
chown -R oracle:oinstall /home/oracle

修改oracle用户环境变量##

cat pwd/oracle_user_env >>/home/oracle/.bash_profile

2、oracle_user_env
ORACLE_BASE=/opt/oracle 配置地址,根据实际情况配置

3、rsp.zip/db_ca.rsp
[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "orcl"
SID = "orcl" #对应plsql中的tnsnames.ora配置信息
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "oracle" #sys用户密码
SYSTEMPASSWORD = "oracle"
SYSMANPASSWORD = "oracle"
DBSNMPPASSWORD = "oracle"
CHARACTERSET = "ZHS16GBK" #字符编码集

DATAFILEDESTINATION = $ORACLE_BASE/oradata

[createTemplateFromDB]
SOURCEDB = "myhost:1521:orcl"
SYSDBAUSERNAME = "system"
TEMPLATENAME = "My Copy TEMPLATE"
[createCloneTemplate]
SOURCEDB = "orcl"
TEMPLATENAME = "My Clone TEMPLATE"
[DELETEDATABASE]
SOURCEDB = "orcl"
[generateScripts]
TEMPLATENAME = "New Database"
GDBNAME = "orcl11.us.oracle.com"
[CONFIGUREDATABASE]
SOURCEDB = "orcl"
SYSDBAUSERNAME = "sys"
[ADDINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
NODELIST=
SYSDBAUSERNAME = "sys"
[DELETEINSTANCE]
DB_UNIQUE_NAME = "orcl11g.us.oracle.com"
INSTANCENAME = "orcl11g"
SYSDBAUSERNAME = "sys"

4、db_soft_install.rsp
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0 #默认即可
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=rhel6 #更改为部署所在的主机名,可通过hostname命令查看
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/opt/oraInventory #修改为具体地址,多处保持一致
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/opt/oracle/product/11.2.0/db_1 #修改为具体地址,多处保持一致
ORACLE_BASE=/opt/oracle #修改为具体地址

5.参考静默安装的文档

6.开启监听

新打开窗口使用oracle 用户登录 
查看监听状态 :lsnrctl  status 
开启监听:lsnrctl  start  
关闭监听 :lsnrctl  stop

7.开启oracle服务

切换oracle用户:su – oracle
连接sql         sqlplus /nolog
连接dba       >conn / as sysdba
启动          >startup
退出          >quit
备注:启动后显示
Total System Global Area 7081771008 bytes
Fixed Size          2214176 bytes
Variable Size        3825207008 bytes
Database Buffers     3221225472 bytes
Redo Buffers           33124352 bytes
Database mounted.
Database opened.

你可能感兴趣的:(centos7.2 安装oracle 基于科大讯飞的自动化部署)