Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Correct update-rc.d example

...

2. Copy the rc.ofbiz script to the /etc/init.d directory, with the name ofbiz, so you end up with: /etc/init.d/ofbiz    .   For instance:

Code Block

cp /opt/ofbiz/rc.ofbiz /etc/init.d/ofbiz

3. Edit the various variables at the top of the script to reflect your environment, for instance where OFBiz is installed, where your JVM is installed, etc. 

4. Give this script the correct permissions.  Here is a typical example.

Code Block
chmod 700 /etc/init.d/ofbiz

...

6a. Edit the comment line in your /etc/init.d/ofbiz, starting with # chkconfig, to reflect specific runlevels at which to start your service, and the order in which to start it.  For instance the following says "start ofbiz in runlevels 2, 3, 4 and 5, at position 21.  At any other runlevels (ie 1 and 6), stop OFBiz in position 19."

Code Block
# chkconfig: 2345 21 19

...

 6a. Execute the following commands as a user with sudo permissions (on a typical Ubuntu installation, this means a member of the admin group).  Do not omit the two dots in the second command, they are important.

Code Block
sudo update-rc.d -f ofbiz remove
 sudo update-rc.d tomcatofbiz start 21 2 3 4 5 . stop 19 0 1 6 .

...

Let's test the fecker!   We need to restart the machine.  Your distro may offer a graphical option for this but the standard unix command, to be executed via root or sudo, is the following.  Run it, wait a wee while, then try to login to your OFBiz from another machine on your LAN!

Code Block
shutdown -r now

...