<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest posts for the topic "OLAT安裝筆記"]]></title>
		<link>https://forum.andowson.com/posts/list/14.page</link>
		<description><![CDATA[Latest messages posted in the topic "OLAT安裝筆記"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>OLAT安裝筆記</title>
				<description><![CDATA[ [url=http://www.olat.org]OLAT[/url] - Online Learning And Trainging是一套100% Java開發的免費web-based Open Source Learning Management System (LMS)。具備SCORM 1.2 compliance，對要求遵循國際標準的人來說應該是一個滿有吸引力的產品。目前支援的資料庫有[url=http://www.mysql.org/]MySQL[/url]和[url=http://www.postgresql.org/]PostgreSQL[/url]及[url=http://hsqldb.sourceforge.net/]HSQL[/url]，由於我的網站上目前已經裝有PostgreSQL，故我便選擇用PostgreSQL作為後端的資料庫。
<br>
<br>
由於我打算安裝到Production環境，故我參考了OLAT網站上的[url=http://www.olat.org/docu/install/index.html]安裝手冊[/url]，我的步驟大致如下
<br>
<br>
# Install the prerequisites
<br>
==&gt;[url=http://java.sun.com]JDK[/url], [url=http://httpd.apache.org]Apache[/url],[url=http://tomcat.apache.org]Tomcat[/url], [url=http://ant.apache.org]Ant[/url], database(PostgreSQL)
<br>
大部分用Apache+Tomcat架站的人，應該都已經完成透過[url=http://tomcat.apache.org/connectors-doc/]mod_jk[/url]整合了。可能有些人會需要安裝Ant。
<br>
[code]vi ~/.bash_profile[/code]
<br>
[code]
<br>
ANT_HOME=/usr/local/apache-ant-1.7.0
<br>
JAVA_HOME=/usr/java/latest
<br>
PATH=$PATH:$HOME/bin:$ANT_HOME/bin:$JAVA_HOME/bin
<br>
<br>
export PATH ANT_HOME JAVA_HOME
<br>
[/code]
<br>
[code]
<br>
su - root
<br>
cd setup
<br>
wget http://apache.ntu.edu.tw/ant/binaries/apache-ant-1.7.0-bin.tar.gz
<br>
tar zxvf apache-ant-1.7.0-bin.tar.gz -C /usr/local
<br>
[/code]
<br>
# modify JVM parameter
<br>
[code]sed -i -e "2c\JAVA_OPTS=\"-server -XX:NewSize=64m -XX:MaxNewSize=64m -XX:SurvivorRatio=8 -XX:MaxPermSize=128m -Xss256k -Xms192m -Xmx192m -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true\"" /var/tomcat5/bin/setenv.sh[/code] 
<br>
 :?:由於我的電腦記憶體只有384M，故我將Heap size設為一半，192M。
<br>
<br>
# create database olat and user olat
<br>
[code=sql]su - postgres
<br>
psql -c "CREATE GROUP olat;" template1
<br>
psql -c "CREATE USER olat WITH ENCRYPTED PASSWORD 'olat' VALID UNTIL 'infinity' CREATEDB;" template1
<br>
psql -c "ALTER GROUP olat ADD USER olat;" template1
<br>
psql -c "CREATE DATABASE olat WITH ENCODING 'UNICODE';" -U olat template1
<br>
psql -c "CREATE DATABASE testdb WITH ENCODING 'UNICODE';" -U olat template1
<br>
psql -c "ALTER USER olat NOCREATEDB;" template1
<br>
exit
<br>
exit
<br>
[/code]
<br>
<br>
# Getting the sources
<br>
==&gt;use browser to download http://www.olat.org/downloads/stable/OLAT-5.1.3.zip
<br>
==&gt;put OLAT-5.1.3.zip in /home/andowson/download
<br>
[code]cd /home/andowson/download
<br>
unzip OLAT-5.1.3.zip
<br>
mv OLAT-5.1.3-PUBLIC-20070507 olat3
<br>
cd olat3[/code]
<br>
#這裡將目錄名字換為olat3以配合安裝手冊
<br>
<br>
# OLAT configuration
<br>
[code]sed -e "s/\/usr\/local\/opt\/olat\/olat3/\/home\/andowson\/download\/olat3/g" \
<br>
-e "s/\/usr\/local\/opt\/olat\/olatdata/\/home\/andowson\/www\/olatdata/g" \
<br>
-e "1,$$s/myolat/andowson/g" \
<br>
-e "s/\/usr\/local\/opt\/tomcat5/\/var\/tomcat5/g" \
<br>
-e "44c\server.modjk.enabled=true" \
<br>
-e "75,97d" \
<br>
-e "1,$$s/#db/db/g" build.properties.default &gt; build.properties[/code]
<br>
執行上面的指令就可以產生底下的結果了
<br>
[quote]
<br>
################################################################
<br>
#
<br>
# Adapt these properties to your local installation.
<br>
#
<br>
<br>
#####
<br>
# Directory configurations
<br>
#####
<br>
# Absolute path for base.dir. Windows users: Use forward slashes also for windows paths!
<br>
base.dir=[color=red]/home/andowson/download/olat3[/color]
<br>
# Absolute path for userdata.dir
<br>
userdata.dir=[color=red]/home/andowson/www/olatdata[/color]
<br>
<br>
# Give this instance a unique id which serves as a
<br>
# namespace for addressable items within olat.
<br>
# Use a maximum of 10 characters.
<br>
instance.id=[color=red]andowson[/color]
<br>
<br>
#####
<br>
# Tomcat installation path (e.g. CATALINA_HOME)
<br>
#####
<br>
tomcat.home[color=red]=/var/tomcat5[/color]
<br>
<br>
#####
<br>
# Server and ports configuration
<br>
#####
<br>
# Use the fully qualified domainname that is configured for this server
<br>
server.domainname=www.[color=red]andowson[/color].com
<br>
# On a test system you usally use port 8080, on a productive system you
<br>
# would use port 80
<br>
server.port=80
<br>
<br>
# User a value of '0' if you do not want to enable SSL.
<br>
# If SSL is enabled, don't forget to uncomment the SSL section in the sample
<br>
# configuration file
<br>
# Eg. 8443, 443 (must not be empty, even if standard port 443 is used). Use 0 to disable SSL
<br>
server.port.ssl=0
<br>
<br>
# Tomcat context path: url under which olat is mounted
<br>
server.contextpath=/olat
<br>
<br>
# Set to 'true' when you want to use apache and mod_jk to conect the 
<br>
# apache webserver with the tomcat servlet engine
<br>
server.modjk.enabled=[color=red]true[/color]
<br>
<br>
#####
<br>
# Misc OLAT configurations
<br>
#####
<br>
# Systems default language
<br>
defaultlang=en
<br>
# Systems default charset (used while writing bytes to filesystem)
<br>
# e.g.: US-ASCII, ISO-8859-1, UTF-8 
<br>
defaultcharset=ISO-8859-1
<br>
<br>
# Allow self registration
<br>
registration.enableSelfRegistration=true
<br>
# Send a notification mail when new users register
<br>
registration.enableNotificationEmail=false
<br>
registration.notificationEmail=newregistration@[color=red]andowson[/color].com
<br>
<br>
#####
<br>
# Email settings
<br>
#####
<br>
adminemail=webmaster@[color=red]andowson[/color].com
<br>
supportemail=support@[color=red]andowson[/color].com
<br>
smtp.host=smtp.[color=red]andowson[/color].com
<br>
<br>
# Folder component default values: upload size and quota in MB.
<br>
folder.maxulmb=50
<br>
folder.quotamb=50
<br>
<br>
#####
<br>
# Database configuration
<br>
#####
<br>
## example for PostgreSQL
<br>
db.dbms=hibernate.postgresql
<br>
db.host.name=localhost
<br>
db.host.port=5432
<br>
db.name=olat
<br>
db.user=olat
<br>
db.pass=olat
<br>
db.jdbc.jar=${base.dir}/webapp/WEB-INF/lib/postgresql-8.0-312.jdbc3.jar
<br>
db.jdbc.driver=org.postgresql.Driver
<br>
db.host=${db.host.name}:${db.host.port}
<br>
db.hibernate.dialect=net.sf.hibernate.dialect.PostgreSQLDialect
<br>
db.jdbc.url=jdbc:postgresql://${db.host}/${db.name}
<br>
db.showresults=false
<br>
## Next property is used by ant task "checkdb"
<br>
db.sqlquery=select 1
<br>
<br>
## optional configuration for a testdb for developers only using the junit tests with postgresql
<br>
db.test.name=testdb
<br>
db.test.user=olat
<br>
db.test.pass=olat
<br>
## do not encode &amp; - this url gets written to a properties file
<br>
db.test.jdbc.url=jdbc:postgresql://${db.host}/${db.test.name}
<br>
<br>
#####
<br>
# Instant Messaging properties (optional)
<br>
#####
<br>
# If Instant Messaging is enabled but no instant messaging server is running
<br>
# the servlet container is not able to start up.
<br>
# You need Wildfire &gt; 3.1.x from www.jivesoftware.org
<br>
instantMessaging.enable=false
<br>
instantMessaging.server.name=jabber.[color=red]andowson[/color].com
<br>
instantMessaging.generateTestUsers=false
<br>
instantMessaging.admin.username=admin
<br>
instantMessaging.admin.password=admin
<br>
instantMessaging.db.name=wildfire
<br>
instantMessaging.db.user=wildfire
<br>
instantMessaging.db.pass=wildfire
<br>
<br>
#####
<br>
# Shibboleth configuration parameters (optional)
<br>
#####
<br>
shibboleth.enable=false
<br>
shibboleth.providerId=YOUR_PROVIDERID
<br>
# Shibboleth WAYS sites configuration. May by a path relative to /webapp, an absolute path or an URI
<br>
shibboleth.sites.config=/WEB-INF/metadata.xml
<br>
# Shibboleth AAP configuration. May by a path relative to /webapp, an absolute path or an URI
<br>
# Leave empty if you do not havy any Attribute Acceptance Policy
<br>
shibboleth.aap.config=/WEB-INF/AAP.xml
<br>
# Shibboleth sites watchdog reload configuration. Set any time period in minutes.
<br>
shibboleth.sites.reloadmin=60
<br>
# Defines the name of the Shibboleth Attribute which uniquely identifies an authorized user.
<br>
shibboleth.defaultUID=defaultUID
<br>
<br>
shibboleth.keystore=${tomcat.home}/conf/keystore.p12
<br>
shibboleth.keystore.type=PKCS12
<br>
shibboleth.keystore.pass=changeit
<br>
shibboleth.key.pass=changeit
<br>
shibboleth.truststore=${tomcat.home}/conf/truststore.jks
<br>
shibboleth.truststore.type=JKS
<br>
shibboleth.truststore.pass=changeit
<br>
<br>
# enable (true or yes) sending the locale code in the AAI request with name in language.param specified.
<br>
language.enable=false
<br>
language.param=YOUR_PARAM_NAME
<br>
<br>
# Default authentication provider (login screen)
<br>
# OLAT (local logins) or Shib (when using Shibboleth)
<br>
default.auth.provider=OLAT
<br>
<br>
#
<br>
# Normally no need to change properties below this point
<br>
#
<br>
################################################################
<br>
<br>
# Debugging and test user generation
<br>
olat.debug=false
<br>
user.generateTestUsers=true
<br>
<br>
# Use caching for localization files. Use false only in a development
<br>
# environment since this leads to heavy file load operations!
<br>
localization.cache=true
<br>
<br>
# Database debugging
<br>
db.show_sql=false
<br>
<br>
#####
<br>
# Velocity engine properties. Use false only during development!
<br>
#####
<br>
velocity.cache.pages=true
<br>
velocity.input.encoding=UTF-8
<br>
velocity.output.encoding=UTF-8
<br>
<br>
#####
<br>
# MRTG configuration for monitoring (optional)
<br>
#####
<br>
mrtg.bin=/usr/bin/mrtg
<br>
monitoring.dir=${base.dir}/monitoring
<br>
mrtgbackup.dir=${log.dir}/mrtgbackup
<br>
mrtg.loginname=olat
<br>
mrtg.pwd=mypassword
<br>
<br>
#####
<br>
# Misc parameters
<br>
#####
<br>
forum.maxbodylength=4000
<br>
webxml.webdav.inbuffer=32768
<br>
webxml.webdav.outbuffer=32768
<br>
<br>
#####
<br>
# Directory definitions
<br>
#####
<br>
log.dir=${userdata.dir}/logs
<br>
folder.root=${userdata.dir}/bcroot
<br>
temp.dir=${base.dir}/temp
<br>
dist.dir=${base.dir}/dist
<br>
bin.dir=${base.dir}/bin
<br>
webapp.dir=${base.dir}/webapp
<br>
doc.dir=${webapp.dir}/static/doc
<br>
doc.api.dir=${doc.dir}/api
<br>
doc.api.windowtitle=OLAT API Documentation
<br>
source.dir=${webapp.dir}/WEB-INF/src
<br>
source.patches.dir=${webapp.dir}/WEB-INF/patchesSrc
<br>
tomcat.docbase=${webapp.dir}
<br>
<br>
#####
<br>
# Build properties
<br>
#####
<br>
build.version=5.1.3
<br>
build.buildnr.pattern=0000
<br>
build.buildnr.default=0001
<br>
build.info=build.info.txt
<br>
build.compiler=javac1.5
<br>
build.host=olat.unizh.ch
<br>
build.version.javafile=webapp/WEB-INF/src/org/olat/VersionImpl.java
<br>
build.dir=${webapp.dir}/WEB-INF/classes
<br>
failonerror.compile=true
<br>
failonerror.javadoc=false
<br>
failonerror.junit=false
<br>
failonerror.dbsetup=true
<br>
javadoc.header=&lt;image src=\"http://www.olat.org/public/docroot/olatorg/images/logo.jpg\" width=\"90\" height=\"60\"/&gt;
<br>
javadoc.footer=&lt;center&gt;&lt;b&gt;1999-2006 (c) www.olat.org&lt;/b&gt;&lt;/center&gt;
<br>
<br>
#####
<br>
# Properties files
<br>
#####
<br>
log.properties.file=log4j.properties
<br>
olatconfig.file=${base.dir}/webapp/WEB-INF/olat_config.xml
<br>
tomcat.server.xml.file=${base.dir}/conf/server.xml
<br>
tomcat.context.xml.file=${base.dir}/conf/context.xml
<br>
tomcat.web.xml.file=${webapp.dir}/WEB-INF/web.xml
<br>
<br>
#####
<br>
# JUnit properties
<br>
#####
<br>
junit.results.dir=${doc.dir}/test-results
<br>
junit.aggregation.dir=${doc.dir}/test-results
<br>
junit.doc.dir=${doc.dir}/test-results/html
<br>
<br>
#####
<br>
# Mail logger properties
<br>
#####
<br>
MailLogger.mailhost=smtp.unizh.ch
<br>
MailLogger.from=Ameisli (the ant) &lt;developers@olat.unizh.ch&gt;
<br>
MailLogger.failure.notify=true
<br>
MailLogger.success.notify=true
<br>
MailLogger.failure.to=developers@olat.unizh.ch
<br>
MailLogger.success.to=developers@olat.unizh.ch
<br>
MailLogger.failure.subject=Build Failure
<br>
MailLogger.success.subject=Build Success
<br>
<br>
#####
<br>
# Nightly build properties
<br>
#####
<br>
nightly.from=Ameisli (the ant) &lt;developers@olat.unizh.ch&gt;
<br>
nightly.tolist=developers@olat.unizh.ch
<br>
nightly.subject=Results of nightly build
<br>
nightly.mailhost=smtp.unizh.ch
<br>
<br>
#####
<br>
# CVS properties used by nightly build
<br>
#####
<br>
# Important: You must be in a directory with the same name as
<br>
# cvs.package to call the checkout target.
<br>
cvs.repository=:ext:nightly@cvs.olat.org:/usr/local/cvs
<br>
cvs.cvsrsh=ssh
<br>
cvs.package=olat3
<br>
cvs.target=${base.dir}/..
<br>
<br>
#####
<br>
# SVN properties used by nightly build
<br>
#####
<br>
svn.url=svn+ssh://nightly@cvs.olat.org/usr/local/server/subversion/repos/olat/trunk
<br>
svn.sandbox=${base.dir}/..
<br>
svn.dest.path=${svn.sandbox}/olat4
<br>
<br>
#####
<br>
# Fulltext Search properties
<br>
#####
<br>
generate.index.at.startup=true
<br>
restart.window.start=0
<br>
restart.window.end=24
<br>
[/quote]
<br>
紅色的字就是我修改的地方，另外一個值得注意的就是我刪掉了MySQL設定的區塊（原來的75-97行）
<br>
接著執行
<br>
[code]ant config-all
<br>
<br>
su - root
<br>
cp /home/andowson/download/olat3/webapp/WEB-INF/lib/xercesImpl.jar /var/tomcat5/common/endorsed
<br>
cp /home/andowson/download/olat3/webapp/WEB-INF/lib/xml.apis.jar /var/tomcat5/common/endorsed
<br>
cp /home/andowson/download/olat3/webapp/WEB-INF/lib/xalan.jar /var/tomcat5/common/endorsed
<br>
exit
<br>
<br>
ant build
<br>
<br>
ant dbsetup_postgreSQL
<br>
<br>
cp -rf /home/andowson/download/olat3/webapp /home/andowson/www/olat
<br>
cp -rf /home/andowson/download/olat3/htdocs/* /home/andowson/www/olat
<br>
cd /home/andowson/www/olat/WEB-INF
<br>
<br>
sed -i -e "13c\ &lt;\!-- default session timeout --&gt;" web.xml
<br>
rm -rf /home/andowson/www/olat/WEB-INF/src
<br>
rm -rf /home/andowson/www/olat/WEB-INF/patchesSrc
<br>
chown -R andowson:tomcat /home/andowson/www/olat
<br>
chown -R andowson:tomcat /home/andowson/www/olatdata
<br>
chmod 775 /home/andowson/www/olat/static
<br>
[/code]
<br>
<br>
在/home/andowson/www/olat/WEB-INF/classes下新增一個hibernate.properties檔案
<br>
[code]
<br>
hibernate.connection.driver_class = org.postgresql.Driver
<br>
hibernate.connection.url = jdbc:postgresql://localhost/olat
<br>
hibernate.connection.username = olat
<br>
hibernate.connection.password = olat
<br>
hibernate.dialect = org.hibernate.dialect.PostgreSQLDialect
<br>
[/code]
<br>
<br>
由於/etc/httpd/conf/workers.properties應該在Apache+Tomcat整合時已做過，故不去動它。
<br>
我們只需要再新增一個JkMount讓Apache把/olat導給Tomcat處理：
<br>
[code]vi /etc/httpd/conf.d/mod_jk.conf[/code]
<br>
[code]JkRequestLogFormat "%w %V %T %r"
<br>
JkMount /olat/* loadbalancer[/code]
<br>
<br>
重新啟動Tomcat
<br>
[code]service tomcat restart[/code]
<br>
<br>
重新啟動Apache
<br>
[code]service httpd restart[/code]
<br>
<br>
開啟瀏覽器存取http://www.andowson.com/olat
<br>
將會導引至http://www.andowson.com/olat/dmz/
<br>
輸入帳號administrator及密碼olat即可登入（建議先修改密碼再往下做別的事）
<br>
<br>
接下來就是中文化的工作了。]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/75/115.page</guid>
				<link>https://forum.andowson.com/posts/preList/75/115.page</link>
				<pubDate><![CDATA[Tue, 29 May 2007 10:47:08]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:OLAT安裝筆記</title>
				<description><![CDATA[ 如果遇到底下這樣的問題 
<br>
[quote]java.lang.RuntimeException: org.olat.core.logging.StartupException: Database mapping problem. Check your build.properties for valid entries. Empty values can cause problems! 
<br>
 org.olat.core.servlets.OLATServlet.init(OLATServlet.java:76) 
<br>
 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) 
<br>
 org.apache.catalina.valves.FastCommonAccessLogValve.invoke(FastCommonAccessLogValve.java:482) 
<br>
 org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) 
<br>
 org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:200) 
<br>
 org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283) 
<br>
 org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:773) 
<br>
 org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:703) 
<br>
 org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:895) 
<br>
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685) 
<br>
 java.lang.Thread.run(Thread.java:619)[/quote] 
<br>
請刪除/var/robust/worker2/webapps 
<br>
/var/webapps下對/home/andowson/www重複的symbolic link 
<br>
<br>
參考資料 
<br>
http://lists.olat.org/wws/arc/olat-users/2006-12/msg00007.html]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/75/116.page</guid>
				<link>https://forum.andowson.com/posts/preList/75/116.page</link>
				<pubDate><![CDATA[Tue, 29 May 2007 10:52:38]]> GMT</pubDate>
				<author><![CDATA[ andowson]]></author>
			</item>
			<item>
				<title>回覆:OLAT安裝筆記</title>
				<description><![CDATA[ 不錯，謝謝站長分享知識。有空我也裝一個看看]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/75/118.page</guid>
				<link>https://forum.andowson.com/posts/preList/75/118.page</link>
				<pubDate><![CDATA[Wed, 30 May 2007 20:33:28]]> GMT</pubDate>
				<author><![CDATA[ windstorm]]></author>
			</item>
			<item>
				<title>回覆:OLAT安裝筆記</title>
				<description><![CDATA[ 這篇文章是google繁體中文中關於OLAT唯一的文章，真是太神奇囉]]></description>
				<guid isPermaLink="true">https://forum.andowson.com/posts/preList/75/175.page</guid>
				<link>https://forum.andowson.com/posts/preList/75/175.page</link>
				<pubDate><![CDATA[Fri, 13 Jul 2007 10:21:45]]> GMT</pubDate>
				<author><![CDATA[ ofather]]></author>
			</item>
	</channel>
</rss>