1. 程式人生 > >weblogic linux 靜默安裝

weblogic linux 靜默安裝

linux 靜默安裝weblogic

1、檢查swap分割槽(磁碟分割槽),使用 free -m 或者 df -h
2、若沒有swap分割槽,建立swap分割槽:

1)建立一個2個G的SWAP交換區空白檔案
dd if=/dev/zero of=/swap bs=1M count=2048000
2)使用mkswap格式化檔案為swap檔案系統
mkswap -f /swap   #-f 使用檔案作為swap交換區
3)啟用剛才建立的Swap檔案
swapon /swap
4)如果有必要可以設定開機自動啟用swap檔案交換區,修改/etc/fstab,增加一行
/swap swap swap defaults 0 0 #啟動即啟用swap
5)如果不需要啟用swap或需要調整swap大小,可以使用swapoff命令關閉swap
swapoff /swap
ps: 如果要修改swap分割槽大小,重複操作即可。
3、檢查jdk,沒有就安裝一個。
4、準備weblogic安裝包  fmw_12.1.3.0.0_wls.jar
5、在/home/weblogic/下建立兩個檔案 oraInst.loc 和 wls.resp

   oraInst.loc檔案是Central Inventory Pointer File,新增一下內容:
   
   #Oracle Installer Location File Location
   #組名稱
   inst_group=web
   #產品清單目錄
   inventory_loc=/home/wls
   
   -----------------------------分割線---------------------------------------
   wls.resp相應檔案,配置weblogic安裝資訊:(chmod 664 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/wls/
#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>
#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=
   -----------------------------分割線------------------------------------------


6、建立/home/wls資料夾
7、執行安裝shell

java -jar -d64 /home/weblogic/fmw_12.1.3.0.0_wls.jar -silent -invPtrLoc /home/weblogic/oraInst.loc -responseFile /home/weblogic/wls.resp
8、安裝完成後,配置域:
在/home/weblogic/下建立兩個檔案建立create_domains.py,新增內容:

readTemplate('/home/wls/wlserver/common/templates/wls/wls.jar')
cd('Servers/AdminServer')
set('ListenAddress','ip地址')
set('ListenPort', 7001)
cd('/Security/base_domain/User/weblogic')
cmo.setPassword('weblogic123')
setOption('OverwriteDomain', 'true')
setOption('ServerStartMode', 'prod')
writeDomain('/home/wls/user_projects/domains/dai')


closeTemplate()
exit()
9、執行安裝wlsserver/common/bin/下的   ./wlst.sh /home/weblogic/create_domains.py

10、啟動weblogic,配置即可


PS:配置域的另一種方式 ./config.sh /home/weblogic/create_domain.resp

建立檔案/home/weblogic/create_domain.resp,新增內容:

read template from "/home/wls/wlserver/common/templates/wls/wls.jar";
set ServerStartMode "prod";
find Server "AdminServer" as AdminServer;
set AdminServer.ListenAddress "ip地址";
set AdminServer.ListenPort "7001";
set AdminServer.SSL.Enabled "false";
find User "weblogic" as u1;
set u1.password "weblogic123";
write domain to "/home/wls/user_projects/domains/dai";
close template;
    
執行指令碼./config.sh /home/weblogic/create_domain.resp