There are usually three ways to deploy projects in weblogic: first, install and deploy in the console; Second, deploy the deployment package under the autodeploy directory in the domain domain; Third, use the configuration file config. In the domain XML for project deployment.
1. Start the weblogic service, log in to the weblogic console page, enter the user name and password, and log in to the console
2. Click deployment on the left
3. Click the installation button on the right to prepare for project installation
4. When you see the path input box, you can select the location of the project to be deployed below
5. You can also directly enter the location of the package to be deployed and press enter
6. Click next
7. Continue to the next step
8. Click the finish button
9. Save the settings of the previous steps
10. After saving, you will see the prompt of activating the change, and there is no need to restart.
11. It can be carried out at this time test After entering the project name, you can see the welcome page of the project, that is, the project has been deployed successfully.
If the previous steps are completed, but you still cannot access the project, you can refer to the following supplementary steps
Supplement 1. Click deploy, check the previous item, and click start
Supplement 2. After startup, when the project status is active and the health status is OK, continue the test.
autodeploy auto deploy
During automatic deployment, you do not need to log in to the console. There is an autodeploy directory under the main directory of the domain domain. You can directly copy the project package to the autodeploy directory.
There is a readme in the autodeploy directory Txt document, open it and take a look. Here, pick out the first paragraph
- This autodeploy directory provides a quick way to deploy applications
- to a development server. When the WebLogic Server instance is running
- in development mode, applications and modules in this directory are
- automatically deployed.
What is it mainly about? Under the development mode, when weblogic is started, the projects under the autodeploy directory will be automatically deployed.
The package servletDemo. Will be deployed Put war under the autodeploy directory and start startweblogic CMD, access servletDemo, and you can still see
config.xml configuration file deployment
config. The XML file is under the config directory of the domain domain, config XML mainly configures some related information of domain domain
Where should we deploy the project
- <?xml version='1.0' encoding='UTF-8'?>
- <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">
- <sec:authentication-provider xsi:type="wls:default-authenticatorType">
- <sec:password-validator xmlns:pas="http://xmlns.oracle.com/weblogic/security/providers/passwordvalidator" xsi:type="pas:system-password-validatorType">
Our project deployment information is added between configuration version and admin server name
Just started config When deploying the XML configuration file, 404 appears. Just modify the configuration
Unzip the deployed war package into a folder, and then
Modify war in < module type > war < / module type > to "dir"
Then start the weblogic service.
The three deployment methods can achieve the purpose of the deployment project. As for the advantages and disadvantages of the three deployment methods, let's talk about them tomorrow.
Last blog post wrote Three ways for weblogic to deploy projects , including installing the deployment in the console, deploying the deployment package under the autodeploy directory in the domain, and using the configuration file config. In the domain XML for project deployment. How to choose the deployment mode in the development environment and formal production environment? Here is a reference based on my own experience.
This general formal production environment or test The environment can be in this way. At this time, we need to change the operation mode of weblogic to production mode, and put the deployment package in a unified place for management, installation, update and deletion. The deployment is carried out directly on the console to facilitate monitoring.
This development is a little more convenient for management. During development, it is convenient to directly copy the project to autodeploy and start the weblogic service. Considering that the weblogic service will not automatically decompress the war package (which is not as good as tomcat), the files obtained through some absolute paths in the project may not be well obtained. At this time, the war package can be decompressed into a folder to facilitate file reading. During development, you can directly copy the modified files to the autodeploy directory through ant or other tools, which is more convenient.
config.xml configuration deployment
config.xml configuration deployment is similar to autodeploy. The difference is that autodeploy must put the deployment package of the project under the autodeploy directory, but config The deployment package of XML configuration deployment can be put anywhere. This method is also used in the development environment. I don't recommend this method, because every time a new project is deployed, I have to find config. In the domain domain XML configuration, and then modify it. The risk of error is too high. It's better to use autodeploy directly.
According to the above analysis, console deployment is used in production and autodeploy or config. Is used in development XML configuration deployment. If you use eclipse for development, you can integrate weblogic plug-ins and start, stop and reference weblogic directly in eclipse Installing weblogic plug-ins from eclipse.