WebLogic cluster architecture
Weblogic role
AdminServer:
172.16.65.130
NodeServer:
?172.16.65.131, 172.16.65.132
Version
weblogic 12.2.1.3.0
centos 7.3
Common installation steps
-- Create account and directory -- /usr/sbin/groupadd -g 666 wladmin /usr/sbin/useradd -u 666 -g wladmin -G wladmin wladmin /usr/bin/echo -e "P@ssw0rd\ P@ssw0rd" | (/usr/bin/passwd --stdin wladmin) /usr/bin/mkdir -p /WebLogic/oracle/inventory /usr/bin/chown -R wladmin:wladmin /WebLogic /usr/bin/chmod -R 775 /WebLogic /usr/bin/su - wladmin -c "/usr/bin/mkdir -p /WebLogic/oracle/middleware" -- Create oraInst.loc configuration file -- /usr/bin/touch /etc/oraInst.loc /usr/bin/echo "inventory_loc=/WebLogic/oracle/inventory" > /etc/oraInst.loc /usr/bin/echo "inst_group=wladmin" >> /etc/oraInst.loc /usr/bin/chown wladmin:wladmin /etc/oraInst.loc /usr/bin/chmod 775 /etc/oraInst.loc -- Create Install.rsp configuration file -- /usr/bin/cat > /WebLogic/oracle/Install.rsp << EOF [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=/WebLogic/oracle/middleware #Set this variable value to the Installation Type selected. e.g. Fusion Middleware Infrastructure, Fusion Middleware Infrastructure 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= EOF /usr/bin/chown wladmin:wladmin /WebLogic/oracle/Install.rsp -- start installation -- export WL_HOME=/WebLogic/oracle/middleware/wlserver /usr/bin/cp /root/fmw_12.2.1.3.0_wls.jar /home/wladmin/ /usr/bin/chown wladmin:wladmin /home/wladmin/fmw_12.2.1.3.0_wls.jar /usr/bin/su - wladmin -c "java -jar /home/wladmin/fmw_12.2.1.3.0_wls.jar -silent -invPtrLoc /etc/oraInst.loc -responseFile /WebLogic/oracle/Install.rsp" /usr/bin/ls -ltr /WebLogic/oracle/middleware -- Turn off the firewall -- service firewalld stop systemctl disable firewalld
AdminServer configuration section
-- Create Adminserver -- /usr/bin/su - wladmin -c "/WebLogic/oracle/middleware/oracle_common/common/bin/wlst.sh" << EOF readTemplate('/WebLogic/oracle/middleware/wlserver/common/templates/wls/wls.jar') cd('Servers/AdminServer') cmo.setListenAddress("172.16.65.130") set('ListenPort', 7001) cd('/') cd('Security/base_domain/User/weblogic') cmo.setPassword('weblogic123') setOption('ServerStartMode','prod') setOption('OverwriteDomain', 'true') writeDomain('/WebLogic/oracle/middleware/user_projects/domains/base_domain') closeTemplate() exit() EOF -- Create Node node: MS-01 MS-02 -- /usr/bin/touch /tmp/answers.txt /usr/bin/cat >> /tmp/answers.txt << EOF readDomain('/WebLogic/oracle/middleware/user_projects/domains/base_domain') cd('/') create('MS-01', 'Server') cd('Servers') cd('MS-01') set('ListenPort', 7004) set('ListenAddress', '172.16.65.131') cd('/') create('MS-02', 'Server') cd('Servers') cd('MS-02') set('ListenPort', 7004) set('ListenAddress', '172.16.65.132') cd('/') create('basecluster', 'Cluster') assign('Server', 'MS-01','Cluster','basecluster') assign('Server', 'MS-02','Cluster','basecluster') cd('Cluster/basecluster') set('ClusterMessagingMode', 'unicast') set('WeblogicPluginEnabled', 'true') cd('/') create('Machine01', 'Machine') assign('Server', 'MS-01','Machine','Machine01') cd('Machines/' + 'Machine01/') create('Machine01', 'NodeManager') cd('NodeManager/' + 'Machine01') set('NMType', 'Plain') set('ListenAddress', '172.16.65.130') set('DebugEnabled', 'false') cd('/') create('Machine02', 'Machine') assign('Server', 'MS-02','Machine','Machine02') cd('Machines/' + 'Machine02/') create('Machine02', 'NodeManager') cd('NodeManager/' + 'Machine02') set('NMType', 'Plain') set('ListenAddress', '172.16.65.131') set('DebugEnabled', 'false') updateDomain() closeDomain() disconnect() exit() EOF /usr/bin/su - wladmin -c "/WebLogic/oracle/middleware/oracle_common/common/bin/wlst.sh < /tmp/answers.txt" -- Security configuration -- export DOMAIN_HOME=/WebLogic/oracle/middleware/user_projects/domains/base_domain export WL_HOME=/WebLogic/oracle/middleware/wlserver /usr/bin/su - wladmin -c "/usr/bin/sed -i -e 's/SecureListener=true/SecureListener=false/g' /WebLogic/oracle/middleware/user_projects/domains/base_domain/nodemanager/nodemanager .properties" /usr/bin/su - wladmin -c "/usr/bin/mkdir -p /WebLogic/oracle/middleware/user_projects/domains/base_domain/servers/AdminServer/security" /usr/bin/su - wladmin -c "/usr/bin/cat > /WebLogic/oracle/middleware/user_projects/domains/base_domain/servers/AdminServer/security/boot.properties" << EOF username=weblogic password=weblogic123 EOF
-- pack node configuration -- /usr/bin/su - wladmin -c "/WebLogic/oracle/middleware/oracle_common/common/bin/pack.sh -managed=true -domain=/WebLogic/oracle/middleware/user_projects/domains/base_domain -template=/ WebLogic/oracle/middleware/user_projects/domains/base_domain-wlsTemplate.jar -template_name=base_domain" -- Copy the configuration to the node node -- /usr/bin/su - wladmin -c "sshpass -p 'P@ssw0rd' scp -o StrictHostKeyChecking=no /WebLogic/oracle/middleware/user_projects/domains/base_domain-wlsTemplate.jar [email protected]:/WebLogic/ " ------ Start Server ------ /usr/bin/su - wladmin -c "nohup /WebLogic/oracle/middleware/user_projects/domains/base_domain/bin/startNodeManager.sh & amp;" /usr/bin/su - wladmin -c "nohup /WebLogic/oracle/middleware/user_projects/domains/base_domain/bin/startWebLogic.sh & amp;"
----- Node Server configuration section ----- /usr/bin/su - wladmin -c "/usr/bin/mkdir -p /WebLogic/oracle/middleware/user_projects/domains/base_domain" /usr/bin/su - wladmin -c "/WebLogic/oracle/middleware/oracle_common/common/bin/unpack.sh -domain=/WebLogic/oracle/middleware/user_projects/domains/base_domain -template=/WebLogic/base_domain- wlsTemplate.jar" /usr/bin/su - wladmin -c "nohup /WebLogic/oracle/middleware/user_projects/domains/base_domain/bin/startNodeManager.sh & amp;"
Effect verification
Login to WebLogic
Manually start two Nodes
Cluster started successfully
Reference links:
https://www.sajaldebnath.com/oracle-weblogic-service-vrealize-automation/