zoukankan      html  css  js  c++  java
  • 第四课 Grid Control实验 安装JCH2库并且配置好监听,关键步骤和结果截图

    --从OCM 虚拟机中,克隆了安装oracle之前的状态

    配置网络:

    [root@localhost network-scripts]# ifup ifcfg-eth0

    [root@localhost network-scripts]# ifconfig

    eth0 Link encap:Ethernet HWaddr 00:0C:29:58:5F:3F

    inet addr:192.168.153.112 Bcast:192.168.153.255 Mask:255.255.255.0

    inet6 addr: fe80::20c:29ff:fe58:5f3f/64 Scope:Link

    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

    RX packets:0 errors:0 dropped:0 overruns:0 frame:0

    TX packets:10 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:1000

    RX bytes:0 (0.0 b) TX bytes:560 (560.0 b)

    Interrupt:193 Base address:0x2024

    lo Link encap:Local Loopback

    inet addr:127.0.0.1 Mask:255.0.0.0

    inet6 addr: ::1/128 Scope:Host

    UP LOOPBACK RUNNING MTU:16436 Metric:1

    RX packets:4248 errors:0 dropped:0 overruns:0 frame:0

    TX packets:4248 errors:0 dropped:0 overruns:0 carrier:0

    collisions:0 txqueuelen:0

    RX bytes:6144460 (5.8 MiB) TX bytes:6144460 (5.8 MiB)

    [root@localhost network-scripts]# ping 192.168.153.1

    PING 192.168.153.1 (192.168.153.1) 56(84) bytes of data.

    64 bytes from 192.168.153.1: icmp_seq=0 ttl=128 time=5.08 ms

    --- 192.168.153.1 ping statistics ---

    1 packets transmitted, 1 received, 0% packet loss, time 0ms

    rtt min/avg/max/mdev = 5.082/5.082/5.082/0.000 ms, pipe 2

    [root@localhost network-scripts]#

    --安装JCH2 库 作用:存放历史数据,用于历史分析

    配置oracle用户环境变量

    vi ~/.bash_profile

    export ORACLE_BASE=/u01/app/oracle

    export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH

    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/jdk/bin:$PATH

    image

    配置主机名:

    vi /etc/hosts

    [root@localhost sysconfig]# vi network

    [root@localhost sysconfig]# pwd

    /etc/sysconfig

    [root@localhost sysconfig]#

    重启网络服务:

    service network restart

    image

    给文件夹更换用户及组:

    chown -R oracle:oinstall /u01

    安装软件

    image

    image

    image

    image

    image

    image

    image

    image

    image

    image

    切换到root用户:执行

    /u01/app/oraInventory/orainstRoot.sh

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

    image

    (linux知识:可以把oracle 放到 sudoer里面)

    然后执行:sudo /u01/app/oraInventory/orainstRoot.sh

    oracle is not in the sudoers file. This incident will be reported.

    编辑 /etc/sudoers

    加入下面一行,让oracle用户可以执行所有命令。

    然后oracle用户登录就可以直接使用 sudo *******命令,执行root用户可以执行的命令了

    oracle ALL=(ALL) ALL

    image

    修改sql提示符

    vi /u01/app/oracle/product/10.2.0/db_1/sqlplus/admin/glogin.sql

    image

    image

    装数据库

    输入dbca

    [oracle@ocm2 ~]$ dbca

    Xlib: connection to ":0.0" refused by server

    Xlib: No protocol specified

    尝试修改了DISPLAY变量,仍然提示错误

    后来发现只要直接用oracle用户登录,执行dbca就可以弹出窗口了

    不要通过root su到oracle

    image

    image

    image

    em与gc只能选择一个。,所以这一步要取消em

    image

    image

    image

    image

    image

    image

    image

    image

    下面的按钮图片没有显示出来:Standard Database Components:把jvm和XML DB关掉

    image

    image

    image

    image

    image

    image

    image

    image

    image

    创建监听

    image

    image

    image

    image

    image

    image

    image

    检查:

    [oracle@ocm2 JCH2]$ vi /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora

    image

    修改tnsnames.ora

    JCH1 =

    (description =

    (address=(protocol=tcp)(host=ocm1)(port=1521))

    (connect_data=

    (server = dedicated)

    (service_name = JCH1)

    )

    )

    JCH2 =

    (description =

    (address=(protocol=tcp)(host=ocm2)(port=1521))

    (connect_data=

    (server = dedicated)

    (service_name = JCH2)

    )

    )

    SYS@JCH2> create user jch2 identified by jch2;

    User created.

    SYS@JCH2> grant dba to jch2;

    Grant succeeded.

    SYS@JCH2>

    修改listener.ora

    image

    修改后:

    image

    登录JCH2

    image

  • 相关阅读:
    JDBC之——一个单线程JDBC基类和一些注意事项
    java基础之——类的初始化顺序
    java线程之——synchronized的注意细节
    java线程之——sleep()与wait()的区别
    mysql view(视图)
    select的5中子句where,group by, havaing, order by, limit的使用顺序及实例
    Django的文件下载
    Django中图片的上传并显示
    Django中 基于form的注册,基于ajax的登录
    centos7 安装zabbix3.4
  • 原文地址:https://www.cnblogs.com/oraclesea/p/3517631.html
Copyright © 2011-2022 走看看