macos 在 OSX 上安装 Oracle 11g

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8992716/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 08:47:48  来源:igfitidea点击:

Installing Oracle 11g on OSX

macosoracle11gsoajdeveloperosb

提问by Olivier Refalo

I would like to run a complete SOA/OSB development environment on OSX.
Unfortunately, Oracle 11g (SOA and OSB) is missing OSX installers.

我想在 OSX 上运行一个完整的 SOA/OSB 开发环境。
不幸的是,Oracle 11g(SOA 和 OSB)缺少 OSX 安装程序。

Is it possible to run a native development environmenton OSX ?

是否可以在 OSX 上运行本机开发环境

I need Oracle Enterprise Pack Extensions, OSB extension, jDeveloper and SOA composites to work natively.

我需要 Oracle Enterprise Pack Extensions、OSB 扩展、jDeveloper 和 SOA 组合才能在本地工作。

采纳答案by Olivier Refalo

Yes! The fact that Oracle doesn't provide a OSX installer doesn't mean these product shouldn't work natively. Most of them are actually 100% Java.

是的!Oracle 不提供 OSX 安装程序的事实并不意味着这些产品不应该在本地运行。它们中的大多数实际上是 100% Java。

Please follow the instructions below to install you development environment.

请按照以下说明安装开发环境。

Instructions are for 11g 11.1.1.4.0 but were also tested with 11.1.1.5.0. The trick is to run the installer via a Linux VM and migrate the files to OSX.

说明适用于 11g 11.1.1.4.0,但也使用 11.1.1.5.0 进行了测试。诀窍是通过 Linux VM 运行安装程序并将文件迁移到 OSX。

Linux VM Installation

Linux 虚拟机安装

It doesn't really matter if you get a 32 or 64 bits Linux distribution. However, the installation folder should be the same on Linux and MacOS.

获得 32 位还是 64 位 Linux 发行版并不重要。但是,Linux 和 MacOS 上的安装文件夹应该相同。

  1. Download VirtualBox and create a Virtual Machine for Linux. Since we are dealing with Oracle products, rather user their linux distribution: look for this file on google OracleLinux-R5-U7-Server-i386-dvd.iso
  2. With the VM installed, up and running, boot into Linux.
  3. Install JDK 1.6 for Linux 32 bits
  1. 下载 VirtualBox 并为 Linux 创建一个虚拟机。由于我们正在处理 Oracle 产品,而不是使用他们的 linux 发行版:在 google OracleLinux-R5-U7-Server-i386-dvd.iso上查找此文件
  2. 安装、启动并运行 VM 后,启动到 Linux。
  3. 为 Linux 32 位安装 JDK 1.6

Download the following software, oracle offers native installers for windows and Linux. However you should stick to generic downloads as much as possible. Some of these packages come in several zips, extract files according to oracle directions.

下载以下软件,oracle 提供适用于 Windows 和 Linux 的本机安装程序。但是,您应该尽可能坚持通用下载。其中一些包有几个 zip,根据 oracle 说明提取文件。

  • Weblogic & coherence: wls1034_generic.jar
  • OEPE: oepe-helios-all-in-one-11.1.1.6.1.201010012100-win32-x86_64.zip
  • jDeveloper: jdevstudio11114install.jar
  • OSB: ofm_osb_generic_11.1.1.4.0
  • SOA: soa_generic_11.1.1.4.0
  • 网络逻辑和一致性:wls1034_generic.jar
  • OEPE: oepe-helios-all-in-one-11.1.1.6.1.201010012100-win32-x86_64.zip
  • jDeveloper:jdevstudio11114install.jar
  • OSB:ofm_osb_generic_11.1.1.4.0
  • SOA:soa_generic_11.1.1.4.0

Install the software in the following order

按以下顺序安装软件

  1. Weblogic & Coherence: run with java -Xmx1024m -jar -Dos.name=unix wls1034_generic.jar
  2. OEPE extract act in a folder called /oepe
  3. OSB Disk1/runInstaller - Make sure OSB IDE extensions are being installed (in OEPE)
  4. SOA Disk1/runInstaller
  5. jDeveloper
  1. Weblogic & Coherence:使用java -Xmx1024m -jar -Dos.name=unix wls1034_generic.jar 运行
  2. OEPE 提取在名为 /oepe 的文件夹中执行
  3. OSB Disk1/runInstaller - 确保正在安装 OSB IDE 扩展(在 OEPE 中)
  4. SOA Disk1/runInstaller
  5. jDeveloper

OSX Installation

OSX 安装

Middleware

中间件

Here comes the trick, copy the oOracle Middleware folder from your Linux VM to OSX. Make sure the location is the same. For instance if you installed under /Oracle/Middleware on Linux, you should copy to /Oracle/Middleware on OSX.

诀窍来了,将 oOracle Middleware 文件夹从 Linux VM 复制到 OSX。确保位置相同。例如,如果您在 Linux 上安装在 /Oracle/Middleware 下,则应复制到 OSX 上的 /Oracle/Middleware。

Fix JVM

修复JVM

For some obscure reasons, Oracle installers don't recognize the Apple JVM. While not mandatory, it is good practices to fix the issue with the following script.

由于某些不明原因,Oracle 安装程序无法识别 Apple JVM。虽然不是强制性的,但使用以下脚本解决问题是一种很好的做法。

 $ sudo mkdir -p /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/lib
 $ cd /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/jre/lib
 $ sudo ln -s /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/classes/classes.jar rt.jar

OEPE

欧佩克

  1. Download the following software (64bits please!) oepe-helios-all-in-one-11.1.1.6.2.201111102323-macosx-cocoa-x86_64.zip
  2. Extract the file into /oepemac
  3. Right click on Eclipse.app
  4. On the opened menu, choose “Show Package Contents”
  5. Edit file “/Contents/MacOS/eclipse.ini”, append the following lines

    -Dweblogic.home=/Oracle/Middleware/wlserver_10.3
    -Dharvester.home=/Oracle/Middleware/Oracle_OSB1/harvester
    -Dosb.home=/Oracle/Middleware/Oracle_OSB1
    -Dosgi.bundlefile.limit=750
    -Dosgi.nl=en_US

  6. Now copy the file oracle.osb.ide.linkfrom the folder “oepe/dropins” to “oepemac/dropins” (both under your middleware home).

  1. 下载以下软件(请64位!) oepe-helios-all-in-one-11.1.1.6.2.201111102323-macosx-cocoa-x86_64.zip
  2. 将文件解压到 /oepemac
  3. 右键单击 Eclipse.app
  4. 在打开的菜单上,选择“显示包内容”
  5. 编辑文件“/Contents/MacOS/eclipse.ini”,添加以下几行

    -Dweblogic.home=/Oracle/Middleware/wlserver_10.3
    -Dharvester.home=/Oracle/Middleware/Oracle_OSB1/harvester
    -Dosb.home=/Oracle/Middleware/Oracle_OSB1
    -Dosgi.bundlefile.limit=750
    -Dosgi.nl= en_US

  6. 现在将文件oracle.osb.ide.link从文件夹“oepe/dropins”复制到“oepemac/dropins”(都在您的中间件主目录下)。

Oracle XE

甲骨文XE

Oracle_XE is unfortunately not supported on OSX. we will need to run it via a VirtualBox appliance. The good news is that Oracle provides a easy to install RPM.

遗憾的是,OSX 不支持 Oracle_XE。我们需要通过 VirtualBox 设备运行它。好消息是 Oracle 提供了一个易于安装的 RPM。

  1. Download oracle-xe-10.2.0.1-1.0.i386.rpm
  2. Under Linux, as root, run 'rpm -i oracle-xe-10.2.0.1-1.0.i386.rpm'
  3. Next step is to download and run Oracle RCUto prepare the data model, please refer to the next section for directions.
  1. 下载oracle-xe-10.2.0.1-1.0.i386.rpm
  2. 在 Linux 下,以 root 身份运行“rpm -i oracle-xe-10.2.0.1-1.0.i386.rpm”
  3. 下一步是下载并运行Oracle RCU以准备数据模型,请参阅下一节的说明。

For reference, we allocated 1cpu, 600MB of ram to our Linux/OracleXE VM.

作为参考,我们为 Linux/OracleXE VM 分配了 1cpu、600MB 的内存。

Next Steps

下一步

Configure your web logic development domain. Please refer to this document for instructions. Quick Start Guide for Oracle? SOA Suite 11gR1 (11.1.1.5.0).pdf

配置您的 Web 逻辑开发域。有关说明,请参阅此文档。 Oracle 快速入门指南?SOA 套件 11gR1 (11.1.1.5.0).pdf

Fix startup scripts

修复启动脚本

Finally, you will need to fix domain startup script as follows

最后,您需要按如下方式修复域启动脚本

------------- user_projects/domains/DEVdomain/bin/setDomainEnv.sh -------------

------------- user_projects/domains/DEVdomain/bin/setDomainEnv.sh -------------

index f74490c..8d75c6c 100755
@@ -108,7 +108,7 @@ else
    else
        JAVA_VENDOR="Unknown"
        export JAVA_VENDOR
-       JAVA_HOME="/usr/java/jdk1.6.0_21"
+       JAVA_HOME=`/usr/libexec/java_home`
        export JAVA_HOME
    fi
 fi

------------ user_projects/domains/DEVdomain/bin/setSOADomainEnv.sh ------------

------------ user_projects/domains/DEVdomain/bin/setSOADomainEnv.sh ------------

index 8c6743b..b92cfa4 100755
    @@ -144,6 +144,15 @@ case ${PLATFORM_TYPE} in
         fi
         export USER_MEM_ARGS
         ;;
    +#-----------------------------------------------------
    +# OSX
    +#-----------------------------------------------------
    +Darwin)
    +
    +  USER_MEM_ARGS="${PORT_MEM_ARGS}"
    +  export USER_MEM_ARGS
    +
    +  ;;

       #-----------------------------------------------------
       # Sun OS

回答by Abhijit Gaikwad

Use LDSTech virtual machine to install oracle on Mac. you can find more information at https://tech.lds.org/wiki/Oracle_VM

在 Mac 上使用 LDSTech 虚拟机安装 oracle。您可以在https://tech.lds.org/wiki/Oracle_VM 上找到更多信息