Linux WebLogic installation and debugging instructions

Source: Internet
Author: User
Article Title: Linux WebLogic installation and debugging instructions. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

WebLogic is a set of powerful JAVA-based e-commerce kit. It provides many powerful middleware to facilitate coding of JSP, SERVLET, and other e-commerce applications, it can provide enterprises with a complete business application solution. For developers, WebLogic can download a complete set of WebLogic at www.bea.com for free and get a license that limits IP addresses for learning and developing code based on this suite. If you need to officially put it into use, you must pay a certain amount of fee to obtain an unlimited license. Because this kit is based on this release method, it is easy for General website developers to get WebLogic for learning and development. Of course, it is another thing to put it into use.

The WebLogic5.10 I got is two large zip files, one is the WebLogic package and the other is the document. Because it is based on JAVA, although there is a distinction between the operating system during the download, but the set I obtained after practice found that both WINNT and LINUX can run, the following mainly uses LINUX as an example, the Installation Method of WINNT is similar.

Preparations before installation:

Before installation, you must obtain a set of JDK corresponding to your operating system (free download at www.sun.com). After installation, uncompress the WebLogic5.10 package. We recommend that you store it in the root directory, this saves a lot of trouble in modifying the settings. in linux, you can solve the problem in other directories, and then make a hard connection in the root directory.
My installed file directory is
/Usr/local/jdk1.2/
/Usr/local/weblogic/
Ln-s // usr/local/weblogic/
Configure weblogic:
To start weblogic, You need to execute two script files:
Linux: setEnv. sh and startWebLogic. sh
WINNT corresponds to setEnv. cmd and startWebLogic. cmd.
1. weblogic. properties
Open the weblogic. properties file of/usr/local/weblogic/and find this line.
Weblogic. password. system =
This is used to set the administrator password. This setting item cannot be blank. Therefore, you must set a reliable administrator password.
Example: weblogic. password. system = sdfjkdshfds

Set to run JSP:

# WEBLOGIC JSP PROPERTIES 
# ------------------------------------------------
# Sets up automatic page compilation for JSP. Adjust init args for
# directory locations and uncomment to use.
#weblogic.httpd.register.*.jsp=\
#weblogic.servlet.JSPServlet
#weblogic.httpd.initArgs.*.jsp=\
#pageCheckSeconds=1,\
#compileCommand=c:/jdk1.2.1/bin/javac.exe, \
#workingDir=/weblogic/myserver/classfiles, \
#verbose=true


Delete the comments and change them
# WEBLOGIC JSP PROPERTIES 
# ------------------------------------------------
# Sets up automatic page compilation for JSP. Adjust init args for
# directory locations and uncomment to use.
weblogic.httpd.register.*.jsp=\
weblogic.servlet.JSPServlet
weblogic.httpd.initArgs.*.jsp=\
pageCheckSeconds=1,\
compileCommand=c:/jdk1.2.1/bin/javac.exe, \
workingDir=/weblogic/myserver/classfiles, \
verbose=true


You must also configure this line:
CompileCommand =/usr/local/jdk1.2/bin/javac ,\
This is the path of the jdk java compiler.

2. setEnv. sh
Open/weblogic/setEnv. sh and find this line.
JAVA_HOME =/usr/java
Change
JAVA_HOME =/usr/local/jdk1.2/

3. startWebLogic. sh
Find a "LINUX" string in uppercase and change it to "Linux". It's strange why? This is because at startup, the script file calls the uname command to get the system name, and then compares it with the "LINUX" string to check whether it is a linux system, but the system name returned by the uname command is Linux, so we need to change it. This should be a small BUG in the startup script, so WINT won't be so troublesome.
Run weblogic:
After simple configuration, the test run is completed.
Run the following command in the/weblogic/directory:
../SetEnv. sh (please note that I have two ".." here, because we need to execute this script under the current shell)
./StartWebLogic. sh
When WebLogic is successfully started, it indicates that WebLogic is successfully started.

Simple Server test:
WebLogic uses the default WEB port 7001. You can enter the address in a browser.
Http: // localhost: 7001/
Test whether the connection can be established.
Servlet Testing
If it can be connected, you can perform the next Servlet test and enter the address in the browser.
Http: /localhost: 7001/helloWorld
This is the WebLogic Servlet demonstration (for how to install the Servlet, see the following)
JSP Testing
Create a file named test. jsp under/weblogic/myserver/public_html /.

test.jsp 
<%
Out.print("test JSP");
%>
  

Enter the address in the browser
Http: // localhost: 7001/test. jsp
Test whether the output "test JSP" is correct.
  
To learn a set of systems, first of all, we need to understand its structure. This article describes in detail some of the structures and features of WebLogic:

Most WebLogic configurations are in weblogic. properties, as long as you carefully study this file, you can clearly understand some of the structure and characteristics of WebLogic, the following is the weblogic. some configuration items in the properties file are described as follows:
Weblogic.httpd.doc umentRoot = public_html/
This is the root directory of the WebLogic WEB server, that is, the directory/weblogic/myserver/public_html/

Weblogic. password. system = sdfjkdshfds
As mentioned above, the administrator password is set.

Weblogic. Systems. listenPort = 7001
This is the WEB server port for WebLogic.
Weblogic. httpd. servlet. classpath =/weblogic/myserver/servletclasses
Set the Servlet storage path

About Servlet
For security purposes, WebLogic running in WebLogic must be in weblogic. properties, for example, Servlet http: // localhost: 7001/helloWorld, which is in weblogic. the registration item in properties is
Weblogic. httpd. register. helloWorld = examples. servlets. HelloWorldServlet
Actually, the actual path of this Servlet is/weblogic/myserver/servletclasses/examples/servlets/HelloWorldServlet. class.

Check the registration items in weblogic. properties and the path of the HelloWorldServlet. class file. It is not difficult to find out the rules of registering Servlet.

There are several Servlet registration items in weblogic. properties:
Weblogic. httpd. register. AdminEvents = admin. AdminEvents
Weblogic. httpd. register. AdminClients = admin. AdminClients
Weblogic. httpd. register. AdminConnections = admin. AdminConnections
Weblogic. httpd. register. AdminJDBC = admin. AdminJDBC
Weblogic. httpd. register. AdminLicense = admin. AdminLicense
Weblogic. httpd. register. AdminMain = admin. AdminMain
Weblogic. httpd. register. AdminProps = admin. AdminProps
Weblogic. httpd. register. AdminRealm = admin. AdminRealm
Weblogic. httpd. register. AdminThreads = admin. AdminThreads
Weblogic. httpd. register. AdminVersion = admin. AdminVersion
  
This is the Servlet used by the Administrator to manage WebLogic. Access http: // localhost: 7001/AdminMain through URL. In the displayed authentication dialog box, enter system and. password. system = password, you can go to the WebLogic Web management interface for management.

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.