Run opentaps as a service

为了让 Opentaps 在系统启动后自动启动,我在 /etc/rc.d/rc.local 里添了一行

/path/to/opentaps/startofbiz.sh

在 Opentaps 1.0.4 版之前用这个方法启动 Opentaps 没发现大的问题,但 1.0.4 版运行 startofbiz.sh 的当前目录必须为 opentaps 的目录,不能再用上述办法启用 Opentaps。再说上述办法并不是正统的以 service 运行 Opentaps,所以我又重新寻找一个能让 Opentaps 自启动的办法。其实也很简单:

  1. 适当编辑 rc.ofbiz 的参数 (rc.ofbiz 似乎是在 DOS 下写就的,我用了一次 dos2unix 才让它运行起来)
  2. cp /path/to/opentaps/rc.ofbiz /etc/init.d/ofbiz
  3. chmod 755 /etc/init.d/ofbiz
  4. chkconfig --add ofbiz
  5. chkconfig --level 235 ofbiz on
  6. service ofbiz start

Leave a comment

Your email address will not be published. Required fields are marked *