JBoss is a Redhat System Service-general Linux technology-Linux programming and kernel information. The following is a detailed description. How can JBoss be started when the Linux system is started?
Overall views
Use the V script of Linux. Although there are some differences between categories, it is usually similar to this:
/Etc/rc. d/init. d/-contains the start and stop scripts (other types:/etc/init. d /)
/Etc/rc. (x)/-contains the link for starting and stopping the script with the S or K prefix (start or kill)
Users of different levels have different operation levels.
Rc1.d? Single User Mode
Rc2.d? Enable single-user network mode
Rc3.d? Multi-User Mode-start in text mode
Rc4.d? Undefined
Rc5.d? Multi-user mode? Start with X Window
Rc6.d? Close
Now we start to work:
Create a jboss user and install jboss.
Create a script named/etc/rc. d/init. d/jboss
Create a link named/etc/rc3.d/S84jboss
Optional methods:/etc/rc5.d/S84jboss and/etc/rc4.d/S84jboss
Create a link named/etc/rc6.d/K15jboss
Create a K15 link on/etc/rc1.d,/etc/rc2.d,/etc/rc0.d
Note that the $ JBOSS_HOME directory can be read and written by "jboss" users. If you have any questions, click to view the UNIX File System license recommended by the JBoss application server.
Create script jboss:
JBoss 4.0.1 +, with prebaked init script, jboss_init_redhat.sh and jboss_init_suse.sh in the bin directory. you can copy one of these scripts to/etc/rc. d/init. d/jboss. Because I use redhat, copy jboss_init_redhat.sh and modify it to executable.
[Root @ vm2 ~] # Cp $ JBOSS_HOME/bin/jboss_init_redhat.sh/etc/rc. d/init. d/jboss
[Root @ vm2 ~] # Chmod 755/etc/rc. d/init. d/jboss
$ JBOSS_HOME cannot be written in this way during your operations. It represents the directory installed on your jboss, and you need to replace it.
Edit it in the vi Editor: