如何在Mac上安装Oracle WebLogic和创建WebLogic域

本文详述了在Mac OS上安装Oracle Weblogic Server 10.3.3.0的过程,包括安装前的JDK 6确认、安装步骤以及创建和管理域的Terminal命令。通过遵循指南,读者可以成功启动和运行WebLogic服务器。
摘要由CSDN通过智能技术生成

Oracle Weblogic is one of the most widely used application servers. Recently I have installed it on Mac OS system and created a domain. This article is intended to provide the steps for installation and creating a domain and then starting and stopping domain with Terminal. I have set up Oracle Weblogic 10.3.3.0 on my system but I am sure that the setup instructions will work for other versions also.

Oracle Weblogic是使用最广泛的应用服务器之一。 最近,我已将其安装在Mac OS系统上并创建了一个域。 本文旨在提供以下步骤:安装和创建域,然后使用终端启动和停止域。 我已经在系统上设置了Oracle Weblogic 10.3.3.0,但是我确信设置说明也适用于其他版本。

Oracle Weblogic Server安装的先决条件 (Prerequisite for Oracle Weblogic Server Installation)

  1. Oracle Weblogic setup – You can download it from Oracle website for development purpose.

    Oracle Weblogic设置 –您可以从Oracle网站下载它以进行开发。
  2. JDK 6 – Oracle Weblogic 10.3 requires Java 6 and it comes with the default Mac OS system. You can check whether its installed or not. It will be in “/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home” directory.

    JDK 6 – Oracle Weblogic 10.3需要Java 6,并且它带有默认的Mac OS系统。 您可以检查其是否已安装。 它将位于“ /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home”目录中。

在Mac OS上安装Oracle Weblogic (Install Oracle Weblogic on Mac OS)

Unzip the WebLogic installer in the hard drive. For my installation, I have unzipped it in “/weblogic/wls1033_dev” directory.

将WebLogic安装程序解压缩到硬盘驱动器中。 对于我的安装,我已将其解压缩到“ / weblogic / wls1033_dev”目录中。

安装Weblogic Server和创建域的步骤 (Steps to install Weblogic Server and creating a domain)

Open Terminal and run the below commands in the sequence mentioned.

打开终端,并按上述顺序运行以下命令。

$ export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
$ export MW_HOME=/weblogic/wls1033_dev
$ cd $MW_HOME
$ ./configure.sh
$ export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=1024m"
$ . $MW_HOME/wlserver/server/bin/setWLSEnv.sh (Note that there is a space between . and $)
$ mkdir /weblogic/domain1
$ cd /weblogic/domain1
$ JAVA_HOME/bin/java -Xmx1024m -XX:MaxPermSize=1024m weblogic.Server

The last command will create the domain and then start it with the default configuration. While setup, it will ask for the user and password to login to your domain admin console. After executing all the commands successfully, you can log in to WebLogic server admin console at https://localhost:7001/console with the same user and password.

最后一条命令将创建域,然后以默认配置启动它。 设置时,它将要求用户和密码登录到您的域管理控制台。 成功执行所有命令后,您可以使用相同的用户名和密码登录https://localhost:7001/console上的WebLogic Server管理控制台。

Your Weblogic server and domain is up and running now. 🙂

您的Weblogic服务器和域现已启动并正在运行。 🙂

After that you can start and stop your domain from Terminal with startWebLogic.sh and stopWebLogic.sh scripts found in domain bin directory. But if you will close the Terminal session and then try to execute the commands, it will throw below exception:

之后,您可以使用在域bin目录中找到的startWebLogic.shstopWebLogic.sh脚本从终端启动和停止域。 但是,如果您将关闭Terminal会话,然后尝试执行命令,它将抛出以下异常:

Starting WLS with line:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java    -Xms512m -Xmx512m -Dweblogic.Name=myserver -Djava.security.policy=/wlserver/server/lib/weblogic.policy   -da -Dplatform.home=/wlserver -Dwls.home=/wlserver/server -Dweblogic.home=/wlserver/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole=  weblogic.Server
Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/Server
Caused by: java.lang.ClassNotFoundException: weblogic.Server
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:254)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:399)

Above exception comes because the export command was only for the current Terminal session. To avoid these issues, you can include these in .bash_profile file in your home directory. If you don’t have this file then you can create it and then add below lines.

出现上述异常是因为export命令仅用于当前的Terminal会话。 为避免这些问题,您可以将它们包含在主目录的.bash_profile文件中。 如果没有此文件,则可以创建它,然后在下面的行中添加。

export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
export MW_HOME=/weblogic/wls1033_dev
export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=1024m"

After that save it and run command source ~/.bash_profile to set these variables. Since these are added in bash profile, it will get exported as system variable as soon as you launch your terminal.

之后,将其保存并运行命令source ~/.bash_profile来设置这些变量。 由于这些已添加到bash配置文件中,因此一旦启动终端,它将作为系统变量导出。

If you found the article useful, please comment and share with others.

如果您发现本文有用,请发表评论并与他人分享。

翻译自: https://www.journaldev.com/210/how-to-install-oracle-weblogic-on-mac-and-creating-weblogic-domain

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值