Linux下的WebLogic安裝部署

WebLogic的bin包放在/home目錄上.
1、創建weblogic用戶組。
        groupadd weblogic
        useradd -g weblogic weblogic
        passwd weblogic(修改weblogic密碼)
2、創建/var/web/jsp/bea目錄,修改目錄所有者權限
        mkdir /var/web/jsp/bea
        chown –Rf weblogic:weblogic /var/web/jsp/bea
3、用weblogic用戶登陸系統,修改配置文件。
        vi ~/.bash_profile
增加export LANG=en_US.iso885915
賦予.bin可執行權限:chmod a+x platform814_linux32.bin
執行./platform814_linux32.bin -mode=console
      進入控制檯安裝的歡迎界面,鍵入[Next]繼續
     
此時出現授權許可協議,讀完後鍵入[Yes]繼續
     
提示選擇一個BEA主目錄:

輸入:/var/web/jsp/bea
確認BEA主目錄,

 鍵入[1]繼續
選擇安裝類型, 鍵入[1]繼續
選擇安裝路徑,默認,輸入[next]繼續。
確認安裝路徑。鍵入[1]繼續
安裝完畢。
注:(兩個補丁文件見補丁包的說明)
 
使用WebLogic用戶登錄系統:
[weblogic@jcms bin]$ cd /var/web/jsp/bea/weblogic81/common/bin
[weblogic@jcms bin]$ ./config.sh
 
Unable to instantiate GUI, defaulting to console mode.
進入設置:
<-------- BEA WebLogic Configuration Wizard -------------->
 
Create or Extend a Configuration:
---------------------------------
 
Choose between creating and extending a configuration. Based on your selection, the Configuration Wizard guides you through the steps to
generate a new or extend an existing configuration.
 
 ->1|Create a new WebLogic configuration
    |    Start here to create a WebLogic configuration in your projects directory.
 
   2|Extend an existing WebLogic configuration
    |    Start here to extend an existing WebLogic configuration. Use this option to add applications and services, including Database
|    access (JDBC) and Messaging (JMS). This option also enables you to extend functionality by enabling WebLogic Workshop.
 
 
 
Enter index number to select OR [Exit][Next]> 1
 
 
<-------------------------------- BEA WebLogic Configuration Wizard ----------------------->
 
Select a Domain Template:
-------------------------
 
Please select a template from the list or select another directory of templates.
 
*[/home/weblogic/bea/weblogic81/common/templates/domains]
 
   1|Basic WebLogic Platform Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create a basic WebLogic Platform domain, without installing sample applications. Domains created from this template will support the
    |WebLogic Server, WebLogic Workshop, WebLogic Integration and WebLogic Portal runtime functionality, including support for J2EE
    |applications, Web applications, Web Services, custom controls, business processes and portals. Use domains created from this template
    |for development of WebLogic Platform applications.
 
   2|Basic WebLogic Portal Domain 8.1.3.0
   | BEA Systems, Inc.
    | Create a basic WebLogic Portal domain, without installing sample applications.   Domains created from this template will support the
    |WebLogic Server, WebLogic Workshop and WebLogic Portal runtime functionality, including support for J2EE applications, Web applications,   
 |Web Services, custom controls and portals. Use domains created from this template for development of WebLogic Portal applications.
 
 3 |Basic WebLogic Integration Domain 8.1.3.0
   | BEA Systems, Inc.
    | Create a basic WebLogic Integration domain, without installing sample applications.   Domains created from this template will support
    |the WebLogic Server, WebLogic Workshop and WebLogic Integration runtime functionality, including support for J2EE applications, Web
    |applications, Web Services, custom controls and business processes. Use domains created from this template for development of WebLogic
      |Integration applications.
 
     4|Basic WebLogic Workshop Domain 8.1.3.0
    | BEA Systems, Inc.
 
Enter index number to select OR [Down][Exit][Previous][Next]> down
 
 
 
<---------------------- BEA WebLogic Configuration Wizard ---------------------------->
 
Select a Domain Template:
-------------------------
 
Please select a template from the list or select another directory of templates.
 
    | Create a basic WebLogic Workshop domain, without installing sample applications.   Domains created from this template will support the     |WebLogic Server and WebLogic Workshop runtime functionality, including support for J2EE applications, Web applications, Web Services and     |custom controls. Use domains created from this template for development of WebLogic Workshop applications.
 
 ->5|Basic WebLogic Server Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create a basic WebLogic Server domain without installing sample applications.
 
   6|WebLogic Server Examples Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create the WebLogic Server Examples domain in a directory outside of the installed kit. The Examples domain contains a collection of
    |examples to show best practices for coding individual J2EE APIs.
 
   7|Avitek Medical Records Sample Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create the Avitek Medical Records domain in a directory outside of the installed kit. The Avitek Medical Records is a WebLogic Server     |sample application suite that concisely demonstrates all aspects of the J2EE platform.
 
   8|Select another directory location
 
 
Enter index number to select OR [Up][Exit][Previous][Next]>5
 
<--------------------- BEA WebLogic Configuration Wizard --------------------->
 
Select a Domain Template:
-------------------------
 
Please select a template from the list or select another directory of templates.
    *The selected template is the same as the one you are working on. Do you
    *want to reload the template ?
 
 ->1|Yes
 
   2|No
 
 
Enter index number to select OR [Exit][Next]> 1

<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Choose Configuration Option:
-------------------------
 
    *Do you want to run the wizard in express mode?
 ->1|Yes
   2|No
 
Enter index number to select OR [Exit][Previous][Next]> 1
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
    |          Name           |              Value              |
   _|_________________________|_________________________________|
   1|       *User name:       |            weblogic             |
   2|     *User password:     |                                 |
   3| *Confirm user password: |                                 |
   4|      Description:       | The default administration user |
 
Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
 
Enter option number to select OR [Exit][Previous][Next]> 2
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
    "*User password:" = []
 
Input new *User password: OR [Exit][Reset][Accept]> [輸入八位密碼]  
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
 
    |          Name           |              Value              |
   _|_________________________|_________________________________|
   1|       *User name:       |            weblogic             |
   2|     *User password:     |             ******              |
   3| *Confirm user password: |                                 |
   4|      Description:       | The default administration user |
 
Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
 
Enter option number to select OR [Exit][Previous][Next]> 3
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
    "*Confirm user password:" = []
 
Input new *Confirm user password: OR [Exit][Reset][Accept]> [確認八位密碼] ///口令必須與上面的一樣
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
 
 
 
 
 
    |          Name           |              Value              |
   _|_________________________|_________________________________|
   1|       *User name:       |            weblogic             |
   2|     *User password:     |            ********             |
   3| *Confirm user password: |            ********             |
   4|      Description:       | The default administration user |
 
Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
 
Enter option number to select OR [Exit][Previous][Next]> next
 
 
<------------------------- BEA WebLogic 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
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Java SDK Selection:
-------------------
 
 ->1|JRockit SDK 1.4.2_04-8130 @ /home/weblogic/bea/jrockit81sp3_142_04
  2|Sun SDK 1.4.2_04 @ /home/weblogic/bea/jdk142_04
   3|Other Java SDK
 
Enter index number to select OR [Exit][Previous][Next]> 1
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Select the target domain directory for this configuration:
----
 
    "Target Location" = [/home/weblogic/bea/user_projects/domains]
 
Input new Target Location OR [Exit][Previous][Next]> [直接回車]
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Edit Domain Information:
------------------------
 
    | Name | Value   |
   _|________|__________|
   1| *Name: | mydomain |
 
Enter value for "Name" OR [Exit][Previous][Next]> [輸入名稱或者直接回車]
 
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Creating Domain...
 
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
 
 
**** Domain Created Successfully! ****
完成服務的建立!
 
1、如何啓動WebLogic
[weblogic@jcms bin]$ cd /var/web/jsp/bea/user_projects/domains/mydomain
[weblogic@jcms bin]$ ./startWebLogic.sh    (需要輸入用戶名密碼)
 
2、如何關閉WebLogic
[weblogic@jcms bin]$ ./stopWebLogic.sh
 
 
 
1、無需輸入用戶名密碼啓動關閉weblogic。
weblogic賬戶在mydomain目錄下,新建boot.properties文件,輸入:
 
password=12345678
username=weblogic
 
把啓動weblogic的用戶名密碼寫進入。
 
2、修改starWeblogic.sh和stopWeblogic腳本
startWeblogic.sh
 /usr/bin/nohup ${JAVA_HOME}……………… weblogic.Server > /var/web/weblogic.log 2>&1
 
注意:紅色部分爲添加的命令。意爲將啓動腳本放到後臺執行,並輸出日誌。
 
   ②stopWeblogic.sh
     #!/bin/sh
    ………………腳本內容………(刪除這段腳本,用於身份驗證,刪除後就無需輸入用戶名密碼)
# set server name
 
   
3、將weblogic的啓動關閉作爲linux系統服務。
root賬戶在/etc/init.d下新建weblogic文件,內容如下:
      
            #!/bin/sh
# chkconfig: 345 20 80
# description: Weblogic auto start-stop script.
 
DOMAIN_HOME=/var/web/jsp/user_projects/domains/mydomain
WLS_OWNER=weblogic
          
case "$1" in
     'start')
     su - ${WLS_OWNER} -c "cd ${DOMAIN_HOME}; ./startWebLogic.sh"
     ;;
     'stop')
     su - ${WLS_OWNER} -c "cd ${DOMAIN_HOME}; ./stopWebLogic.sh"
     ;;
Esac
 
其中DOMAIN_HOME是你創建的用戶域的路徑。文件配置好後,就可以利用linux的服務來啓動和關閉weblogic了。
#service weblogic start
 
4、隨系統自動啓動和關閉weblogic
      以root用戶執行如下命令:
 
 
            ln -s /etc/init.d/weblogic /etc/rc.d/rc1.d/K80weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc2.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc3.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc4.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc5.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc6.d/K80weblogic
 
另外,其實我們也可以通過運行setup命令,在system services裏面設置weblogic服務是否自動啓動。
 
 
Aweblogic無法啓動,錯誤信息<error>包含如下,
    <Error> <EmbeddedLDAP> <000000> <Error opening the Transaction Log: ./myserver/ldap/ldapfiles/EmbeddedLDAP.tran: Permission denied>
 
QLDAP啓動失敗,導致的問題可能是用root賬戶啓動了weblogic。檢查mydomain目錄下myserver/ldap/ldapfiles下的文件權限,是否是weblogic用戶組,如果還是無法啓動,請刪除.tran文件。
 
Aweblogic無法啓動,錯誤信息<error>包含如下,
     <Error> <Deployer> <BEA-149204> <The deployment framework was unable to register with the Data Replication Service.
<Error> <Deployer> <BEA-149601> <The deployment framework was unable to resume accepting requests.>
 
Q問題是管理域無法與用戶域通信。查看linux系統主機名,查看/etc/hosts文件,看是否有如下一行主機記錄,如果沒有,請將這一行記錄加入到/etc/hosts文件中。
         127.0.0.1    localhost.localdomain    localhost
 
       沒有這一行記錄,就會導致啓動失敗,一般在安裝系統時,設置了主機名、有兩塊網卡,在設置主機名時,上面的記錄就沒有了。
WebLogic的bin包放在/home目錄上.
1、創建weblogic用戶組。
        groupadd weblogic
        useradd -g weblogic weblogic
        passwd weblogic(修改weblogic密碼)
2、創建/var/web/jsp/bea目錄,修改目錄所有者權限
        mkdir /var/web/jsp/bea
        chown –Rf weblogic:weblogic /var/web/jsp/bea
3、用weblogic用戶登陸系統,修改配置文件。
        vi ~/.bash_profile
增加export LANG=en_US.iso885915
賦予.bin可執行權限:chmod a+x platform814_linux32.bin
執行./platform814_linux32.bin -mode=console
      進入控制檯安裝的歡迎界面,鍵入[Next]繼續
     
此時出現授權許可協議,讀完後鍵入[Yes]繼續
     
提示選擇一個BEA主目錄:

輸入:/var/web/jsp/bea
確認BEA主目錄,

 鍵入[1]繼續
選擇安裝類型, 鍵入[1]繼續
選擇安裝路徑,默認,輸入[next]繼續。
確認安裝路徑。鍵入[1]繼續
安裝完畢。
注:(兩個補丁文件見補丁包的說明)
 
使用WebLogic用戶登錄系統:
[weblogic@jcms bin]$ cd /var/web/jsp/bea/weblogic81/common/bin
[weblogic@jcms bin]$ ./config.sh
 
Unable to instantiate GUI, defaulting to console mode.
進入設置:
<-------- BEA WebLogic Configuration Wizard -------------->
 
Create or Extend a Configuration:
---------------------------------
 
Choose between creating and extending a configuration. Based on your selection, the Configuration Wizard guides you through the steps to
generate a new or extend an existing configuration.
 
 ->1|Create a new WebLogic configuration
    |    Start here to create a WebLogic configuration in your projects directory.
 
   2|Extend an existing WebLogic configuration
    |    Start here to extend an existing WebLogic configuration. Use this option to add applications and services, including Database
|    access (JDBC) and Messaging (JMS). This option also enables you to extend functionality by enabling WebLogic Workshop.
 
 
 
Enter index number to select OR [Exit][Next]> 1
 
 
<-------------------------------- BEA WebLogic Configuration Wizard ----------------------->
 
Select a Domain Template:
-------------------------
 
Please select a template from the list or select another directory of templates.
 
*[/home/weblogic/bea/weblogic81/common/templates/domains]
 
   1|Basic WebLogic Platform Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create a basic WebLogic Platform domain, without installing sample applications. Domains created from this template will support the
    |WebLogic Server, WebLogic Workshop, WebLogic Integration and WebLogic Portal runtime functionality, including support for J2EE
    |applications, Web applications, Web Services, custom controls, business processes and portals. Use domains created from this template
    |for development of WebLogic Platform applications.
 
   2|Basic WebLogic Portal Domain 8.1.3.0
   | BEA Systems, Inc.
    | Create a basic WebLogic Portal domain, without installing sample applications.   Domains created from this template will support the
    |WebLogic Server, WebLogic Workshop and WebLogic Portal runtime functionality, including support for J2EE applications, Web applications,   
 |Web Services, custom controls and portals. Use domains created from this template for development of WebLogic Portal applications.
 
 3 |Basic WebLogic Integration Domain 8.1.3.0
   | BEA Systems, Inc.
    | Create a basic WebLogic Integration domain, without installing sample applications.   Domains created from this template will support
    |the WebLogic Server, WebLogic Workshop and WebLogic Integration runtime functionality, including support for J2EE applications, Web
    |applications, Web Services, custom controls and business processes. Use domains created from this template for development of WebLogic
      |Integration applications.
 
     4|Basic WebLogic Workshop Domain 8.1.3.0
    | BEA Systems, Inc.
 
Enter index number to select OR [Down][Exit][Previous][Next]> down
 
 
 
<---------------------- BEA WebLogic Configuration Wizard ---------------------------->
 
Select a Domain Template:
-------------------------
 
Please select a template from the list or select another directory of templates.
 
    | Create a basic WebLogic Workshop domain, without installing sample applications.   Domains created from this template will support the     |WebLogic Server and WebLogic Workshop runtime functionality, including support for J2EE applications, Web applications, Web Services and     |custom controls. Use domains created from this template for development of WebLogic Workshop applications.
 
 ->5|Basic WebLogic Server Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create a basic WebLogic Server domain without installing sample applications.
 
   6|WebLogic Server Examples Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create the WebLogic Server Examples domain in a directory outside of the installed kit. The Examples domain contains a collection of
    |examples to show best practices for coding individual J2EE APIs.
 
   7|Avitek Medical Records Sample Domain 8.1.3.0
    | BEA Systems, Inc.
    | Create the Avitek Medical Records domain in a directory outside of the installed kit. The Avitek Medical Records is a WebLogic Server     |sample application suite that concisely demonstrates all aspects of the J2EE platform.
 
   8|Select another directory location
 
 
Enter index number to select OR [Up][Exit][Previous][Next]>5
 
<--------------------- BEA WebLogic Configuration Wizard --------------------->
 
Select a Domain Template:
-------------------------
 
Please select a template from the list or select another directory of templates.
    *The selected template is the same as the one you are working on. Do you
    *want to reload the template ?
 
 ->1|Yes
 
   2|No
 
 
Enter index number to select OR [Exit][Next]> 1

<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Choose Configuration Option:
-------------------------
 
    *Do you want to run the wizard in express mode?
 ->1|Yes
   2|No
 
Enter index number to select OR [Exit][Previous][Next]> 1
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
    |          Name           |              Value              |
   _|_________________________|_________________________________|
   1|       *User name:       |            weblogic             |
   2|     *User password:     |                                 |
   3| *Confirm user password: |                                 |
   4|      Description:       | The default administration user |
 
Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
 
Enter option number to select OR [Exit][Previous][Next]> 2
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
    "*User password:" = []
 
Input new *User password: OR [Exit][Reset][Accept]> [輸入八位密碼]  
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
 
    |          Name           |              Value              |
   _|_________________________|_________________________________|
   1|       *User name:       |            weblogic             |
   2|     *User password:     |             ******              |
   3| *Confirm user password: |                                 |
   4|      Description:       | The default administration user |
 
Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
 
Enter option number to select OR [Exit][Previous][Next]> 3
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
    "*Confirm user password:" = []
 
Input new *Confirm user password: OR [Exit][Reset][Accept]> [確認八位密碼] ///口令必須與上面的一樣
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Configure Administrative Username and Password:
--------------------
 
Create a user automatically assigned to the Administrative Role. This user is the default administrator used to start development mode
servers.
 
 
 
 
 
 
    |          Name           |              Value              |
   _|_________________________|_________________________________|
   1|       *User name:       |            weblogic             |
   2|     *User password:     |            ********             |
   3| *Confirm user password: |            ********             |
   4|      Description:       | The default administration user |
 
Select Option:
    1 - Modify "User name"
    2 - Modify "User password"
    3 - Modify "Confirm user password"
    4 - Modify "Description"
    5 - Discard Changes
 
Enter option number to select OR [Exit][Previous][Next]> next
 
 
<------------------------- BEA WebLogic 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
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Java SDK Selection:
-------------------
 
 ->1|JRockit SDK 1.4.2_04-8130 @ /home/weblogic/bea/jrockit81sp3_142_04
  2|Sun SDK 1.4.2_04 @ /home/weblogic/bea/jdk142_04
   3|Other Java SDK
 
Enter index number to select OR [Exit][Previous][Next]> 1
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Select the target domain directory for this configuration:
----
 
    "Target Location" = [/home/weblogic/bea/user_projects/domains]
 
Input new Target Location OR [Exit][Previous][Next]> [直接回車]
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Edit Domain Information:
------------------------
 
    | Name | Value   |
   _|________|__________|
   1| *Name: | mydomain |
 
Enter value for "Name" OR [Exit][Previous][Next]> [輸入名稱或者直接回車]
 
 
 
<------------------------- BEA WebLogic Configuration Wizard ------------------------->
 
Creating Domain...
 
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
 
 
**** Domain Created Successfully! ****
完成服務的建立!
 
1、如何啓動WebLogic
[weblogic@jcms bin]$ cd /var/web/jsp/bea/user_projects/domains/mydomain
[weblogic@jcms bin]$ ./startWebLogic.sh    (需要輸入用戶名密碼)
 
2、如何關閉WebLogic
[weblogic@jcms bin]$ ./stopWebLogic.sh
 
 
 
1、無需輸入用戶名密碼啓動關閉weblogic。
weblogic賬戶在mydomain目錄下,新建boot.properties文件,輸入:
 
password=12345678
username=weblogic
 
把啓動weblogic的用戶名密碼寫進入。
 
2、修改starWeblogic.sh和stopWeblogic腳本
startWeblogic.sh
 /usr/bin/nohup ${JAVA_HOME}……………… weblogic.Server > /var/web/weblogic.log 2>&1
 
注意:紅色部分爲添加的命令。意爲將啓動腳本放到後臺執行,並輸出日誌。
 
   ②stopWeblogic.sh
     #!/bin/sh
    ………………腳本內容………(刪除這段腳本,用於身份驗證,刪除後就無需輸入用戶名密碼)
# set server name
 
   
3、將weblogic的啓動關閉作爲linux系統服務。
root賬戶在/etc/init.d下新建weblogic文件,內容如下:
      
            #!/bin/sh
# chkconfig: 345 20 80
# description: Weblogic auto start-stop script.
 
DOMAIN_HOME=/var/web/jsp/user_projects/domains/mydomain
WLS_OWNER=weblogic
          
case "$1" in
     'start')
     su - ${WLS_OWNER} -c "cd ${DOMAIN_HOME}; ./startWebLogic.sh"
     ;;
     'stop')
     su - ${WLS_OWNER} -c "cd ${DOMAIN_HOME}; ./stopWebLogic.sh"
     ;;
Esac
 
其中DOMAIN_HOME是你創建的用戶域的路徑。文件配置好後,就可以利用linux的服務來啓動和關閉weblogic了。
#service weblogic start
 
4、隨系統自動啓動和關閉weblogic
      以root用戶執行如下命令:
 
 
            ln -s /etc/init.d/weblogic /etc/rc.d/rc1.d/K80weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc2.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc3.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc4.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc5.d/S20weblogic
ln -s /etc/init.d/weblogic /etc/rc.d/rc6.d/K80weblogic
 
另外,其實我們也可以通過運行setup命令,在system services裏面設置weblogic服務是否自動啓動。
 
 
Aweblogic無法啓動,錯誤信息<error>包含如下,
    <Error> <EmbeddedLDAP> <000000> <Error opening the Transaction Log: ./myserver/ldap/ldapfiles/EmbeddedLDAP.tran: Permission denied>
 
QLDAP啓動失敗,導致的問題可能是用root賬戶啓動了weblogic。檢查mydomain目錄下myserver/ldap/ldapfiles下的文件權限,是否是weblogic用戶組,如果還是無法啓動,請刪除.tran文件。
 
Aweblogic無法啓動,錯誤信息<error>包含如下,
     <Error> <Deployer> <BEA-149204> <The deployment framework was unable to register with the Data Replication Service.
<Error> <Deployer> <BEA-149601> <The deployment framework was unable to resume accepting requests.>
 
Q問題是管理域無法與用戶域通信。查看linux系統主機名,查看/etc/hosts文件,看是否有如下一行主機記錄,如果沒有,請將這一行記錄加入到/etc/hosts文件中。
         127.0.0.1    localhost.localdomain    localhost
 
       沒有這一行記錄,就會導致啓動失敗,一般在安裝系統時,設置了主機名、有兩塊網卡,在設置主機名時,上面的記錄就沒有了。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章