Monday, October 17, 2011

Start Ubuntu in text mode


Running the desktop/X11 is very resource intensive, you probably don't want to do it all the time or on production server. Follow the instructions here to start your ubuntu in text mode only.

Install X11 on Ubuntu 10.04 LTS

By default, Ubuntu server 10.04 LTS is text mode only. Follow the stesp below to install X11 (or full desktop).
  1. sudo apt-get update
  2. sudo apt-get install ubuntu-desktop
  3. sudo reboot
After restart, the login screen should show up.

Friday, October 14, 2011

Enable Alfresco JavaScript Debugger

Reference http://aboutalfresco.blogspot.com/2009/11/enable-javascript-debugger.html
The debugger will open in a Java swing window. So it won't work if the server doesn't have GUI, for example, ubuntu without X-windows.

Thursday, October 13, 2011

Alfresco JavaScript Web Script Logging

Add logging in web script JS file
logger.log("whatever");

Change log4j setting in custom-log4j.properties
log4j.logger.org.alfresco.repo.jscript=debug
log4j.logger.org.alfresco.repo.jscript.ScriptLogger=debug

Restart tomcat.

Friday, October 7, 2011

Where are the tags saved in Alfresco

You can use Node Browser to navigate to where the tags are saved.

  1. Login alfresco
  2. Open node browser
  3. workspace://SpaceStore > children categoryRoot > children taggable
You may not see taggable if no tag exists. Credits goes to
https://forums.alfresco.com/en/viewtopic.php?f=12&t=18091

Alfresco Tomcat JVM Tuning

I have an Alfresco installation with Tomcat server. Which file shall I use to setup JAVA_OPTS for tomcat?

The JAVA_OPTS is not set in alfresco.sh or catalina.sh. Instead, it is in tomcat/scripts/ctl.sh. Stop tomcat, make necessary changes and restart tomcat. You can verify it by

sudo ps -ef | grep java

Wednesday, October 5, 2011

Start CentOS without GUI

I have a VM with CentOS 6.0. It runs quite slow. To speed it up, I decide to turn off X11 GUI. Following the instructions here, this can be done by editing /etc/inittab. Just change from 
id:5:initdefault:
to
id:3:initdefault:
and restart.