weblogic 安装过程文档!

来源:互联网 发布:屏幕分辨率调节软件 编辑:程序博客网 时间:2024/05/17 01:55

最近公司新业务系统采用了weblogic作为中间件,我个人以前从没接触过。

属于赶鸭子上架型,花了一些时间学习weblogic的安装及调优。大致给自己总结下,如果能给其它网友提供参考和帮助,也非常开心。

毕竟自己也在blog上收益颇丰。

 

前期工作:关闭防火墙及邮件通知功能

[root@ut-weblogic01 ~]#services iptables status

[root@ut-weblogic01 ~]#chkconfig --list iptables

[root@ut-weblogic01 ~]#chkconfig --level 35 iptables off

[root@ut-weblogic01 ~]#chkconfig --list sendmail

[root@ut-weblogic01 ~]#chkconfig --level 35 sendmail off

 

一、创建Weblogic用户和组

[root@ut-weblogic01 ~]# groupadd -g 1000 oinstall

[root@ut-weblogic01 ~]# useradd -g oinstall weblogic

[root@ut-weblogic01 ~]# passwd weblogic

Changing password for user weblogic.

New UNIX password:

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

 

二、创建weblogic安装路径及授权

 

[root@ut-weblogic01 ~]#

[root@ut-weblogic01 ~]# mkdir -p /u01/oracle/Middleware

[root@ut-weblogic01 ~]# chown -R weblogic:oinstall /u01

[root@ut-weblogic01 ~]# chmod -R 755 /u01

三、修改hosts文件

[root@ut-weblogic01 ~]# cd /etc

[root@ut-weblogic01 etc]# cp hosts hosts.bak

[root@ut-weblogic01 etc]# vi hosts

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1               localhost.localdomain localhost

::1             localhost6.localdomain6 localhost6

10.1.1.217         ut-weblogic01.uni-top.com ut-weblogic01

~

"hosts" 5L, 246C written

 

四、创建JDKweblogic安装包存放路径

 

[root@ut-weblogic01 etc]#

[root@ut-weblogic01 etc]# su - weblogic

[weblogic@ut-weblogic01 ~]$ ls

[weblogic@ut-weblogic01 ~]$ mkdir tools

[weblogic@ut-weblogic01 ~]$ ls

tools

[weblogic@ut-weblogic01 ~]$ ls -rlt

总计 4

drwxr-xr-x 2 weblogic oinstall 4096 04-10 10:27 tools

[weblogic@ut-weblogic01 ~]$ ls

tools

[weblogic@ut-weblogic01 ~]$ cd tools

[weblogic@ut-weblogic01 tools]$ scp 10.1.1.228:/home/weblogic/tools/* .

weblogic@10.1.1.228's password:

jdk-6u45-linux-x64.bin                        100%   69MB  17.2MB/s   00:04   

wls1211_generic.jar                           100%  997MB  13.7MB/s   01:13

 

五、执行JDK的安装

 

[weblogic@ut-weblogic07 tools]$ ./jdk-6u45-linux-x64.bin

[weblogic@ut-weblogic06 tools]$ ls

jdk1.6.0_45  jdk-6u45-linux-x64.bin  wls1211_generic.jar

[weblogic@ut-weblogic06 tools]$ exit

[root@ut-weblogic06 /]# cd usr

[root@ut-weblogic06 usr]# mkdir java

[root@ut-weblogic06 tools]# mv jdk1.6.0_45 /usr/java

[root@ut-weblogic06 java]# ls -rtl

总计 4

drwxr-xr-x 8 weblogic oinstall 4096 2013-03-27 jdk1.6.0_45

 

六、修改JDK的配置文件并使之生效

 

[weblogic@ut-weblogic06 ~]$ vi .bash_profile

#for weblogic

export JAVA_HOME=/usr/java/jdk1.6.0_45

export WLS_HOME=/u01/oracle/Middleware

export PATH=$JAVA_HOME/bin:$PATH

export BASE_DOMAIN=/u01/oracle/Middleware/user_projects/domains/base_domain

[weblogic@ut-weblogic06 ~]$ source .bash_profile

[weblogic@ut-weblogic06 ~]$ java -version

java version "1.6.0_45"

Java(TM) SE Runtime Environment (build 1.6.0_45-b06)

Java HotSpot(TM) 64-Bit Server VM (build 20.45-b01, mixed mode)

 

七、安装weblogic,使用VNC调出GUI节目进行安装

 

[weblogic@ut-weblogic06 ~]$ ls

tools

[weblogic@ut-weblogic06 ~]$ cd tools

[weblogic@ut-weblogic06 tools]$ ls

jdk-6u45-linux-x64.bin  wls1211_generic.jar

[weblogic@ut-weblogic06 tools]$ vncserver :1

Password:123.com

 

八、进行weblogic域配置

 

[weblogic@ut-weblogic06 tools]$ cd /u01/oracle/Middleware/wlserver_12.1/common/bin/

[weblogic@ut-weblogic06 bin]$ ./config.sh

九、免密码启动

 

[weblogic@ut-weblogic07~]$ cd /u01/oracle/Middleware/user_projects/domains/base_domain/servers/ManagedServer5/

[weblogic@ut-weblogic07 ManagedServer5]$mkdir security

[weblogic@ut-weblogic07 ManagedServer5]$ cd security/

[weblogic@ut-weblogic07 security]$vi boot.properties

Username=weblogic

Password=weblogic

 

十、自启动脚本

 

AdminServer

[root@ut-weblogic06 ~]# cd /etc

[root@ut-weblogic06 etc]# cp rc.local rc.local.bak

[root@ut-weblogic06 etc]# vi rc.local

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

 

touch /var/lock/subsys/local

#for weblogic

su - weblogic -c "/u01/oracle/Middleware/user_projects/domains/base_domain/bin/startWebLogic.sh &"

~

ManagedServer

[root@ut-weblogic07 etc]# cd /etc

[root@ut-weblogic07 etc]# cp rc.local rc.local.bak

[root@ut-weblogic07 etc]# vi rc.local

#!/bin/sh

#

# This script will be executed *after* all the other init scripts.

# You can put your own initialization stuff in here if you don't

# want to do the full Sys V style init stuff.

 

touch /var/lock/subsys/local

 

#for weblogic

su - weblogic -c "/u01/oracle/Middleware/user_projects/domains/base_domain/bin/startManagedWebLogic.sh ManagedServer5 http://10.1.1.227:7001 &"

 

[weblogic@ut-weblogic07 bin]$ vi startManagedServer5.sh

nohup ./startManagedWebLogic.sh ManagedServer5 http://10.1.1.227:7001 > /dev/null 2>&1 &

~

[weblogic@ut-weblogic07 bin]$ vi stopManagedServer5.sh

./stopManagedWebLogic.sh ManagedServer5 http://10.1.1.227:7001

 

[weblogic@ut-weblogic07 bin]$ chmod 755 *.sh

 

 

十一、修改weblogic内存参数

 

[root@ut-weblogic07 ~]# su - weblogic

[weblogic@ut-weblogic07 ~]$ cd $BASE_DOMAIN

[weblogic@ut-weblogic07 base_domain]$ cd bin

[weblogic@ut-weblogic07 bin]$ ls -rtl

总计 56

drwxr-x--- 2 weblogic oinstall  4096 04-18 09:34 service_migration

drwxr-x--- 2 weblogic oinstall  4096 04-18 09:34 server_migration

drwxr-x--- 2 weblogic oinstall  4096 04-18 09:34 nodemanager

-rwxr-xr-x 1 weblogic oinstall  1986 04-18 09:34 stopWebLogic.sh

-rwxr-xr-x 1 weblogic oinstall  2452 04-18 09:34 stopManagedWebLogic.sh

-rwxr-xr-x 1 weblogic oinstall  5689 04-18 09:34 startWebLogic.sh

-rwxr-xr-x 1 weblogic oinstall  3217 04-18 09:34 startManagedWebLogic.sh

-rwxr-xr-x 1 weblogic oinstall 13235 04-18 09:34 setDomainEnv.sh

-rwxr-xr-x 1 weblogic oinstall    92 04-18 15:08 startManagedServer5.sh

-rwxr-xr-x 1 weblogic oinstall    63 04-18 15:10 stopManagedServer5.sh

[weblogic@ut-weblogic07 bin]$ cp setDomainEnv.sh setDomainEnv.sh.bak

[weblogic@ut-weblogic07 bin]$ vi setDomainEnv.sh

十二、设置时间同步

 

[root@ut-weblogic01 ~]# ntpdate 10.1.1.115

11 Apr 10:21:22 ntpdate[24783]: step time server 10.1.1.115 offset -4.425058 sec

[root@ut-weblogic01 ~]# date

2014 04 11日星期五 10:21:25 CST

[root@ut-weblogic01 ~]# crontab -l

no crontab for root

[root@ut-weblogic01 ~]# crontab -e

no crontab for root - using an empty one

00,10,20,30,40,50 * * * * ntpdate 10.1.1.115

~

十三、控制台显示成功

 

 

0 0