Print
카테고리: [ macOS & Macintosh ]
조회수: 10553

Q&A 게시판에서 MacOS X에 WebLogic 설치에 어려움을 겪고 계신 글을 보고 MacOS X에서 꽤 손쉽게 WebLogic을 설치할 수 방법을 소개합니다.

오라클 홈페이지 http://www.oracle.com/technetwork/middleware/weblogic/downloads/wls-for-dev-1703574.html 에서 " Oracle WebLogic Server 11gR1 (10.3.6) ZIP Distribution "을 다운로드 받습니다. 그러면 확장자가 zip 파일이며 그냥 풀면 됩니다. 사실 README.txt 파일에 아주 자세하게 설명되어 있습니다.

저는 /app/weblogic에 압축을 풀었습니다. 그리고 다음과 같이 JAVA_HOME과 MW_HOME 환경을 잡아줍니다. 당연한 말이지만 JAVA_HOME 역시 경로에 맞게 재설정해야 합니다.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
export MW_HOME=/app/weblogic

다음은 configure.sh를 실행합니다. 그런데 반드시 위의 JAVA_HOME과 MW_HOME을 설정한 후 실행해야 합니다. 그렇지 않으면 아래와 같은 오류가 발생하게 됩니다.

ERROR: You must set MW_HOME and it must point to a directory.
       where an installation of WebLogic exists. Ensure you point
       this variable to the extract location of the zip distribution.

환경 설정 후 configure.sh를 실행합니다.

CLASSPATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/lib/tools.jar:/app/weblogic/wlserver/server/lib/weblogic_sp.jar:/app/weblogic/wlserver/server/lib/weblogic.jar:/app/weblogic/modules/features/weblogic.server.modules_10.3.6.0.jar:/app/weblogic/wlserver/server/lib/webservices.jar:/app/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/app/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:

PATH=/app/weblogic/wlserver/server/bin:/app/weblogic/modules/org.apache.ant_1.7.1/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Your environment has been set.
Buildfile: /app/weblogic/configure.xml

registry:
     [copy] Copying 1 file to /app/weblogic

detect.os:

product.property:

product.property.unix:

product.property.windows:

all:

BUILD SUCCESSFUL
export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=256m"
Total time: 0 seconds

거의 끝나갑니다. 이제 적절한 도메인 디렉토리를 생성합니다. 저는 /app/weblogic/domain 디렉토리를 생성했습니다. 그리고 디렉토리 안에서 다음과 같이 start.sh 파일을 만듭니다.

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
export MW_HOME=/app/weblogic
export USER_MEM_ARGS="-Xmx1024m -XX:PermSize=256m"

. $MW_HOME/wlserver/server/bin/setWLSEnv.sh

$JAVA_HOME/bin/java ${USER_MEM_ARGS} weblogic.Server

이제 정말 다 끝나갑니다. start.sh 파일에 실행 권한을 부여한 후 ./start.sh 실행합니다.

CLASSPATH=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/lib/tools.jar:/app/weblogic/wlserver/server/lib/weblogic_sp.jar:/app/weblogic/wlserver/server/lib/weblogic.jar:/app/weblogic/modules/features/weblogic.server.modules_10.3.6.0.jar:/app/weblogic/wlserver/server/lib/webservices.jar:/app/weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/app/weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:

PATH=/app/weblogic/wlserver/server/bin:/app/weblogic/modules/org.apache.ant_1.7.1/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/jre/bin:/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin

Your environment has been set.
<2015. 2. 11 오전 1시 17분 08초 KST> <Info> <Security> <BEA-090905> <Disabling CryptoJ JCE Provider self-integrity check for better startup performance. To enable this check, specify -Dweblogic.security.allowCryptoJDefaultJCEVerification=true>
<2015. 2. 11 오전 1시 17분 08초 KST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true>
<2015. 2. 11 오전 1시 17분 08초 KST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 24.71-b01 from Oracle Corporation>

/app/weblogic/domain/config/config.xml not found

No config.xml was found.
Would you like the server to create a default configuration and boot? (y/n): y
<2015. 2. 11 오전 1시 17분 10초 KST> <Info> <Management> <BEA-140013> </app/weblogic/domain/config/config.xml not found>
<2015. 2. 11 오전 1시 17분 10초 KST> <Info> <Security> <BEA-090065> <Getting boot identity from user.>
Enter username to boot WebLogic server:weblogic
Enter password to boot WebLogic server:
For confirmation, please re-enter password required to boot WebLogic server:
<2015. 2. 11 오전 1시 17분 19초 KST> <Info> <Management> <BEA-141254> <Generating new domain directory in /app/weblogic/domain>
<2015. 2. 11 오전 1시 17분 23초 KST> <Info> <Management> <BEA-141255> <Domain generation completed in 3,989 milliseconds.>
<2015. 2. 11 오전 1시 17분 23초 KST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.6.0  Tue Nov 15 08:52:36 PST 2011 1441050 >
<2015. 2. 11 오전 1시 17분 24초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2015. 2. 11 오전 1시 17분 24초 KST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<2015. 2. 11 오전 1시 17분 24초 KST> <Notice> <Log Management> <BEA-170019> <The server log file /app/weblogic/domain/servers/myserver/logs/myserver.log is opened. All server side log events will be written to this file.>
<2015. 2. 11 오전 1시 17분 25초 KST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<2015. 2. 11 오전 1시 17분 26초 KST> <Warning> <Store> <BEA-280109> <Unable to load the native wlfileio library for the persistent file store "_WLS_myserver". The store will use buffered I/O. The store is still operating in a transactionally safe synchronous mode. See store open log messages for the requested and final write policies.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<2015. 2. 11 오전 1시 17분 27초 KST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[3]". The address fe80:0:0:0:0:0:0:1 might be incorrect or another process is using port 7001: java.net.BindException: Can't assign requested address.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 10.211.55.2:7001 for protocols iiop, t3, ldap, snmp, http.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[5]" is now listening on fe80:0:0:0:745b:b9ff:fe01:8a1b:7001 for protocols iiop, t3, ldap, snmp, http.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[4]". The address fe80:0:0:0:62f8:1dff:feb0:7d6 might be incorrect or another process is using port 7001: java.net.BindException: Can't assign requested address.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.1.224:7001 for protocols iiop, t3, ldap, snmp, http.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 10.37.129.2:7001 for protocols iiop, t3, ldap, snmp, http.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[6]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <Server> <BEA-002613> <Channel "Default[7]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "myserver" for domain "mydomain" running in Development Mode>
<2015. 2. 11 오전 1시 17분 27초 KST> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<2015. 2. 11 오전 1시 17분 27초 KST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>

위와 같이 계정 정보를 입력하면 끝입니다. 잘 기동되었습니다. http://localhost:7001/console 하면 어드민 콘솔에 잘 접속할 수 있게 됩니다. 아, 그리고 계정 정보는 최초 한 번만 입력하면 됩니다.