We've Weblogic in our Linux server.I can start Admin server manually by using an script "startWebLogic.sh". But now I have been asked to start admin server while system boots. So I need to write an script for that and put it in /etc/init.d/rc3.d. I have no idea whatsoever how should I do it.
a) copy your script to /etc/init.d/ b) create a symbolic link like this:
The S means it is a start-script. The number (95) is responsible to define the execution-order. Smaller numbers indicate: execute first.
You should be sure that services, startWebLogic depends on, are executed first (like mounted filesystems, established network-connections). System-variables like 'JAVA_HOME' used in the script might not be defined. Then replace them with absolut values.
I don't think I'd recommend simply aliasing to WebLogic's startup script as an initscript. Technically, that's all right, but I don't think WebLogic.sh is written to function well in that role.
An industrial-grade initscript has certain properties. It usually has a case statement at its heart where the start, stop, restart, and status (more or less) command functions are defined. It may look outside itself for environmental info (/etc/sysconfig for redhat, /etc/default for Debian and Solaris), so that site-local config options don't touch executable code (and so that multiple instances of the server are possible). Also, there are certain "magic comments" that programs such as RedHat's chkconfig utility can use to construct the S/K runlevel aliases.
I recommend looking at some of the existing /etc/init.d scripts for ideas and creating a script that invokes the weblogic startup script in a similar way. Although first, I'd check around for some existing WebLogic initscript implementations. WebLogic's been running on Linux and Solaris for years, so there's almost certainly something out there.
An IDE is no substitute for an Intelligent Developer.
posted 13 years ago
Thank all of you. Although I try to find some existing weblogic script in many places, But I failed, I've beeter idea and that is, I send you here the startup weblogic script. please have a look and if you guys have some idea that how can i change the script let me know. Here is a code: