Quantcast
Channel: Alfresco Forums - Installation & Upgrades
Viewing all articles
Browse latest Browse all 305

Portable Alfresco - run it on a USB drive

$
0
0

Run Alfresco on a USB drive - am I mad? Not really, I needed something for demos and easy set up for training on Windows boxes. The whole lot needs about 400Mb without any content.

To get it all together, I've got a Windows folder structure like:

alf_port
|
+- bin
|
+- jdk
|
+- licenses
|
+- mysql
|
+- PortableOpenOffice
|
+- tomcat

The MySQL is the non-install version of 5.0 just unzipped, found at:
http://dev.mysql.com/downloads/mysql/5.0.html

The JDK is copied from a JDK installed from:
http://java.sun.com/j2se/1.5.0/download.jsp
... and the demo & sample directories removed

The PortableOpenOffice is just unzipped, found at:
http://johnhaller.com/jh/useful_stuff/portable_openoffice/
... with a mofified PortableOpenOffice.ini in the PortableOpenOffice folder

The Alfresco stuff just taken from the Tomcat bundle and placed in the alf_port folder. You'll need to set up the Alfresco database by starting MySQL by hand, running db_setup.bat, then stopping MySQL (see the alf_xxxx.bat scripts for how). The CIFS/file-system and image conversion components are picked up without copying them somewhere on the path. The Alfresco .bat files have been modified as below.

Cheers
Paul

===== PortableOpenOffice.ini =====

[PortableOpenOffice]
OpenOfficeDirectory=openoffice\program
UserProfileDirectory=userprofile
AdditionalParameters="-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager" -nologo -headless
WaitForOpenOffice=true
OpenOfficeExecutable=soffice.exe

# The above options are explained in the included readme.txt

===== SetPaths.bat =====

@ECHO OFF
REM Set Paths Utility
SET JAVA_HOME=jdk
SET OPENOFFICE_PATH=

===== alf_start.bat =====

@echo off
rem ---------------------------------------------------------------------------
rem Start script for the Alfresco Server
rem ---------------------------------------------------------------------------

rem ---------------------------------------
rem Start DB (MySQL) in a minimised console
rem ---------------------------------------

echo Starting MySQL...
start "MySQL Server" cmd /c mysql\bin\mysqld-nt --console
echo When MySQL has started...
pause

call alfresco.bat start

===== alf_stop.bat =====

@echo off
rem ---------------------------------------------------------------------------
rem Stop script for the Alfresco Server
rem ---------------------------------------------------------------------------

call alfresco.bat stop

rem ---------------------------------------
rem Shutdown MySQL
rem ---------------------------------------

echo Shutting down MySQL...
mysql\bin\mysqladmin -u root shutdown

===== alfresco.bat =====

@echo off
rem ---------------------------------------------------------------------------
rem Start script for the Alfresco Server
rem ---------------------------------------------------------------------------

set CATALINA_HOME=tomcat

rem --- If SetPaths.bat already exists - assume set by hand and use as is
if not exist "SetPaths.bat" goto getpaths
call SetPaths.bat
goto start

:getpaths
call RegPaths.exe
call SetPaths.bat
del SetPaths.bat

:start
set PATH=%JAVA_HOME%/bin;bin;%PATH%
rem ---------------------------------------
rem Start Components
rem ---------------------------------------

if not ""%1"" == ""start"" goto nostart

rem ---------------------------------------
rem Start Tomcat
rem ---------------------------------------

echo Starting Tomcat...
call "%CATALINA_HOME%\bin\startup.bat"

rem ---------------------------------------
rem Start OpenOffice for transformations
rem ---------------------------------------
if exist "start_oo.bat" call "start_oo.bat"

goto nostop
:nostart

rem ---------------------------------------
rem Stop Components
rem ---------------------------------------

if not ""%1"" == ""stop"" goto nostop

echo Shutting down Tomcat...
call %CATALINA_HOME%\bin\shutdown.bat

rem ---------------------------------------
rem Stop OpenOffice for transformations
rem ---------------------------------------
if exist "start_oo.bat" c:\windows\system32\taskkill /f /im soffice.bin

:nostop

===== start_oo.bat =====

@echo off
rem ---------------------------------------------------------------------------
rem Start script for the OpenOffice transform service
rem ---------------------------------------------------------------------------

echo Starting OpenOffice service...
call PortableOpenOffice\PortableOpenOffice.exe

Dr Paul Holmes-Higgin
Chief Product Officer


Viewing all articles
Browse latest Browse all 305

Trending Articles