1. 程式人生 > >Centos7安裝weblogic12.2.1.3.0(開發環境)

Centos7安裝weblogic12.2.1.3.0(開發環境)

控制 con pen ole uri his 3.0 rtu scripting

下載安裝包

fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip

創建用戶組及用戶

groupadd weblogic

useradd -g weblogic weblogic

配置安裝環境

vi ~/.bash_profile

export JAVA_HOME=/home/arvin/app/jdk/jdk1.8.0_171

export PATH=$JAVA_HOME/bin:$PATH

export MW_HOME=/home/weblogic/wls12213

使配置生效

source ~/.bash_profile

解壓壓縮包

unzip fmw_12.2.1.3.0_wls_quick_Disk1_1of1.zip

設置環境

cd /home/weblogic/wls12213/wlserver/server/bin

./setWLSEnv.sh

創建Domain/域

cd $MW_HOME/wlserver/common/bin

./wlst.sh

Initializing WebLogic Scripting Tool (WLST) ...

Jython scans all the jar files it can find at first startup. Depending on the system, this process may

take a few minutes to complete, and WLST may not return a prompt right away.

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline>readTemplateForUpdate (‘/home/weblogic/wls12213/wlserver/common/templates/wls/wls.jar‘)

wls:/offline/base_domain>cd(‘Servers/AdminServer‘)

wls:/offline/base_domain/Server/AdminServer>set(‘ListenAddress‘,‘‘)

wls:/offline/base_domain/Server/AdminServer>set(‘ListenPort‘, 7001)

wls:/offline/base_domain/Server/AdminServer>cd(‘/‘)

wls:/offline/base_domain>cd(‘Security/base_domain/User/weblogic‘)

wls:/offline/base_domain/Security/base_domain/User/weblogic>cmo.setPassword(‘weblogic1‘)

wls:/offline/base_domain/Security/base_domain/User/weblogic>setOption(‘OverwriteDomain‘, ‘true‘)

wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain(‘/home/weblogic/wls12213/domain‘)

wls:/offline/domain/Security/domain/User/weblogic>closeTemplate()

wls:/offline>exit()

Exiting WebLogic Scripting Tool.

啟動weblogic

cd /home/weblogic/wls12213/domain/bin/ -- 進入創建的域目錄bin下

./startWebLogic.sh -- 後臺啟動使用nohup ./startWebLogic.sh &

./stopWeblogic.sh -- 關閉weblogic

啟動瀏覽器訪問weblogic控制臺http://IP:7001/console,用戶名默認是weblogic,密碼是創建域時設置的weblogic1

新建server啟動

應用默認運行在AdminServer中,如果用控制臺新建了server,比如名為almServer,命令行啟動cyyunServer,用startManagedServer命令startManagedServer <server名> <控制臺的地址+端口>

cd /home/weblogic/wls12213/domain/bin/

./startManagedWebLogic.sh almServer http://localhost:7001

刷新控制臺頁面cyyunServer顯示啟動成功。

不輸入用戶名密碼啟動server

啟動weblogic server需要在控制臺輸入用戶名和密碼,不方便後臺啟動

cd /home/weblogic/wls12213/domain/servers/almServer

mkdir security

cd security

vi boot.properties

# 填入以下內容

username=weblogic

password=weblogic1

# 關閉almServer

cd /home/weblogic/wls12213/domain /bin

./stopManagedWebLogic.sh almServer http://localhost:7001

# 重新啟動almServer

./startManagedWebLogic.sh almServer http://localhost:7001

# 後臺啟動

nohup ./startManagedWebLogic.sh almServer http://localhost:7001 &

此時不再需要手動輸入用戶名和密碼,同時不用擔心密碼會泄漏,啟動後Weblogic會對用戶名和密碼做AES加密。再次打開boot.properties就會顯示加密後的內容。

Centos7安裝weblogic12.2.1.3.0(開發環境)