Start Weblogic Admin Server, Node Manager and Server Manager Agent on Linux
1 Create system service files:
1.1 adminserver system service file
# vi /usr/lib/systemd/system/wls_adminserver.service
----------------------------------------------------
[Unit]
Description=WebLogic Adminserver Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/apps/oracle/middleware/user_projects/domains/E1_HTTP
ExecStart=/apps/oracle/middleware/user_projects/domains/E1_HTTP/bin/startWebLogic.sh
ExecStop=/apps/oracle/middleware/user_projects/domains/E1_HTTP/stopWebLogic.sh
User=oracle
Group=oinstall
[Install]
WantedBy=multi-user.target
1.2 nodemanager system service file
# vi /usr/lib/systemd/system/wls_nodemanager.service
------------------------------------------------------
[Unit]
Description=WebLogic NodeManager Service
After=network.target
[Service]
Type=simple
WorkingDirectory=/apps/oracle/middleware/user_projects/domains/E1_HTTP
ExecStart=/apps/oracle/middleware/user_projects/domains/E1_HTTP/bin/startNodeManager.sh
ExecStop=/apps/oracle/middleware/user_projects/domains/E1_HTTP/bin/stopNodeManager.sh
User=oracle
Group=oinstall
[Install]
WantedBy=multi-user.target
1.3 JDE SM Agent system service file
# vi /usr/lib/systemd/system/wls_smagent.service
------------------------------------------------------
[Unit]
Description=Server Manager Agent Service
After=network.target
[Service]
Type=oneshot
WorkingDirectory=/apps/jde_home_agent/SCFHA
ExecStart=/apps/jde_home_agent/SCFHA/bin/startAgent
ExecStop=/apps/jde_home_agent/SCFHA/bin/stopAgent
RemainAfterExit=yes
User=oracle
Group=oinstall
[Install]
WantedBy=multi-user.target
3) Test the system service :
3.1 start system service
# systemctl start wls_adminserver.service
# systemctl start wls_nodemanager.service
# systemctl start wls_smagent.service
3.2 stop system service
# systemctl stop wls_adminserver.service
# systemctl stop wls_nodemanager.service
# systemctl stop wls_smagent.service
4) Set the service to start automatically at systm reboot :
# systemctl enable wls_adminserver.service
# systemctl enable wls_nodemanager.service
# systemctl enable wls_smagent.service
# systemctl list-unit-files|grep wls
No comments:
Post a Comment