準備工作:
1.apache-ofbiz-10.04 下載地址:http://ofbiz.apache.org/;
2.JDK安裝,設置$JAVA_HOME爲JDK的地址;
3.安裝Ant;
開始:
1.解壓ofbiz
apache-ofbiz-10.04解壓到一個目錄,例如在/home/nie/ofbiz/下;
2.編譯ofbiz
打開終端,進入到目錄/home/nie/ofbiz/下,
cd /home/nie/ofbiz/apache-ofbiz-10.04/
* 執行ant腳本
./ant run-install
因爲在目錄之下有一個build.xml文件,其編譯過程基本上要調用所有的目錄下的ant文件,整體上達到全部編譯的效果,內容如下:
<target name="build" depends="ofbiz-init"> <echo message="[build] ========== Start Building (Compile) =========="/> <subant inheritall="false"> <filelist dir="." files="framework/build.xml"/> </subant> <subant inheritall="false" failonerror="${applications.present}"> <filelist dir="." files="applications/build.xml"/> </subant> <subant inheritall="false" failonerror="${specialpurpose.present}"> <filelist dir="." files="specialpurpose/build.xml"/> </subant> <subant inheritall="false"> <fileset dir="${basedir}/hot-deploy" casesensitive="no"> <exclude name="disabled/**"/> <include name="*/build.xml"/> </fileset> </subant> <antcall target="clean-svninfo"></antcall> <echo message="[build] ========== Done Building (Compile) =========="/> </target>
3. 使用內置tomcat,內置apache Derby(java database)運行ofbiz:
./startofbiz.sh
4.打開瀏覽器訪問地址:
ofbiz電子商務網址:http://127.0.0.1:8080/ecommerce/
ofbiz webtool:https://127.0.0.1:8443/webtools
5.可以研究了,在線問答平臺萬里長征邁出了第一步~