Red Hat Linux Apache2.0 + Weblogic9.2 load balancing cluster installation configuration

  • 2020-05-13 03:58:59
  • OfStack

************************************************************************************************************************
JDK installation steps

1. Log in as root
2. Go to java.sun.com to download rpm of JDK1.5 for LINUX, which is jdk-1_5_0_11-linux-i586-rpm.bin.
3. Enable it to obtain executable permissions through the chmod +x jdk-1_5_x-rc-linux-i586-rpm.bin command
4. Perform. / _5_0_11 jdk - 1 - linux - i586 - rpm. bin
5. rpm-ivh jdk-1_5_0_11-linux-i586.rpm
6. After installation,JDK is installed under /usr/java/ directory
7. Setting environment variables (add at the end of /etc/profile file)
#set java environment
JAVA_HOME=/usr/java/jdk1.5.0_11
CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar
PATH=$JAVA_HOME/bin:$PATH
export JAVA_HOME CLASSPATH PATH
8. Enter the following parameters to view the environment variables:
#echo $JAVA_HOME
#echo $CLASSPATH
#echo $PATH
9. Type java-version. If relevant JDK version information appears, prove successful.

************************************************************************************************************************

Weblogic installation steps

1. Software installation

1. Preparation before installation
1.1 please confirm that you want to install WebLogic first version of the platform has passed BEA certification, complete list please refer to the certification platform http: / / e - docs bea. com/wls/certifications/certs_810 / index html
1.2 identify 1 installation directory. It is recommended that there be at least 1 G space in this directory. You can use du to view the disk space usage
1.3 create an BEA user group account
groupadd � g GID groupname
Note: GID represents the ID of the created group, 1 is greater than 500
For example: groupadd, g 600 bea
1.4 create an weblogic user account
useradd, d, userhome, g, GID, username
Note: userhome represents the user's home directory, and GID is the group ID created in the previous step
For example, the useradd, d /home/weblogic, g 600 weblogic
2. Installation steps
There are three installation methods of WebLogic under Linux platform: graphic window mode, console mode, and unguarded installation mode. Because console mode is most widely used and is not restricted by any other hardware conditions (we will only cover console installation mode here).

2.1 install the JRE environment
The installation of WebLogic requires the support of JRE. Depending on the installation platform, the installation media of WebLogic can also be divided into two categories: 1 with JRE (suffix.bin) and 1 with JRE environment (suffix.jar) provided by the platform manufacturer.

2.2 get and upload the weblogic installation media to a temporary directory
If you don't have installation media, we can go to the http: / / commerce bea. com download 1 WebLogic trial, then through FTP uploaded to a temporary directory on the host, the temporary directory recommends at least one G the remaining space
2.3 start of installation
2.3.1. Installation method of bin
First give.bin executable rights
chmod a+x filename.bin
Then perform
./filename.bin -mode=console
2.3.2. Installation method of jar
Then perform
java -jar filename.jar -mode=console
2.4 console installation
2.4.1 after completing step 2.3, enter the welcome screen for console installation and type [Next] to continue
2.4.2 the license agreement appears at this point. After reading it, type [Yes] to continue
2.4.3 prompt to select 1 BEA home directory, as shown below
Choose BEA Home Directory:"BEA Home" = [/root/bea]Input new BEA Home OR [Exit][Previous][Next] >
If you want to change the default BEA home directory, re-enter the full directory path, otherwise type [Next] to continue, and change it to: /usr/local/bea

2.4.4 confirm the BEA home directory
Choose BEA Home Directory: - > 1| Yes, Use BEA home directory [/usr/local/bea]2| No, return to BEA home selectionEnter index to select OR [Exit][Previous][Next] >
Type [1] to continue

2.4.5 select the installation type
Choose Install Type: - > 1|Complete Installation the the BEA Installation Choose custom advanced users.
Type [1] to continue
2.4.6 select the installation path
Choose Product Directory:Product Installation Directory = [/home/bea/weblogicXX]Input new Product Installation Directory OR [Exit][Previous][Next] >
If you want to change the default installation directory, reenter the full directory path, otherwise type [Next] to continue
2.4.7 confirm the installation path
Choose Product Directory: - > 1| Yes, use this directory [/home3/weblogicXX]2| No, select another select select OR [Exit][Next] >
Type [1] to continue

2.4.8 now start the installation. At this time, a simulated progress bar will appear. Wait patiently until the installation is completed successfully.

2. Configure Configuration Wizard

Step 1 under the software after the installation, configuration Domain field, enter the weblogic installation directory (for example: / home/bea/weblogic81 / common/bin), find the file config. sh, perform his #. / config sh;

The configuration screen appears and the option "Create a new weblogic configuration" is selected.
Select the configured module as "Basic weblogic Domain", then click the quick configuration "Express" and click the [Next] button

Create the user name and password of the admin page (password is no less than 8 digits), NEXT next step;

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] > 1
-------------------------------------------------------------------------------------------------------------------
Java SDK Selection:
-------------------
- > 1|Sun SDK 1.5.0_11 @ /usr/java/jdk1.5.0_11
2|Other Java SDK
Enter index number to select OR [Exit][Previous][Next] > 1

-------------------------------------------------------------------------------------------------------------------
Choose Configuration Option:
----------------------------
*Do you want to modify any of the preconfigured settings or defaults in your template?
*
*To keep the default or template settings, and proceed directly to name and create your domain, leave No selected.
1|Yes
- > 2|No
Enter index number to select OR [Exit][Previous][Next] > 1
Configure the Administration Server:
------------------------------------
Enter adminstration server configurations. Each WebLogic Server domain must have one Administration Server. The Administration Server
hosts the Administration Console which is used to perform administrative tasks.
| Name | Value |
_|__________________|_____________________|
1| *Name: | AdminServer |
2| Listen address: | All Local Addresses |
3| Listen port: | 7001 |
4| SSL listen port: | N/A |
5| SSL enabled: | false |
Select Option:
1 - Modify "Name"
2 - Modify "Listen address"
3 - Modify "Listen port"
4 - Modify "SSL enabled"
Enter option number to select OR [Exit][Previous][Next] >

Edit Domain Information:
------------------------
| Name | Value |
_|________|___________|
1| *Name: | ebusiness |
Select Option:
1 - Modify "Name"
2 - Discard Change
Enter option number to select OR [Exit][Previous][Next] >

Creating Domain...

0% 25% 50% 75% 100%
[------------|------------|------------|------------]
[***************************************************]

**** Domain Created Successfully! ****
This interface is a summary confirmation of all configuration information. If there is no problem, click Create to start creating the DOMAIN domain.

3. Start Weblogic

Before starting Weblogic, the service username and password can be written to the startup script.
Enter the domain directory you just configured (for example: /home/bea/user_projects/domains/mydomain), edit the startWebLogic.sh startup script, and execute $vi startWebLogic.sh
Enter the user name and password in "WLS_USER= WLS_PW=", save exit;
Finally, execute $./ startWebLogic.sh and launch Weblogic..
./startWeblogic.sh -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0
4. Discontinue Weblogic service
There are several ways to stop Weblogic services:
1, KILL drop the process
2. Through "http:// service address: 7001/console",shutdownserver
3. Stop service with script:
In the path # /home/bea/user_projects/domains/mydomain, there is one stopWebLogic.sh file.


************************************************************************************************************************
Apache2.0 + Weblogic integrated configuration

1. LINUX installation APACHE2.0:
--------------------------------------------------------
tar zxvf httpd-2.0.55.tar.gz
cd httpd-2.0.55
./configure --prefix=/usr/local/apache --enable-module=so --enable-rule=SHARED_CORE
make
make install

#/sbin/chkconfig --del httpd
#/etc/init.d/httpd stop
#rm /etc/init.d/httpd
#cp /usr/local/apache2/bin/apachectl /etc/init.d/
#/sbin/chkconfig --add apachectl
# reboot

2. Open ports apache and weblogic of the linux firewall
#vi /etc/sysconfig/iptables
Add:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 7001 -j ACCEPT
#/sbin/service iptables restart

3. Apache2.0 + Weblogic9.2 integration:
--------------------------------------------------------
cp /usr/local/bea/weblogic92/server/plugin/linux/i686/mod_wl_20.so /usr/local/apache/modules
apache/bin#./ apachectl-l # is successful as mod_so.c
apache/bin#./ apachectl-t #Syntax OK successful
apache/bin# ./apachectl -start

4. Modify the httpd.conf file under apahce/conf, add or modify the following:

NameVirtualHost *:80

#For weblogic proxy setting
LoadModule weblogic_module modules\mod_wl_20.so

< VirtualHost *:80 >
ServerName www.test.com
DocumentRoot /usr/local/src/deploy/www/WebRoot
DirectoryIndex index.jsp
CustomLog "|/usr/local/apache/bin/rotatelogs /usr/local/apache/logs/%y_%m_%d.testcomaccess.log 86400 480" common
< IfModule mod_weblogic.c >
WebLogicHost 130.0.0.190
WebLogicPort 7001
WebLogicCluster 130.0.0.190:7001,130.0.0.246:7001
MatchExpression *.jsp
MatchExpression *.do
< /IfModule >
< /VirtualHost >

************************************************************************************************************************


Related articles: