Solaris 下創建weblogic domain 使用新的JDK

<span style="font-family: Arial, Helvetica, sans-serif; background-color: rgb(255, 255, 255);">1,查看Solaris 版本信息</span>

$ cat /etc/release  
                            Oracle Solaris 11.1 SPARC
  Copyright (c) 1983, 2012, Oracle and/or its affiliates.  All rights reserved.
                           Assembled 19 September 2012


2,下載相應的JDK版本 點擊這裏


所以我下載的版本是Solaris SPARC


3,ftp工具上傳到目標

cp /tmp/jdk-xx  /usr/jdk/jdk-xx

解壓 jdk包

tar -zxvf jdk-xxx.tar.gz


4,創建新的weblogic domain

Method 1 (GUI)
1.	Download Xmanager, use the xstart to login as oracle user to ATWHQSVR002 server
2.	$ cd /u01/app/Middleware/wlserver_10.3/common/bin
3.	$ ./config.sh 
Method 2 (Console/Command Line)
1.	Login as oracle user to ATWHQSVR002 using Putty
2.	$ cd /u01/app/Middleware/wlserver_10.3/common/bin
3.	$ ./config.sh  -mode=console
The Option/Step for Console

Option – Description - Comment
•	1 - Choose Create a new WebLogic domain – Type 1, then enter
•	1 - Choose Weblogic Platform components – Type 1, then enter
•	wlserver_10.3 - Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x – Type wlserver_10.3 , then enter
•	PutNewDomainName – Edit Domain Name – Type the newdomainname, then enter
•	Enter again to continue
•	Enter – Target Domain Directory – Just enter to Next
•	2 – Modify password – Type 2, Enter, then type the new password, then enter
•	3 – Confirm user password – Type 3, Enter, then type the confirm new password, then enter
•	Enter again to continue
•	2 – Production Mode – Type 2, then enter
•	1 – JDK version – Type 1, then enter
•	Enter again to continue
•	DONE 

具體步驟:

這裏輸入1 回車

這裏輸入1 回車


這裏直接回車


輸入newdomainname 回車

<------------------------------------------------- Fusion Middleware Configuration Wizard ------------------------------------------------->

Configure Administrator User Name and Password:
-----------------------------------------------

Create a user to be assigned to the Administrator role. This user is the default administrator used to start development mode servers.

    |          Name           |                  Value                  |
   _|_________________________|_________________________________________|
   1|         *Name:          |                weblogic                 |
   2|     *User password:     |               **********                |
   3| *Confirm user password: |               **********                |
   4|      Description:       | This user is the default administrator. |

Use above value or select another option:
    1 - Modify "Name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes

選擇1輸入用戶名回車

選擇2輸入密碼回車

選擇3確認密碼回車

最後回車

<------------------------------------------------- Fusion Middleware Configuration Wizard ------------------------------------------------->

Domain Mode Configuration:
--------------------------

Enable Development or Production Mode for this domain. 

 ->1|Development Mode

   2|Production Mode




Enter index number to select OR [Exit][Previous][Next]> 2


選擇2回車
<------------------------------------------------- Fusion Middleware Configuration Wizard ------------------------------------------------->

Java SDK Selection:
-------------------

 ->1|Sun SDK 1.6.0_35 @ /usr/jdk/instances/jdk1.6.0
   2|Other Java SDK




Enter index number to select OR [Exit][Previous][Next]> 1
選擇一回車

<------------------------------------------------- Fusion Middleware Configuration Wizard ------------------------------------------------->

Select Optional Configuration:
------------------------------

   1|Administration Server [ ]
   2|Managed Servers, Clusters and Machines [ ]
   3|RDBMS Security Store [ ]



Enter index number to select OR [Exit][Previous][Next]> 

回車

<------------------------------------------------- Fusion Middleware Configuration Wizard ------------------------------------------------->

Creating Domain...

0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]


**** Domain Created Successfully! ****



記住輸入的用戶名 密碼,到此爲止weblogic DOMAIN就創建完畢


5.運行新的weblogic domain

1.	Login as oracle user
2.	$ nohup /u01/app/Middleware/user_projects/domains/newdomainname/bin/startWebLogic.sh &

或者


/u01/app/Middleware/user_projects/domains/newdomainname/bin/$ ./startWeblogic.sh
</pre><p>創建成功開啓可能會出現的問題</p><p></p><pre name="code" class="plain">The JRE was not found in directory /usr/jdk/instances/jdk1.6.0. (JAVA_HOME)
Please edit your environment and set the JAVA_HOME
variable to point to the root directory of your Java installation.
The JRE was not found in directory /usr/jdk/instances/jdk1.6.0. (JAVA_HOME)
</pre>出現這個問題是因爲前面創建domain的時候我們默認選擇的是系統自帶的jdk 找不到jre 所以我們需要修改配置文件的jdk路徑,具體步驟如下<p></p><p></p><p>vi /domain/xxx/bin/setDoomainEnv.sh 編輯文件</p><pre>
BEA_JAVA_HOME=""
export BEA_JAVA_HOME

SUN_JAVA_HOME="/usr/jdk/instances/jdk1.6.0"
export SUN_JAVA_HOME

if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
        JAVA_HOME="${BEA_JAVA_HOME}"
        export JAVA_HOME
else
        if [ "${JAVA_VENDOR}" = "Sun" ] ; then
                JAVA_HOME="${SUN_JAVA_HOME}"
                export JAVA_HOME
        else
                JAVA_VENDOR="Sun"
                export JAVA_VENDOR
                JAVA_HOME="/usr/jdk/instances/jdk1.6.0"
                export JAVA_HOME
        fi
fi

改成

BEA_JAVA_HOME="<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color:#ff0000;">需要的jdk版本路徑</span></span>"
export BEA_JAVA_HOME

SUN_JAVA_HOME="<span style="color:#ff0000;">需要的jdk版本路徑</span>"
export SUN_JAVA_HOME

if [ "${JAVA_VENDOR}" = "Oracle" ] ; then
JAVA_HOME="${BEA_JAVA_HOME}"
export JAVA_HOME
else
if [ "${JAVA_VENDOR}" = "Sun" ] ; then
JAVA_HOME="${SUN_JAVA_HOME}"
export JAVA_HOME
else
JAVA_VENDOR="Sun"
export JAVA_VENDOR
JAVA_HOME="<span style="font-family: Arial, Helvetica, sans-serif;"><span style="color:#ff0000;">需要的jdk版本路徑</span></span><span style="font-family: Arial, Helvetica, sans-serif;">"</span>
export JAVA_HOME
fi
fi

:wq 退出重新啓動問題解決。


問題2:

<Server is Running in Production Mode and Native Library(terminalio) to read the password securely from commandline is not found.> 

解決辦法:

進入/u01/app/Middleware/user_projects/domains/newdomain/servers/AdminServer

創建security

mkdir security
chmod 777 security/


進入 security

vi boot.properties

username=XXXX

password=XXXX

保存退出


重新運行問題解決




如果還有什麼疑問可以給我發QQ消息  394818428

發佈了15 篇原創文章 · 獲贊 0 · 訪問量 2萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章