weblogic部署

1  啓動weblogic服務,登陸到weblogic控制檯頁面,輸入用戶名和密碼,登陸到控制檯裏面html

 

2  點擊左側的部署node

 

3  在右側點擊安裝按鈕,準備進行項目安裝web

 

4  看到路徑輸入框,能夠在下面選擇要部署的項目的位置oracle

 

5  也能夠直接輸入要部署的包的位置,敲回車app

 

6  點擊下一步便可dom

 

7  繼續下一步ide

 

8  點擊完成按鈕測試

 

9   保存前面各步的設置ui

 

10  保存完成後,會看到激活更改的提示,且不須要重啓。this

 

11  這時即可以進行測試了,輸入項目名稱,看到了項目的歡迎頁面,即項目部署成功。

 

若是前面的步驟操做完成了,但依然沒法訪問項目的話,能夠參考下面的補充步驟

補充步驟

補1  點擊部署,勾選上項目,點擊啓動

 

補2  待啓動後,項目狀態爲活動,健康情況爲OK時,繼續測試。

 

autodeploy自動部署

 

自動部署時不須要登陸控制檯,在domain域的主目錄下面有個autodeploy目錄,直接將項目包拷貝到autodeploy目錄下面就能夠了。

autodeploy目錄裏面有個readme.txt 文檔,打開看一下,這裏摘第一段出來

 

[html] view plain copy

  1. This autodeploy directory provides a quick way to deploy applications  
  2. to a development server. When the WebLogic Server instance is running  
  3. in development mode, applications and modules in this directory are   
  4. automatically deployed.  


主要說什麼呢,就是開發模式下面,當weblogic啓動時,會自動部署autodeploy目錄下面的項目。

 

將部署包servletDemo.war 丟到autodeploy目錄下面,啓動startWeblogic.cmd ,進行servletDemo的訪問,依然能夠看到

歡迎頁面。

 

config.xml配置文件部署

 

config.xml文件在domain域的config目錄下面,config.xml主要配置了domain域的一些相關信息

咱們要部署項目,該在哪裏配置呢

 

[html] view plain copy

  1. <?xml version='1.0' encoding='UTF-8'?>  
  2. <domain xmlns="http://xmlns.oracle.com/weblogic/domain" xmlns:sec="http://xmlns.oracle.com/weblogic/security" xmlns:wls="http://xmlns.oracle.com/weblogic/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/weblogic/security/xacml http://xmlns.oracle.com/weblogic/security/xacml/1.0/xacml.xsd http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator/1.0/passwordvalidator.xsd http://xmlns.oracle.com/weblogic/domain http://xmlns.oracle.com/weblogic/1.0/domain.xsd http://xmlns.oracle.com/weblogic/security http://xmlns.oracle.com/weblogic/1.0/security.xsd http://xmlns.oracle.com/weblogic/security/wls http://xmlns.oracle.com/weblogic/security/wls/1.0/wls.xsd">  
  3.   <name>base_domain</name>  
  4.   <domain-version>12.1.3.0.0</domain-version>  
  5.   <security-configuration>  
  6.     <name>base_domain</name>  
  7.     <realm>  
  8.       <sec:authentication-provider xsi:type="wls:default-authenticatorType">  
  9.         <sec:name>DefaultAuthenticator</sec:name>  
  10.       </sec:authentication-provider>  
  11.       <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">  
  12.         <sec:name>SystemPasswordValidator</sec:name>  
  13.         <pas:min-password-length>8</pas:min-password-length>  
  14.         <pas:min-numeric-or-special-characters>1</pas:min-numeric-or-special-characters>  
  15.       </sec:password-validator>  
  16.     </realm>  
  17.     <default-realm>myrealm</default-realm>  
  18.     <credential-encrypted>{AES}xLPXh4gcT6JErTB+toxRZ1pQpAS+MGMuqnnXzu/OsxWMQTB8152ggdbUlhkSXUGC9f959oL7tIzyZiu9XdeajlkK9vAu9cQlCKLLUaUMyl5Ty4C0uuJA99b14eR7oIu4</credential-encrypted>  
  19.     <node-manager-username>weblogic</node-manager-username>  
  20.     <node-manager-password-encrypted>{AES}n3LLdgmAsocPRoYUrFfR2waWOlEz6KDFsp7+gByNeo8=</node-manager-password-encrypted>  
  21.   </security-configuration>  
  22.   <server>  
  23.     <name>AdminServer</name>  
  24.     <listen-address></listen-address>  
  25.   </server>  
  26.   <embedded-ldap>  
  27.     <name>base_domain</name>  
  28.     <credential-encrypted>{AES}21z8vCiCbuaYqsSj5t5+y6qvEY8dE3NdNr0zDG+K3EdwWEubzk9Vmx79Di43oxqX</credential-encrypted>  
  29.   </embedded-ldap>  
  30.   <configuration-version>12.1.3.0.0</configuration-version>  
  31.   <admin-server-name>AdminServer</admin-server-name>  
  32. </domain>  


咱們的項目部署信息添加在configuration-version 和 admin-server-name 之間

 

 

[html] view plain copy

  1. <configuration-version>12.1.3.0.0</configuration-version>  
  2.   <app-deployment>    
  3.     <name>servletDemo</name>    
  4.     <target>AdminServer</target>    
  5.     <module-type>war</module-type>    
  6.     <source-path>C:\Users\ZhangQi\Desktop\servletDemo</source-path>    
  7.     <security-dd-model>DDOnly</security-dd-model>    
  8.   </app-deployment>  
  9.   <admin-server-name>AdminServer</admin-server-name>  

 

剛開始進行config.xml 配置文件部署的時候,出現了404,修改了下配置就能夠了

將部署的war包解壓爲文件夾的形式,而後

將 <module-type>war</module-type> 裏面的war 修改成 dir 便可

 

[html] view plain copy

  1. <app-deployment>    
  2.     <name>servletDemo</name>    
  3.     <target>AdminServer</target>    
  4.     <module-type>dir</module-type>    
  5.     <source-path>C:\Users\ZhangQi\Desktop\servletDemo</source-path>  
  6.     <security-dd-model>DDOnly</security-dd-model>  
  7.     <staging-mode>nostage</staging-mode>  
  8.   </app-deployment>  


 

 

而後啓動weblogic服務便可。

相關文章
相關標籤/搜索