ofbiz在linux下安装以及服务化与开机自启动



ofbiz在linux下安装以及服务化与开机自启动

注:在外网无法访问有两个原因:

1.防火墙端口:8080

2.数据库是否配置成可外网访问:及data/pg_hba.conf里面的iP4下,要开放ip-》host all al 192.168.0.1/24   md5

一、

1.安装jdk

2.安装数据库

3.安装ant

yum install ant

4.编译启动ofbiz


  cd /ofbiz目录下

  ant run-install

  ./startofbiz.sh

5.访问http://localhost:8080/ecommerce

二、将ofbiz启动脚本服务化

vim ofbiz.sh

#!/bin/bash
#chkconfig: 345 97 79
cd /opt/ofbiz_svn
touch  /home/ru/ofbiz/ofbiz$(date +%Y%m%d)
./startofbiz.sh > /home/ru/ofbiz/ofbiz$(date +%Y%m%d) 2>&1 &
三、ofbiz开机自启动

cp ofbiz.sh /etc/rc.d/init.d/ofbizstart

chkconfig –add ofbizstart

ok了。