对oracle10grac配置em-程序员宅基地

技术标签: java  操作系统  数据库  

配置em

对oracle10grac配置em

 

 

 

A--:oracle 删除EM

 

首先查看em的状态

$ emctl status dbconsole

如果是正在运行,则先停止其运行,这是个好习惯

$ emctl stop dbconsole

然后,执行命令

$ emca -deconfig dbcontrol db -repos drop

 

删除时,很可能sysman用户没有删除,还存在一些role和public synonym

需要下面的SQL语句

drop user sysman cascade;

 drop user MGMT_VIEW cascade;

 drop role MGMT_USER;

 drop public synonym MGMT_TARGET_BLACKOUTS;

 drop public synonym SETEMVIEWUSERCONTEXT;

 

 

执行完就删除EM了

可以通过下面的视图产看前面要删除的对象

dba_synonyms,dba_roles,dba_users

 

然后重新配置,使用

$ emca -config dbcontrol db -repos create

 

 

B--:配置Oracle 10G EM

 

第一种方法,用dbca配置em,也是最简单的方法。

在命令提示符下输入dbca,出现"Database Configuration Assistant 欢迎使用"界面,点下一步,选择配置数据库,在点下一部,选择要配制em的数据库,然后在点下一步,把"使用Enterprise Manager配置数据库"选项打上钩,因为是配制单实例的,所以选择"使用Database Control管理数据",下面两个选项启用电子邮件通知和启用每日备份根据自己情况选择,在点一下部,把"Enterprise anager 资料档案库"也选择起来,否则不能使用em,在点下一步,然后提示需要设置DBSNMP和SYSMAN两个用户设置口令,根据自己情况来设置是否口令设置成一样,还是分开设置。

再点一下步,再点完成,就出现配制数据库提示信息框,等配制完成就退出dbca,完成数据库em配制。

 

优点:使用这种方法简单,方便,也不容易配置错误,不需要记注复杂命令,一般配制都能成功。

缺点:在不能使用dbca环境当中就不能使用了,在Linux下工手创建数据库是不能用dbca配制,dbca也不能删除em

资料库存和取消Database Control配制。

 

 

第二种方法,用emca配置em

emca是一个命令提示符,使用格式和方法在命令提示符下输入emca,屏幕上会出现emca使用帮助。

 

命令帮助如下:

emca [操作] [模式] [数据库类型] [标记] [参数]

 

常用以下两个命令:

emca -config dbcontrol db -repos create 创建em资料库并同时配制Database Control

emca -deconfig dbcontrol db -repos drop 删除Database Control并同时删除em资料库

 

[操作] 对应到-config和-deconfig 意思是配制意思。注意"-"不能少

[模式] 对应到dbcontrol,意思是Database Control

[数据库类型] 对应到 db ,意思是数据库,对数据库 (包括使用 ASM 的数据库) 执行配置操作

[标记] 这里没有。

[参数] 对应到-repos create和-repos drop,意思创建em资料库和删除当前em资料库

 

如果我们没有配制过Database Control也没有em资料库,我们输入如下命令

emca -config dbcontrol db -repos create

 

 

 

如果原来em资料库已经创建好,可以配制Database Control

emca -config dbcontrol db

 

如果需要删除Database Control配制,但不删除em资料库

emca -deconfig dbcontrol db

 

如果需要全部删除,输入如下命令:(注!dbca是没有删除em资料库和取消Database Control配制)

emca -deconfig dbcontrol db -repos drop

 

删除一个EM资料库,但如果Database Control配制好,已经不能使用,而且需要DBConsole服务停止才能使用。

emca -repos drop

 

创建一个EM资料库,如果Database Control配制好,但发现em资料库不存在,可以用如下命令创建。

emca -repos create

 

重建一个EM资料库

emca -repos recreate

 

如果我们数据库没有配制过任何信息,就用一条语句就把配制好

emca -config dbcontrol db -repos create

需要全部删除em资料库用

emca -deconfig dbcontrol db -repos drop

但我们也可以一步步配制,或在em出问题,我们就需要用到分开命令来处理了。

 

命令总结:

emca -config dbcontrol db -repos create 创建em资料库,并配制Database Control

emca -deconfig dbcontrol db -repos drop 取消配制Database Control,并删除em资料库

emca -repos create 创建一个EM资料库

emca -repos recreate 重建一个EM资料库

emca -repos drop 删除一个EM资料库

emca -config dbcontrol db 配置数据库的 Database Control

emca -deconfig dbcontrol db 删除数据库的 Database Control配置

emctl start dbconsole 先设置ORACLE_SID环境变量后,启动EM console服务

emctl stop dbconsole 先设置ORACLE_SID环境变量后,停止EM console服务

emctl status dbconsole 先设置ORACLE_SID环境变量后,查看EM console服务的状态

 

优点:能在dbca不能完成em配制场合完成配制,也能删除em。

缺点:复杂,命令参数不选择正确,经常会报错。

由于在命令下面经常会发生错误,发生错误要根据错误提示和日志去分析错误原因,然后在根据错误原因去解决错误的方法,才能把问题解决掉。

 

注:如果登录出现乱码,问题在于安装时DK/jre 字符集的自动选择,在$ORALCE_HOME/jdk/jre/lib 目录下有多种字符集,

 

      选择一种合适的字符集替换缺省文件

 

      cp font.properties.zh_CN.Redhat font.properties

 

      替换后需要清理一下Cache,重启EM即可。Cache路径通常位于     

 

      $ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs 清除所有的gif即可    

 

注:手工配置EM的时候,注意检查dba_users 中sysman,dbsnmp用户是否可用

 

       否则进入EM时,无登录选项和功能选项

 

 

 

C--:10g r2 em问题

 

配置database control(em)如下:

$ emca -config dbcontrol db

 

STARTED EMCA at Sep 6, 2016 12:23:53 PM

EM Configuration Assistant, Version 10.2.0.1.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: MICSPROD

Listener port number: 1521

Password for SYS user: 

Password for DBSNMP user: 

Password for SYSMAN user: 

Email address for notifications (optional):

Outgoing Mail (SMTP) server for notifications (optional):

-----------------------------------------------------------------

 

You have specified the following settings

 

Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1

 

Database hostname ................ micsgmm01

Listener port number ................ 1521

Database SID ................ MICSPROD

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............

 

-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: y

Sep 6, 2016 12:24:30 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MICSPROD/emca_2016-09-06_12-23-53-PM.log.

Sep 6, 2016 12:24:33 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Sep 6, 2016 12:27:14 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Database Control secured successfully.

Sep 6, 2016 12:27:14 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

WARNING: Error executing /u01/app/oracle/product/10.2.0/db_1/bin/emctl start dbconsole

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.EMConfig perform

SEVERE: Error starting Database Control

Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MICSPROD/emca_2016-09-06_12-23-53-PM.log for more details.

Could not complete the configuration. Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MICSPROD/emca_2016-09-06_12-23-53-PM.log for more details.

 

 

Database Control启动失败。根据提示查看日志

 

# tail -f /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MICSPROD/emca_2016-09-06_12-23-53-PM.log

 

 

Sep 6, 2016 12:27:14 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

CONFIG: Starting execution: /u01/app/oracle/product/10.2.0/db_1/bin/emctl start dbconsole

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

CONFIG: Exit value of 1

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

CONFIG: TZ set to PRC

Oracle Enterprise Manager 10g Database Control Release 10.2.0.4.0 

Copyright (c) 1996, 2007 Oracle Corporation.  All rights reserved.

https://micsgmm01:1158/em/console/aboutApplication

Starting Oracle Enterprise Manager 10g Database Control ............................................................................................. failed.

------------------------------------------------------------------

Logs are generated in directory /u01/app/oracle/product/10.2.0/db_1/micsgmm01_MICSPROD/sysman/log

 

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.util.PlatformInterface executeCommand

WARNING: Error executing /u01/app/oracle/product/10.2.0/db_1/bin/emctl start dbconsole

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.EMConfig perform

SEVERE: Error starting Database Control

Refer to the log file at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MICSPROD/emca_2016-09-06_12-23-53-PM.log for more details.

Sep 6, 2016 12:31:52 PM oracle.sysman.emcp.EMConfig perform

CONFIG: Stack Trace:

oracle.sysman.emcp.exception.EMConfigException: Error starting Database Control

        at oracle.sysman.emcp.EMDBPostConfig.performConfiguration(EMDBPostConfig.java:646)

        at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:224)

        at oracle.sysman.emcp.EMDBPostConfig.invoke(EMDBPostConfig.java:193)

        at oracle.sysman.emcp.EMConfig.perform(EMConfig.java:184)

        at oracle.sysman.emcp.EMConfigAssistant.invokeEMCA(EMConfigAssistant.java:486)

        at oracle.sysman.emcp.EMConfigAssistant.performConfiguration(EMConfigAssistant.java:1142)

        at oracle.sysman.emcp.EMConfigAssistant.statusMain(EMConfigAssistant.java:470)

        at oracle.sysman.emcp.EMConfigAssistant.main(EMConfigAssistant.java:419)

 

 

网上查资料,是oracle的bug。

Oracle对此的解释是:

 

In Enterprise Manager Database Control with Oracle Database 10.2.0.4 and 10.2.0.5, the root certificate used to secure communications via the Secure Socket Layer (SSL) protocol will expire on 31-Dec-2010 00:00:00. The certificate expiration will cause errors if you attempt to configure Database Control on or after 31-Dec-2010. Existing Database Control configurations are not affected by this issue.

 

If you plan to configure Database Control with either of these Oracle Database releases, Oracle strongly recommends that you apply Patch 8350262 to your Oracle Home installations before you configure Database Control. Configuration of Database Control is typically done when you create or upgrade Oracle Database, or if you run Enterprise Manager Configuration Assistant (EMCA) in standalone mode.

 

可以查看:Enterprise Manager Database Control Configuration - Recovering From Errors Due to CA Expiry on Oracle Database 10.2.0.4 or 10.2.0.5 [Video] [ID 1222603.1]

 

此问题是由于enterprise manager database control组件的跟CA证书授权过期造成的,其证书到期日为2010年12月31日,2011年安装此版本数据库都会出现这个问题,官方的解决方案是打Patch8350262。

 

解决方法:

 

如果是在创建实例前就已经打了这个patch的话,那之后就不会报错了。如果是在创建实例之后才打的这个patch,那么需要执行以下:

 

对于单实例:

1.使用Opatch安装Patch 8350262

2.设置ORACLE_HOME and ORACLE_SID 环境变量,执行 <PATCH_HOME>/killDBConsole.(windows 平台省略这一步)

3.Re-secure Database Control with the following command:

<ORACLE_HOME>/bin/emctl secure dbconsole -reset

4.Re-start Database Control with the following command:

<ORACLE_HOME>/bin/emctl start dbconsole

 

对于RAC:

1.使用Opatch安装Patch 8350262, 在一个节点安装就ok了。

2.在所有节点执行:设置ORACLE_HOME and ORACLE_SID 环境变量,执行 <PATCH_HOME>/killDBConsole.(windows 平台省略这一步)

3.Re-secure Database Control on the first cluster node with the following command:

<ORACLE_HOME>/bin/emctl secure dbconsole -reset

4.Re-secure Database Control on the remaining cluster nodes with the following command. Note that the -reset switch is not included with this command:

<ORACLE_HOME>/bin/emctl secure dbconsole

5.Re-start Database Control by executing the following command on each node in the cluster:

<ORACLE_HOME>/bin/emctl start dbconsole

 

可以将计算机时间调至2009年,则可以通过校验,也能成功安装数据库控制台。

 

 

 

 

 

 

D--:10g r2修复em bug

 

下载补丁:p8350262_10204_Generic.zip

 

该补丁无需停止数据库进程与监听进程,只需确保没有oracle home下的与java相关的进程即可。
打补丁之前,可以先把opatch的路径加入PATH环境变量

 

(注:以下操作在oracle用户下)

 

将补丁上传到/u02/

 

-rw-r--r-- 1 oracle oinstall    40488 Sep  6 13:53  p8350262_10204_Generic.zip

 

0--删除em的配置

emca -deconfig dbcontrol db -repos drop

 

 

1--检查opatch版本是否为10.2.0.4 , 执行:

/u01/app/oracle/product/10.2.0/db_1/OPatch/opatch version

 

 

2--unzip p8350262_10204_Generic.zip 进入解压后的patch目录

cd /u02/8350262/

 

打补丁8350262

/u01/app/oracle/product/10.2.0/db_1/OPatch/opatch apply

 

查看补丁

/u01/app/oracle/product/10.2.0/db_1/OPatch/opatch lsinventory

 

 

3—配置em

emca -config dbcontrol db -repos create

 

 

[oracle@micsgmm01 ~]$ emca -config dbcontrol db -repos create

 

STARTED EMCA at Sep 6, 2016 2:46:52 PM

EM Configuration Assistant, Version 10.2.0.1.0 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: MICSPROD

Listener port number: 1521

Password for SYS user: 

Password for DBSNMP user: 

Password for SYSMAN user: 

Email address for notifications (optional):

Outgoing Mail (SMTP) server for notifications (optional):

-----------------------------------------------------------------

 

You have specified the following settings

 

Database ORACLE_HOME ................ /u01/app/oracle/product/10.2.0/db_1

 

Database hostname ................ micsgmm01

Listener port number ................ 1521

Database SID ................ MICSPROD

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............

 

-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: y

Sep 6, 2016 2:47:15 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/emca/MICSPROD/emca_2016-09-06_02-46-52-PM.log.

Sep 6, 2016 2:47:18 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

Sep 6, 2016 2:48:41 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Sep 6, 2016 2:48:43 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Sep 6, 2016 2:51:13 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Database Control secured successfully.

Sep 6, 2016 2:51:13 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Sep 6, 2016 2:52:48 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Sep 6, 2016 2:52:48 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>>>>>>> The Database Control URL is https://micsgmm01:1158/em <<<<<<<<<<<

Enterprise Manager configuration completed successfully

FINISHED EMCA at Sep 6, 2016 2:52:48 PM

 

 

 

如果没有删除em配置,就打补丁,则不能启动Database Control,还需要Re-secure Database Control。

Re-secure Database Control之前,可以使用patch 8350262目录下的脚本killDBConsole强制停止Database Control相关的进程。

$ ./killDBConsole

 

完成之后进行Re-secure Database Control :

$ emctl secure dbconsole -reset

根据提示输入管理员密码,然后会有两次确认请求,两次都是输入大写的Y

 

 

然后启动em

$ emctl start dbconsole

 

 

最后启动正常,访问:https://ip:1158/em正常访问登陆,则bug修复成功,em配置完成;

 

 

 

附:PATCH解压后的README文件说明:

[oracle@micsgmm01 8350262]$ cat README.txt

=========================================================================

Interim Patch for Base Bug: 8350262

=========================================================================

 

Date: Sep 10, 2010

-------------------------------------------------------------------------

 Platform Patch for      : Generic

 Product Patched         : 10.2.0.4.0

 Product Version         : Enterprise Manager Database Control

 

Bugs Fixed by this patch:

-------------------------

8350262:CREATE DBCONSOLE CERT WITH 10YEAR VALIDITY

 

Patch Preinstall Steps:

-----------------------

 

1. For non-recommended patches, you must have the exact symptoms

   described in the service request (SR).

 

2. Verify the OUI Inventory.

 

OPatch needs access to a valid OUI inventory to apply patches.

Validate the OUI inventory with the following command:

 

  % opatch lsinventory

 

If the command errors out, contact Oracle Support and work to validate

and verify the inventory setup before proceeding.

 

3. Please use the latest Version of OPatch.

 

Oracle recommends that all customers be on the latest version of OPatch.

Please review the following metalink note and follow the instructions

to update to the latest version if needed:

 

 https://metalink.oracle.com/metalink/plsql/ml2_documents.showNOT?p_id=224346.1

 

4. Confirm executables appear in your system PATH.

 

The patching process will use the unzip and the opatch executables.  After

sourcing the ORACLE_HOME environment, confirm both of these exist before

continuing:

 

  - "which opatch"

  - "which unzip"

 

If either of these executables do not show in the PATH, correct the problem

before proceeding.

 

5. Create a location for storing the unzipped patch.  This location

will be referred to later in the document as <PATCH_TOP>.

 

6. Unzip the patch zip file into the <PATCH_TOP>.

 

  unzip -d <PATCH_TOP> p8350262_102040_Generic.zip

 

7. Shut down services running from the ORACLE_HOME.

 

Before applying this patch, do a clean shut down of all services

running from the ORACLE_HOME.

 

Patch Installation Steps:

-------------------------

 

1. Shutdown EM DB Console using the following command.

 

       % $ORACLE_HOME/bin/emctl stop dbconsole

 

2. Set your current directory to the directory where the patch

   is located:

    % cd <PATCH_TOP>/8350262

 

   Ensure that the directory containing the opatch script appears in

   your $PATH; then enter the following command:

    % opatch apply

 

3. Start EM DB Console using the following command.

 

      % $ORACLE_HOME/bin/emctl start dbconsole

 

NOTE:

------

There may be cases when Starting dbconsole may fail post 31-Dec-2010.

In this case, Please set ORACLE_HOME to your Database Home & ORACLE_SID

and run the following from the patch folder.

   % ./killDBConsole

 

 

Patch Deinstallation Instructions:

----------------------------------

1. Shutdown EM DB Console using the following command.

 

       % $ORACLE_HOME/bin/emctl stop dbconsole

 

2. Set your current directory to the directory where the patch

   is located:

    % cd <PATCH_TOP>/8350262

 

3. Ensure that the directory containing the opatch script appears in

   your $PATH; then run the following command:-

   %  opatch rollback -id 8350262

  

4. Start EM DB Console using the following command.

 

      % $ORACLE_HOME/bin/emctl start dbconsole

-------------------------------------------------------------------------------

相关参考:

oracle 删除EM

http://blog.csdn.net/yan19880901/article/details/8113066

 

Oracle 10g,11g中EM的安装配置过程

http://www.linuxidc.com/Linux/2015-04/115922.htm

 

oracle 10g rac配置em

http://www.2cto.com/database/201408/326736.html

 

10g RAC -10.2.0.4-dbca建库时配置OEM遇到BUG-p8350262

http://www.linuxidc.com/Linux/2014-02/97111.htm

 

Oracle10.2.0.4版本Database Control 配置问题

http://www.360doc.com/content/12/0327/17/5287961_198336675.shtml

 

Oracle10g补丁Patch 8350262 下载地址(补丁是平台通用,分数据库版本)

1--:oracle官网注册能下载

2--:其他网站的资源

http://down.51cto.com/data/761747

http://download.csdn.net/detail/u011302321/6949981

 

转载于:https://www.cnblogs.com/hw-1015/p/5947539.html

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
本文链接:https://blog.csdn.net/weixin_34390105/article/details/93367980

智能推荐

sqlalchemy数据插入_sqlalchemy 插入-程序员宅基地

文章浏览阅读1.4k次。import sqlalchemyfrom sqlalchemy import create_enginefrom sqlalchemy.ext.declarative import declarative_basefrom sqlalchemy import Column,Integer,Stringfrom sqlalchemy.orm import sessionmaker#创建对象的基类:Base = declarative_base()#定义User对象:class User(_sqlalchemy 插入

关于CCF CSP-J/S有关事项的问答_编程ccfcsp认证资料-程序员宅基地

文章浏览阅读7.1k次,点赞2次,收藏7次。1.什么是CSP-J/S?答:CSP-J/S是由CCF主办的计算机非专业级别的软件能力认证。认证包括CSP-J(Junior,入门级)和CSP-S(Senior,提高级)两个级别,认证内容均包括算法设计能力和编程能力。2.CCF为什么要举办CSP-J/S?答:为包括青少年在内的非计算机专业人士的软件能力(算法和编程)提供权威、公平、公正、公开和客观的评价体系,也通过认证鼓励更多的人学习算法和..._编程ccfcsp认证资料

神舟战神笔记本Controlcenter3.0安装教程,解决osd only-程序员宅基地

文章浏览阅读9.1w次,点赞33次,收藏51次。笔记本Controlcenter3.0安装教程,解决osd only问题,亲测有效!!!_osd only

c/c++中的大小端转换(int,float,double等)_c++ float转为大端模式-程序员宅基地

文章浏览阅读5.7k次,点赞2次,收藏6次。关于大小端转换的原因和原理,网上可找到的帖子很多,我不太懂,所以也不做介绍;如https://blog.csdn.net/kuai0705/article/details/20841133关于自定义大小端转换的函数或宏,也有很多帖子可以参考;如https://blog.csdn.net/gxw1994/article/details/52917233写这篇贴子的主要目的,是为了告诉像我一样的小白们..._c++ float转为大端模式

华为内部实施微服务架构_华为 vic架构-程序员宅基地

文章浏览阅读4.9k次。随着业务的发展,代码量的膨胀和团队成员的增加,传统单体式架构的弊端越来越凸显,严重制约了业务的快速创新和敏捷交付。为了解决传统单体架构面临的挑战,先后演进出了SOA服务化架构、RPC框架、分布式服务框架,最后就是当今非常流行的微服务架构。微服务化架构并非银弹,它的实施本身就会面临很多陷阱和挑战,涉及到设计、开发、测试、部署、运行和运维等各个方面,一旦使用不当,则会导致整个微服务架构改造的效_华为 vic架构

批量数据增强(扩充):目标检测系列(1)缩放_目标检测任务数据扩充-程序员宅基地

文章浏览阅读5.6k次。批量数据增强:目标检测系列(1)缩放目标检测的数据增强需要同时对标注数据进行修改。_目标检测任务数据扩充

随便推点

ios/android原生应用与H5交互_h5调用安卓方法-程序员宅基地

文章浏览阅读6k次,点赞2次,收藏6次。一、H5调用Android原生方法 主要实现方式是通过WebView的addJavascriptInterface方法向web注入一个自定义js对象实现js调用Android方法。H5端调用iOS端的nativeMethod方法: window.webkit.messageHandlers.nativeMethod.postMessage('');一、js调用iOS原生方法 通过WkwebView提供的WKScriptMessageHandler协议实现js调用iOS原生方法。_h5调用安卓方法

24、订单和购物车-srv服务_mxshop-srv-goods.sql-程序员宅基地

文章浏览阅读586次。proto";//购物车 rpc CartItemList(UserInfo) returns(CartItemListResponse);//获取用户的购物车信息 rpc CreateCartItem(CartItemRequest) returns(ShopCartInfoResponse);//添加商品到购物车 rpc UpdateCartItem(CartItemRequest) returns(google . protobuf . Empty);......_mxshop-srv-goods.sql

使用Fragment遇到的问题汇总_is not currently in the fragmentmanager-程序员宅基地

文章浏览阅读805次。Fragment MediaFragment{a000d84} is not currently in the FragmentManageronSaveInstanceState中直接FragmentManager.putFragment有问题的使用: @Override protected void onSaveInstanceState(Bundle outState) ..._is not currently in the fragmentmanager

Linux必学的60个命令(1)-安装与登陆_打杂的_新浪博客-程序员宅基地

文章浏览阅读76次。Linux提供了大量的命令,利用它可以有效地完成大量的工作,如磁盘操作、文件存取、目录操作、进程管理、文件权限设定等。所以,在Linux系统上工作离不开使用系统提供的命令。要想真正理解Linux系统,就必须从Linux命令学起,通过基础的命令学习可以进一步理解Linux系统。不同Linux发行版的命令数量不一样,但Linux发行版本最少的命令也有200多个。这里笔者把比较重要和使用..._mount指令

众多安卓源码分享-程序员宅基地

文章浏览阅读513次。Android精选源码UI框架QSkinLoader换肤框架一款优雅的中国风Android笔记源码ListView、RecyclerView两种方式实现聊天界面android仿滴滴时间选择控件Android 双时间选择控件一个ExpandableRecyclerView控

C 语言深度解剖-程序员宅基地

文章浏览阅读622次。C 语言深度解剖-------------------解开程序员面试笔试的秘密以含金量勇敢挑战国内外同类书籍陈正冲编著石虎审阅版权申明本书尚未出版,先放到网上给大家免费下载和阅览。本书正式出版前读者可以仔细研读和自由传阅本书电子版,但不允许私自大量印刷和销售。出版社如想出版此书可通过邮件或博客留言联系作者商谈出版事宜。对于

推荐文章

热门文章

相关标签