Portable Alfresco - run it on a USB drive 

General installation questions

Portable Alfresco - run it on a USB drive

Postby paulhh » 28 Nov 2005, 22:17

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/p ... penoffice/
... 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
paulhh
Alfresco Engineer
Alfresco Engineer
 
Posts: 407
Joined: 27 Jun 2005, 12:45

0 Points (What is this?)

A zip archive of the whole thing?

Postby mfeldstein » 05 Dec 2005, 20:20

This is super-cool. Would it be possible to get a zip archive of the whole durned thing for those of us who need to demo Alfresco but who get a little queasy at the sight of a command prompt?
mfeldstein
Community Member
Community Member
 
Posts: 13
Joined: 09 Aug 2005, 15:14

0 Points (What is this?)

Postby kevinr » 13 Dec 2005, 11:33

We can't distribute the bundle as we can't re-distribute MySQL.

Cheers,

Kevin
Alfresco UI Team Leader
http://twitter.com/kevinroast - Find me on Twitter
http://www.alfresco.com/community/register - Alfresco Manuals
http://wiki.alfresco.com - Alfresco Wiki docs
http://wiki.alfresco.com/wiki/Developer_Guide - Alfresco Developer Guide
kevinr
Alfresco Engineer
Alfresco Engineer
 
Posts: 2589
Joined: 27 Jun 2005, 15:56
Location: London
Alfresco Version: other

14 Points (What is this?)

GPL?

Postby zebedy » 15 Oct 2006, 17:56

Is alfresco not released under the GPL? If it is then you have no problem redistributing the mysql package.

http://www.mysql.com/company/legal/lice ... cense.html

MySQL is free use for those who are 100% GPL. If your application is licensed under GPL or compatible OSI license approved by MySQL AB, you are free to ship any GPL software of MySQL AB with your application ('application' means any type of software application, system, tool or utility). You do not need a separate signed agreement with MySQL AB, because the GPL license is sufficient. We do, however, recommend you contact us as there usually are good opportunities for partnership and co-marketing.
zebedy
 
Posts: 1
Joined: 15 Oct 2006, 17:18

0 Points (What is this?)

trying to install and.......something is wrong

Postby Deus Ricardo » 01 Jun 2007, 18:53

i'm not a expert but i tryed to follow the steps, but....

I Just create on a usb WD the same struture.....and when execute alf_start.bat.
2 dos windows:
one "starting Mssql....when mys sql has started...click on key to continue...
second, mysql server,
070601 hh:mm:ss InnoDB: Started; log sequence number 0 43655
070601 hh:mm:ss [note] mysql\bin\mysqld-nt: ready
version:.........socket:'' port 3306 mysql comunit....
(gpl).....


well in the F:\testes\alf_port\tomcat\webapps i still have the ROOT folder and the alfresco.war....

so no answer on localhost.......what should i do????
Deus Ricardo
 
Posts: 2
Joined: 01 Jun 2007, 18:33

0 Points (What is this?)

loopback?

Postby rrb » 07 Jun 2007, 16:50

From one of the technical tips ( laptop, no network) on the "trial" site....

http://hosted4.alfresco.com/alfresco/do ... rk%29.html

seems like this is related ( but that is just a wild ass guess):

Tip #4 – Alfresco on a Laptop (and no Network)

A question that often is asked is how to set up Alfresco on a laptop when there is no network connection. This is very simple to do. Under Windows you may need to install a loopback adaptor – Microsoft's Knowledge Base has instructions on how to do this under Windows XP and Windows 2000.


links to:
XP: http://support.microsoft.com/default.as ... -us;839013
and
2k: http://support.microsoft.com/default.as ... -us;236869

rrb
rrb
Community Member
Community Member
 
Posts: 15
Joined: 04 Jun 2007, 22:44

0 Points (What is this?)

Can't find db_setup.bat

Postby mawilson » 14 Aug 2007, 13:11

Working through the process outlined above. As the subject says, I can't find db_setup.bat.

The procedure above is a couple of years old and could probably stand a refresh.

Has anyone tried an install using the Uniform server environment?
mawilson
Community Member
Community Member
 
Posts: 6
Joined: 14 Aug 2007, 12:16

0 Points (What is this?)

Postby juliogg » 23 Aug 2007, 19:15

I am also trying to make it work on most recent version 2.1
I will publish here any change needed that is not be specified above.
About last question in this thread you can find db_setup.bat in
extras\databases\mysql once you unpack alfresco-community-tomcat-2.1.0.zip
juliogg
Community Member
Community Member
 
Posts: 8
Joined: 30 Mar 2007, 10:51

0 Points (What is this?)

Further adventures in Alfresco on a stick

Postby mawilson » 27 Sep 2007, 22:15

Okay, found db_setup.bat (Thanks juliogg). Now the thing complains about tomcat. From what I can tell the system sees the line:
Code: Select all
call "%CATALINA_HOME%\bin\startup.bat"

in alfresco.bat as:
Code: Select all
call "%CATALINA_HOME%"

at least that is what the echo I inserted in front of it returned. It actually echoed tomcat which is what CATALINA_HOME is set to.

I suppose I could force the path...
mawilson
Community Member
Community Member
 
Posts: 6
Joined: 14 Aug 2007, 12:16

0 Points (What is this?)

try the portable apps XAMPP for the mysql

Postby rrb » 28 Sep 2007, 21:52

I've recently set up Alfresco/tomcat ( using the windows install alfresco-tomcat zip) on a Western Digital "Passport" usb powered portable drive, and use
XAMPP for starting /stopping mysql ( I don't use the xampp tomcat)

See
http://portableapps.com/apps/development/xampp
http://www.nat32.com/xampp/index.htm

and it all works beautifully ( caveats regarding the security model on the XAMPP mysql - open root account)

All in all, it is rather geeky-cool to have a portable alfresco with some viable space for content and having the CIFS sharing for dropping in docs. It is great for experimenting with before messing about on the "big iron" install with many users mucking about ( even in dev).

Follow the alfresco readme.txt, and alfresco readme_mysql.txt during the initial alfresco install after the mysql is working off the portable drive.

Make sure you delete alf_data if you experiment with HSQL before setting up mySQL on the drive... the java msg is cryptic (but you'll find this same advice in the forums if you search for the message- one guess how I learned that...)


Use the nat32 URL (see above) software installed on the portable drive for the mysql admin panel, turn on mysql as service, press start, wait a bit , in windows open the alfresco folder on the portable drive double click on alf_start.bat ... wait for things to settle down ( a couple of minutes) then hit http://localhost:8080/alfresco in firefox...

You can speed the whole thing up dramatically by renaming the
alfresco war ( at E:\alfresco\tomcat\webapps\alfresco.war assuming your usb drive is mapped to E:) to say "alfresco_war.bak" AFTER the first time it comes up (and unpacks itself).
The unpacking is brutally slow (like > 10 minutes) over the USB connection, and is redundant boot time after the first time for a new install/release.

..rrb
rrb
Community Member
Community Member
 
Posts: 15
Joined: 04 Jun 2007, 22:44

0 Points (What is this?)

Continuing saga

Postby mawilson » 01 Oct 2007, 16:53

Don't know where it came from, but 'tomcat had a blank space on the end. Got rid of that and Tomcat started as expected. So now I have MySQL and Tomcat and the OpenOfficePortable service running. Try http://localhost:8080/alfresco and I get a 404.
mawilson
Community Member
Community Member
 
Posts: 6
Joined: 14 Aug 2007, 12:16

0 Points (What is this?)

Re: Portable Alfresco - run it on a USB drive

Postby esafonov » 17 Oct 2009, 21:09

Why not to use a Linux Mint on a USB Stick or CD, loaded with working Alfresco onboard, or make a Virtual appliance for VMWare? :)
esafonov
Community Contributor
Community Contributor
 
Posts: 23
Joined: 28 Sep 2009, 11:44
Location: Yekaterinburg, Russia
Alfresco Version: 3.2

0 Points (What is this?)

Portable Alfresco - run it on a USB drive, run it on Windows

Postby esafonov » 25 Dec 2009, 11:47

Image

Yesterday I have made a portable image of Alfresco 3.2r2 CE. This can run on any unprepared Windows box.

It's based on Portable Ubuntu Remix, and it contains:
- Portable Ubuntu Remix. It's a Ubuntu version, running on top of Windows
- Alfresco 3.2r2 Community Edition, installed into Portable Ubuntu.
- configured mysql database and correct alfresco.sh startup script

How to build it yourself:
1. get a Windows PC with 4 Gb disk space free
2. download and install Portable Ubuntu from http://portableubuntu.demonccc.com.ar/. I suggest you install it into c:\Portable_Ubuntu_DOS
3. start Portable Ubuntu (c:\Portable_Ubuntu_DOS\pubuntu.exe), and get into console. Default pass for user is 123456.
4. install mysql-server, mysql-client, sun-java6 using apt-get, and become root
5. download and install Alfresco Community Edition into Portable Ubuntu. All you need is to place Alfresco CE 3.2r2 version for Linux distro into root (/) folder, and run it.
6. create MySQL database for Alfresco, using /opt/Alfresco/extras/databases/mysql/db_setup.sql
7. edit alfresco.sh (you need to replace JAVA_HOME=%JAVA_HOME% with correct path, i.e. JAVA_HOME="/usr", and to replace ALF_HOME=%ALF_HOME% with correct path ALF_HOME=/opt/Alfresco)
8. start Alfresco with /opt/Alfresco/alfresco.sh start. Be patient, startup time is approx 2 minutes
9. check alfresco.log, to see that Alfresco is started completely
10. run Firefox from Portable Ubuntu Top Centered Panel, and point it to http://localhost:8080/Alfresco. Check that Alfresco Explorer is working.
11. Select Shutdown from Portable Ubuntu Top Centered panel, wait 1 to 3 minutes until Portable Ubuntu completely shutdown
12. Copy directory c:\Portable_Ubuntu_DOS to your flash drive and take it away. It takes approx 4G space on flash drive.

Any time you need to present working Alfresco, insert USB flash into Windows PC, run Portable_Ubuntu_DOS\pubuntu.exe, run Alfresco.sh, and you're ready to visit http://127.0.0.1:8080/Alfresco.


Here is screenshots:

P.S.
Ladies and Gentleman's,
have a nice New Year's Day.
esafonov
Community Contributor
Community Contributor
 
Posts: 23
Joined: 28 Sep 2009, 11:44
Location: Yekaterinburg, Russia
Alfresco Version: 3.2

0 Points (What is this?)

Re: Portable Alfresco - run it on a USB drive

Postby cheche » 28 Dec 2009, 03:59

Nice!,
how good is the performance?, I wonder if the usb port is the bottleneck, ¿right?
cheche
 
Posts: 2
Joined: 28 Dec 2009, 03:33
Alfresco Version: 3.2r

0 Points (What is this?)

Re: Portable Alfresco - run it on a USB drive

Postby oak » 05 Jan 2010, 16:17

Thanks!
oak
 
Posts: 1
Joined: 05 Jan 2010, 09:12
Alfresco Version: 3.2r

0 Points (What is this?)

Next

Return to Installation

Who is online

Users browsing this forum: No registered users and 7 guests