centos6.8下weblogic12c靜默安裝


環境:

   centos6.8 無桌面環境

   jdk1.7.0_25

  關閉iptables、selinux

安裝前准備:

  1、新建weblogic用戶,設置weblogic密碼

   useradd weblogic 
   passwd  weblogic 

   2、切換用戶至weblogic下,將已下載的jdk上傳到服務器上,解壓並移動到/usr/local/jdk1.7

       2.1、配置環境變量,這里因為只是weblogic用戶用來啟動weblogic服務使用,所以,我這里將環境變量只配置到weblogic用戶家目錄下的/home/weblogic/.bashrc 

export JAVA_HOME=/usr/local/jdk1.7
export JRE_HOME=/usr/local/jdk1.7/jre
export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH

      2.2、 要使配置的環境變量生效,執行 source   .bashrc

      2.3、java  -version  (看到輸出的jdk版本和安裝的版本一致則配置成功)

安裝weblogic:

     1、創建響應文件wls.rsp及loc文件oraInst.loc,模板如下:

          wls.rsp

[ENGINE]
#DO NOT CHANGE THIS.
Response File Version=1.0.0.0.0
[GENERIC]
##The oracle home location. This can be an existing Oracle Home #or a new Oracle Home
#除了這里需要為需要安裝的目錄以外,別的地方不需要做修改 ORACLE_HOME
=/home/weblogic/Oracle/Middleware ##Set this variable value to the Installation Type selected. e.g. WebLogic Server, Coherence, Complete with Examples. # INSTALL_TYPE=WebLogic Server # ##Provide the My Oracle Support Username. If you wish to ignore Oracle Configuration Manager configuration provide empty string for user name. # MYORACLESUPPORT_USERNAME= # ##Provide the My Oracle Support Password # #MYORACLESUPPORT_PASSWORD=<SECURE VALUE> MYORACLESUPPORT_PASSWORD= # ##Set this to true if you wish to decline the security updates. Setting this to true and providing empty string for My Oracle Support username will ignore the Oracle Configuration Manager configuration # DECLINE_SECURITY_UPDATES=true # ##Set this to true if My Oracle Support Password is specified # SECURITY_UPDATES_VIA_MYORACLESUPPORT=false # ##Provide the Proxy Host # PROXY_HOST= # ##Provide the Proxy Port # PROXY_PORT= # ##Provide the Proxy Username # PROXY_USER= # ##Provide the Proxy Password # PROXY_PWD=<SECURE VALUE> # ##Type String (URL format) Indicates the OCM Repeater URL which should be of the format [scheme[Http/Https]]://[repeater host]:[repeater port] # COLLECTOR_SUPPORTHUB_URL=

     oraInst.loc

inventory_loc=/home/weblogic/oraInventory
inst_group=weblogic

  2、上傳或者復制weblogic通用安裝包到weblogic用戶下,確保該文件的所屬用戶及組為weblogic

cd /home/weblogic
cp /usr/local/src/fmw_12.1.3.0.0_wls(1)-weblogic.jar   .

  3、執行安裝

java -jar fmw_12.1.3.0.0_wls\(1\)-weblogic.jar -silent -responseFile /home/weblogic/wls.rsp  -invPtrLoc /home/weblogic/oraInst.loc  -ignoreSysPrereqs

-silent   表明使用靜默安裝的方式

-responseFile  指定響應文件的路徑

-invPtrLoc    指定安裝清單文件路徑

-ignoreSysPrereqs  忽略一些輸出(可以不加此選項)

       執行后會有一些輸出,會有百分比的安裝進度提示,我這里因為是前一天在遠程虛機上安裝的,重啟終端以后輸出已經不存在了,這里只做了些筆記記錄,所以輸出結果已經截不到了,就不在這里記錄結果了。

      至此,weblogic的程序安裝結束,當然正常使用的是時候還得需要配置域才行的。

      weblogic新建域:

     1、設置環境變量,位於安裝目錄下的wlserver中

cd Oracle/Middleware/wlserver/common/bin/
./commEnv.sh

     2、創建域,使用腳本執行命令

./wlst.sh 

Java HotSpot(TM) Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0

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> readTemplate('/home/weblogic/Oracle/Middleware/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('weblogic123')

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

wls:/offline/base_domain/Security/base_domain/User/weblogic>writeDomain('/home/weblogic/Oracle/Middleware/user_projects/domains/base_domain')  

closeTemplate()

exit()

 3、啟動

cd /home/weblogic/Oracle/Middleware/user_projects/domains/base_domain/bin

./startWeblogic.sh    (使用這種執行啟動以后,weblogic會運行在前台,若窗口關閉,則程序結束)

nohup ./startWeblogic.sh >> /home/weblogic/Middleware/log/output.log 2>&1 & (使用nohup將其輸出給重定向到另外一個目錄,需要確保有寫權限,否則的話,nohup會在當前執行的路徑下生成一個nohup.log)

使用瀏覽器訪問控制台:http://ip:7001/console 登陸控制台進行維護部署。 

至此,域配置也完成。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM