練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

OLAT 6.2.1->6.2.2升級筆記 RSS feed
Forum Index » OLAT中文社群 OLAT Chinese Users Community
Author Message
andowson

七段學員
[Avatar]

Joined: 2007/1/2
Messages: 714
Location: 台北
Offline
OLAT 6.2.2出來了一陣子,昨天開始嘗試升級,除了壓縮檔解壓縮出來的目錄命名方式跟之前不同外,執行到ant build時還遇到了下面這樣的錯誤
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] java.lang.OutOfMemoryError: Java heap space

後來查了一下OLAT mailing list裡面,有人也遇到了這樣的問題,解法就是加上一個
export ANT_OPTS=-Xmx128m
宣告再執行ant build就可以了,底下直接給整個執行的shell script,有需要的人請自行參考並修改。


# get OLAT source
cd ~/download
wget http://www.olat.org/downloads/stable/OLAT-6.2.2.zip
unzip OLAT-6.2.2.zip
mv olat3 OLAT-6.2.1
mv OLAT-6_2_2-PUBLIC-* olat3
cd olat3

# config build.properties
sed -e "s/\/usr\/local\/opt\/olat\/olat3/\/home\/andowson\/download\/olat3/g" \
-e "s/\/usr\/local\/opt\/olat\/olatdata/\/home\/andowson\/data\/olatdata/g" \
-e "s/\/usr\/local\/opt\/tomcat/\/var\/tomcat6/g" \
-e "1,$$s/www.myolat.com/www.andowson.com/g" \
-e "1,$$s/myolat.com/andowson.com/g" \
-e "1,$$s/myolat/andowson/g" \
-e "s/server.modjk.enabled=false/server.modjk.enabled=true/g" \
-e "55a\server.modjk.jvmRoute=worker1" \
-e "s/defaultcharset=ISO-8859-1/defaultcharset=UTF-8/g" \
-e "s/registration.enableNotificationEmail=false/registration.enableNotificationEmail=true/g" \
-e "s/smtp.host=smtp.andowson.com/smtp.host=smtp.other.com/g" \
-e "s/smtp.user=/smtp.user=username/g" \
-e "s/smtp.pwd=/smtp.pwd=password/g" \
-e "121,143d" \
-e "1,$$s/#db/db/g" \
-e "1,$$s/net.sf.hibernate/org.hibernate/g" \
-e "s/instantMessaging.server.name=jabber.andowson.com/instantMessaging.server.name=www.andowson.com/g" \
-e "s/instantMessaging.db.name=wildfire/instantMessaging.db.name=openfire/g" \
-e "s/instantMessaging.db.user=wildfire/instantMessaging.db.user=openfire/g" \
-e "s/instantMessaging.db.pass=wildfire/instantMessaging.db.pass=openfire/g" \
-e "s/cluster.catalinaport=8006/cluster.catalinaport=8105/" \
-e "s/cluster.ajpport=8009/cluster.ajpport=8109/" build.properties.default > build.properties

# adjust the original template config files
# enable zh_CN and zh_TW on the top right menu
sed -i -e "s/<enabledLanguages>en,de,fr,it,es<\/enabledLanguages>/<enabledLanguages>en,de,fr,it,es,zh_CN,zh_TW<\/enabledLanguages>/g" ~/download/olat3/webapp/WEB-INF/olat_config.xml.in
# change domain name in email address
sed -i -e "1,$$s/olat-newinstallation.org/andowson.com/g" ~/download/olat3/webapp/WEB-INF/olat_config.xml.in
# fix the commnet style in XML
sed -i -e "13c\ <\!-- default session timeout -->" ~/download/olat3/webapp/WEB-INF/web.xml.in

# remove findbugs setting
sed -i -e "1348,1361d" build.xml
ant config-all
# to avoid OutOfMemoryError
export ANT_OPTS=-Xmx128m
ant build

# stop Tomcat
sudo /etc/init.d/tomcat stop

# backup db
sudo -u postgres pg_dump olat > /tmp/olat.bak

# copy to the target directory
sudo mv ~/www/olat /tmp/olat-6.2.1
cp -rf ~/download/olat3/webapp ~/www/olat
cp -rf ~/download/olat3/htdocs/* ~/www/olat
sudo chmod 775 ~/www/olat/static
sudo chmod 775 ~/www/olat/WEB-INF
sudo chmod 775 -R ~/data/olatdata

# start Tomcat
sudo /etc/init.d/tomcat start

分享經驗 累積智慧
[WWW]
 
Forum Index » OLAT中文社群 OLAT Chinese Users Community
Go to:   
Mobile view