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服务便可。