2010年7月18日

Modified Lubbo's Fan Control

Lubbo's Fan Control is a fantastic fan control application that solves the Macbook's thermal problem. Unfortunately, for some models of Macbook, you have to kill the process of bootcamp.exe, otherwise the CPU usage of bootcamp.exe would go very high periodically.

In this forum thread, mizutama revealed an IO method to control macbook fans without killing the process of bootcamp.exe. Based on his demo program WpfFanMon, I integrated his method to Lubbo's Fan Control 0.19.

My modified version of Lubbo's Fan Control 0.19 can be downloaded from here my SkyDrive or badongo hosts.
Publisher: Unknown - 星期日, 7月 18, 2010

2010年7月6日

Set up WAR version of Alfresco Community 3.3 on ubuntu 10.04


  1. enable 'partner' repository in /etc/apt/sources.list. Otherwise the required package sun-java6-jdk will not be installed

  2. Install required packages:

    sudo apt-get install mysql-server sun-java6-jdk imagemagick swftools openoffice.org-core openoffice.org-java-common openoffice.org-writer openoffice.org-impress openoffice.org-calc

  3. Set environment variables by add the following lines to /etc/environment:

    JAVA_HOME="/usr/lib/jvm/java-6-sun/"
    JAVA_OPTS="-Xms256m -Xmx1024m -Xss96k -XX:MaxPermSize=512m -server"

  4. Install tomcat6 and mod_jk for apache2 integration:

    apt-get install tomcat6 libapache2-mod-jk

  5. Configure mysql:

    1. Edit /etc/mysql/my.cnf, add following lines under [mysqld]
      [mysqld]
      #
      # * Basic Settings
      #
      #
      default-character-set = utf8
    2. Restart mysql:
      /etc/init.d/mysql restart

    3. Create and prepare database for alfresco

      1. Log into MySQL using mysql's root and your password (assigned by the user when installed by apt-get)
        mysql -u root -p

      2. Input creation commands
        mysql> CREATE DATABASE alfresco DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
        mysql> GRANT ALL PRIVILEGES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';
        mysql> GRANT SELECT,LOCK TABLES ON alfresco.* TO alfresco@localhost IDENTIFIED BY 'alfresco';
        mysql> FLUSH PRIVILEGES;
        mysql> quit;
        Note that there is a ';' in the end of each line.


  6. Download Afresco Community 3.3 WAR package
    wget http://dl.alfresco.com/release/community/build-2860/alfresco-community-war-3.3g.tar.gz
    and extract files to afresco_install
    mkdir alfresco_install
    tar zxf alfresco-community-war-3.3g.tar.gz -C alfresco_install
    and move the war file to the webapps
    mv alfresco_install/alfresco.war /var/lib/tomcat6/webapps
    chown tomcat6:tomcat6 /var/lib/tomcat6/webapps/alfresco.war

  7. Move alfresco_install/extensions to /var/lib/tomcat6/shared/class/alfresco
    mv extensions /var/lib/tomcat6/shared/classes/alfresco
    and change the owner of /var/lib/tomcat6/shared/classes/alfresco to tomcat6
    chown tomcat6:tomcat6 /var/lib/tomcat6/shared/classes/alfresco -R

  8. Edit an new file alfresco-global.properties under /var/lib/tomcat6/shared/classes/
    vi /var/lib/tomcat6/shared/classes/alfresco-global.properties
    and add following lines
    #specify the directory that you want alfresco works on.
    dir.root=/var/alfresco/alf_data
    db.name=alfresco
    db.username=alfresco
    db.password=alfresco
    db.host=localhost
    db.port=3306
    db.driver=org.gjt.mm.mysql.Driver
    db.url=jdbc:mysql://localhost/alfresco
    hibernate.dialect=org.hibernate.dialect.MySQLInnoDBDialect

    ooo.exe=/usr/lib/openoffice/program/soffice
    ooo.enabled=true
    img.root=/usr
    swf.exe=/usr/bin/pdf2swf

    cifs.enabled=true
    cifs.serverName=dms
    cifs.ipv6.enabled=false
    cifs.tcpipSMB.port=1445
    cifs.netBIOSSMB.namePort=1137
    cifs.netBIOSSMB.datagramPort=1138
    cifs.netBIOSSMB.sessionPort=1139
    and then change its owner
    chown tomcat6:tomcat6 /var/lib/tomcat6/shared/classes/alfresco-global.properties

  9. Create the directories that alfresco works on:
    mkdir /var/alfresco/alf_data -p
    and change their owner
    chown tomcat6:tomcat6 /var/alfresco -R

  10. Download JDBC Driver for mysql
    wget http://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.13.tar.gz/from/http://mysql.mirror.tw/
    and extract the JDBC driver and mv it to /usr/share/tomcat6/lib
    tar zxf mysql-connector-java-5.1.13.tar.gz
    mv mysql-connector-java-5.1.13/mysql-connector-java-5.1.13-bin.jar /usr/share/tomcat6/lib
    chown tomcat6:tomcat6 /usr/share/tomcat6/lib/mysql-connector-java-5.1.13-bin.jar

  11. Finally, we can make alfresco explorer work by restarting tomcat.
    /etc/init.d/tomcat6 restart
Publisher: Unknown - 星期二, 7月 06, 2010