Search This Blog

Tuesday, April 27, 2010

Running Alfresco as Windows Service

Run Tomcat 6 as Windows service:
Info URL:
http://wiki.alfresco.com/wiki/Configuring_Alfresco_as_a_Windows_Service

Install Command Line:
:\> cd c:\alfresco\tomcat\bin
:\> service.bat install
:\> tomcat6 //US//Tomcat6 --JvmMs=128 --JvmMx=512 --JvmSs=96 ++JvmOptions "-XX:MaxPermSize=128m"

Uninstall Command Line:
:\> service.bat uninstall Tomcat6 (or the "name" used when installing the service)

TomCat6 Service Properties Link:
:\> tomcat6w.exe //ES//Tomcat6 (or the "name" used when installing the service)

ERRORS: TomCat6 SERVICE NOT STARTING
  1. prunsrv.c Failed creating java
    1. Solution:
    • Copy msvcr71.dll from java’s bin directory to windows\system32 folder
  2. Known issue
    1. Solution:
    • Make sure your tomcat’s pointing to correct jvm.dll folder.
    • My tomcat pointing to C:\Program Files\Java\jre1.6.0_07\bin\client\jvm.dll, try change to C:\Program Files\Java\jre\bin\client\jvm.dll

Run MySQL as Windows Service:
These instructions assume that Alfresco is installed in C:\Alfresco. Before
you can install MySQL as a windows service you need to set the following directories
in the C:\alfresco\mysql\my.ini file

Edit my.ini:
basedir="C:\Alfresco\mysql"
datadir="C:\Alfresco\alf_data\mysql"

Install Command Line:
:\> cd C:\Alfresco\mysql\bin
:\> mysqld.exe --install AlfrescoMySQL --defaults-file=C:\Alfresco\mysql\my.ini

ERRORS: MySQL SERVICE NOT STARTING
None so far...

Sunday, April 25, 2010

Cloning / Copying Virtual Hard Drives


I have a base virtual hard drive (VHD) which I use to create new virtual machines (VM) as needed. The base VHD has an operating system (OS) loaded with all latest updates, so when I need a new VM I just make a copy of my base VHD; create new VM with copied VHD. I’ve been using Sun Virtual Box to run my VM’s, it’s got a small memory foot print on the host machine and memory management is better so the precious megabytes on your demo / development pc can be used for fast running VM’s without having to kill each running server on you host machine and it’s free here.

But when cloning / copying VHD’s you sure will be running in to this error:

'Failed to open the hard disk J:\ISO\VPC\RTBase\Base_c.vdi, Cannot register the hard disk ‘J:\ISO\VPC\RTBase\Base_c.vdi’ with  UUID {d6dd48d6-5999-455a-8498-f6f1359ab971} because a hard disk ‘J:\ISO\VPC\RTBase\Base_c.vdi’ with  UUID {d6dd48d6-5999-455a-8498-f6f1359ab971} already exists in the media registry … ' bla-bla-bla

To fix this, Sun Virtual box has a cool command line tool include in its install folder [C:\Program Files\Sun\VirtualBox], VBoxManager. Executing the following command will change / assign a new UUID to the cloned / copied VHD.

Command line:
VBoxManage internalcommands sethduuid J:\ISO\VPC\SMDMOSSServer_c.vdi


Result: