在Debian 7(Wheezy - AMD64)上安装Kaldin在线考试管理解决方案
Kaldin是一个基于java / tomcat的在线评估软件,可帮助教师创建在线评估。 访问此页面了解更多详细信息: http : //www.kaldin.com/本教程中提供的脚本将为您安装Kaldin。 我已经在Debian_7.0.0 amd64 netinst CD映像上成功测试了这个脚本。 所以Ubuntu_12.04也应该可以正常工作,但是您自己承担风险。
此脚本将自动执行以下步骤:
(1)从ppa安装Oracle Java
(2)从debian稳定源安装Apache2,MySQL-5.5,Tomcat7
(3)安装webmin
(4)将Apache设置为tomcat的代理
最后,您应该在http:// your_server_ip / kaldin
上看到一个kaldin安装页面,继续填写所有必需的详细信息,这将填充MySQL数据库,并允许您登录。
下面的解决方法没有解释:
在处理MySQL时, PHPMyadmin很有用,而且在编辑Kaldin DB中的某些条目时也是需要的- 即email_settings 。
Webmin在处理任何Linux服务器时非常有用,在这种情况下,它在处理Postfix时非常有用。
如何使用这个脚本?
cd /tmp/
vi kaldin
复制并粘贴以下代码( 只需复制脚本 , 右键单击vi编辑器) 。
更改SERVER_FQDN , 按Esc然后 Shift + ZZ将保存(您应该知道如何使用vi编辑器)。
chmod +x kaldin
./kaldin ## This will start the installation, just follow the on-screen instructions
#!/bin/bash ######### Installing Kaldin Online Exam Management Solution ############# ######### On Debian_7.0.0_x64 with Tomcat-7,Oracle-java7, MySQL5, Apache2, PHP5 and Webmin ######### Kaldin installation will fail if no JDK installation found ##### Kaldin is a java/tomcat based online assessment software to help instructors to create online assessments ##### visit this page for more details: http://www.kaldin.com/ ## VAR KALDIN_VER=2.1 ## Version of Latest Kaldin KALDIN_SOURCE=http://hivelocity.dl.sourceforge.net/project/kaldin/Kaldin-2.1/Kaldin-2.1.zip ## Direct download Link for Kaldin WAR file KALDIN_PROXY=/etc/apache2/conf.d/kaldin.conf SOURCES_APT=/etc/apt/sources.list APACHE_CONF=/etc/apache2/apache2.conf JDK_VER=oracle-java7 JDKPATH=/usr/lib/jvm/ SERVER_FQDN=youcl.org ## Change this as per your server name ## ##### Function to prompt for user attention function pause(){ read -p "$*" } #### Installing Oracle-JAVA7 ## The following command will fix the add-apt-repository command: sudo apt-get -y update sudo apt-get -y dist-upgrade sudo apt-get -y upgrade sudo apt-get -y install python-software-properties sudo add-apt-repository ppa:webupd8team/java sudo apt-get update && sudo apt-get -y install oracle-jdk7-installer #echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list #echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list #apt-key adv --keyserver hkp://keyserver.ubuntu.com:80/ --recv-keys EEA14886 #apt-get update #apt-get -y install oracle-java7-installer ##### if dpkg --get-selections | grep $JDK_VER; then echo "Found Oracle JDK $JDK_VER, Kaldin can be installed on this system" else echo "Oracle JDK $JDK_VER wasn't found in $JDKPATH, please check the installation and/or path $JDKPATH" echo "Please correct the JDK installation and then run the Kaldin installer script. Kaldin installer is exiting now" exit 1; fi #### Install main packages apt-get -y install sudo vim unzip mysql-server apache2 tomcat7 php5 phpmyadmin postfix echo "JAVA_HOME=/usr/lib/jvm/java-7-oracle" >> /etc/default/tomcat7 ###### Installing webmin echo "Creating webmin sources for apt" cat >> $SOURCES_APT << EOF ##[Webmin] deb http://download.webmin.com/download/repository sarge contrib deb http://webmin.mirror.somersettechsolutions.co.uk/repository sarge contrib EOF cd /root wget http://www.webmin.com/jcameron-key.asc apt-key add jcameron-key.asc apt-get update apt-get -y install webmin #cd /var/lib/tomcat7/webapps/ cd /tmp/ echo "downloading kaldin2.1 from $KALDIN_SOURCE" wget $KALDIN_SOURCE echo "Extracting Kaldin-2.1.zip" sudo unzip Kaldin-2.1.zip sudo cp Kaldin-2.1/kaldin/webapps/kaldin.war /var/lib/tomcat7/webapps ##### Installing Kaldin ## Check the permissions for tomcat directories chown -R tomcat7:tomcat7 /usr/share/tomcat7 chown -R tomcat7:tomcat7 /var/lib/tomcat7 #pause 'Press [Enter] if kaldin.war has been downloaded successfully, else open another SSH session, download kaldin.war to /var/lib/tomcat7/webapps/, come over here and then press [Enter] to continue' ##### Setting up apache2 with "ServerName $SERVER_FQDN:80" echo "I am assuming $SERVER_FQDN as the default FQDN, this is required to update in the file apache.conf file" echo "Type 'y' if you want to change the $SERVER_FQDN to your own" echo "Type 'n' to continue with $SERVER_FQDN" read item case "$item" in y|Y) echo "Please type the Server FQDN in the form of foo.domain.com" read inputline SERVERFQDN=$inputline ;; n|N) echo "Continuing with $SERVER_FQDN" SERVERFQDN=$SERVER_FQDN;; *) echo "Not an answer";; esac echo "ServerName $SERVERFQDN:80" >> $APACHE_CONF ##### Setting up apache2 proxy for Tomcat7 cat >> $APACHE_CONF << EOF LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so EOF ##### cat >> $KALDIN_PROXY << EOF # mod_proxy setup. ProxyRequests Off ProxyPass /kaldin http://localhost:8080/kaldin/ ProxyPassReverse /kaldin/ http://localhost:8080/kaldin/ <Location "/kaldin"> # Configurations specific to this location. Add what you need. # For instance, you can add mod_proxy_html directives to fix # links in the HTML code. See link at end of this page about using # mod_proxy_html. # Allow access to this proxied URL location for everyone. Order allow,deny Allow from all </Location> EOF service tomcat7 restart service apache2 restart