I am the most accustomed setting service automatic start-up method is the script in rc.local: # sshd / usr / local / sbin / sshd # proFTPD / USR / local / sbin / proFTPD # apache / home / apache / bin / Apachectl Start # mysql / home / mysql / bin / safe_mysqld --port = 3306 & # start oracle8i listener firstsu - oracle -c 'lsnrctl start' # start oracle8isu - Oracle -c 'dbstart'
However, when configuring RESIN's automatic startup, it has encountered a lot of trouble, mainly the environment variable such as Java_home is not read during the system initialization. Through some information http://www.caucho.com/support/resin-interest/0112/0151.html learned that the following steps are required to configure RESIN to configure a configurable service:
After setting the Java_Home environment variable, unpack the resin into / home / resin, perform compilation script% TAR zxf resin-version.tar.gz # mv resin-version / Home / Resin% CD /Home/resin/%./configure % make # made install $ RESIN_HOME / CONTRIB / INITALL generated by Make Install to /etc/rc.d/init.d/resin and chmod x resincp contrib / init.resin /etc/rc.d/init .d / resinchmod x /etc/rc.d/init.d/RESIN Modified some settings in RESIN: Java_Home Resin_Home User, etc., set the RESIN service in different start-ups: # / sbin / chkconfig resin RESET
I have learned a lot of knowledge about the use of Chkconfig management services. Actually, /etc/init.d/resin This script can be configured with Chkconfig to be configured with the following annotations:
# chkConfig: 345 85 # Description: Resin is a java web server.
This comment indicates that the RESIN service is automatically started under run (/etc/rc.d/, RC3.D RC4.D RC5.D is linked to INIT.D / RESIN), the priority of the startup is 85, stop The priority is 15. This will automatically automatically in the corresponding RC # .D / generation S ## RESIN and K ## Resin. The files under the RC.D / lower under GNU / Linux are very chaotic, not as simple as freebsd. With chkconfig or let me simplify the following file management. After using / sbin / chkconfig resin on the SYSTEM Services settings in the GNU / Linux's Setup interface, the RESIN service can also be set up in the System Services settings of the GNU / Linux setup interface.
If you need ROOT permissions if you let RESINs need to use root permissions, and you can't use httpd.sh with the server, you need an executable file to be implemented, this can be implemented in ./configure; make; make INSTALL, this The executable will be generated in $ resin_home / bin / down, and the resin file is actually a steering that performs Wrapper.pl.
RESIN started on the slow machine: RESIN is a Java application, which requires a lot of CPU resources during the startup process. So in some slow machines or in accordance with the above configuration, it will not be strange, in stderr.log, "can't connect to Parent", this problem can be added after the service is started 15 seconds of delay resolution: at /etc/init.d/resin: 43 lines: if Test -n "$ user"; thensu - $ user -c "$ exe -pid $ PID Start $ args" Else $ EXE -PID $ PID Start $ argsfi # After the service starts, plus a 15 second delay to resolve the Sleep 15 problem resolution process and ideas:
Check the log: stderr.log, there is a Can't connect to Parent, then check "Resin2 Can't Connect to Parent" and "Resin Can't Connect To Parent" in Google, there are approximately several mailing lists. Archive, in a mailing list archive, technical support is to adjust the service waiting time to solve similar problems (need to change Source), and another person says that his P4 server is started to start a lot of CPU services, which will also cause resin. Can't start, then I tried it on my own machine. When I was started to the machine before RESIN, I found that RESIN and Perl scripts were running when I started, but I have exited it for a while, after starting the system It is relatively stable, then starting RESIN, RESIN service is good, indicating that the script itself has no problem, according to my previous experience, Java application is a type of CPU resource, in order to make RESIN has enough CPU resources, After starting, I added a delay of 15 seconds to prevent subsequent services from affecting RESIN. The problem is solved, and it is also successful in other machines.
Of course, it is best to solve this problem, you don't have to learn these tips. So I will submit my own solution in all bug reports in similar, requiring a global variable in the init.resin script, allowing the user to set the waiting time at startup. And add this solution to the document, let everyone actively support the open source software with their own actions.
Using the RESIN built-in log trunsel, HTTP compression, cache, and simple HTTP certification
As an application server, many features do not have to be developed by themselves: It is recommended to put these and application servers in resin.conf, and the standard configuration of the web application-independent web application is placed in Web-INF / Web.xml .
More topic: http://www.caucho.com/resin/ref/topics.xtp
Reference:
RESIN installation: http://www.caucho.com/download/install.pdf
CHKCONFIG management in red hat http://www.cioWorld.net/linux/069.htm
Original source: http://www.chedong.com/tech/resin.html