CStudio 1.7.0 Installation Guide

This guide was originally authored by: Michael Chen

This guide provides an up-to-date instruction for installing Crafter Studio 1.7.x. It is applicable to both Linux and Mac OS. All folder locations are based on the Mac OS "/Applications" folder, but it can be something else, like "/opt" common in Linux environment. The trailing letter 'x' in folder name pattern, such as "cstudio-1-7-x", is meant to be replaced with the actual version number of your choice.

Install from a Tomcat bundle

The ZIP archive downloaded here is bundled with Tomcat. These are steps for installing from such an archive:

  1. Unzip cstudio-1-7-x.zip into /Application/Alfresco.
  2. Run the following shell commands:
    cd /Application/Alfresco/cstudio-1-7-x
    mkdir alf_data
    chmod +x ImageMagick/bin/convert
    chmod +x bin/pdf2swf
    echo > tomcat/shared/classes/alfresco/extension/custom-repository.properties
    
  3. Edit tomcat/shared/classes/alfresco-global.properties. Set or comment out these settings:
    dir.root=/Applications/Alfresco/cstudio-1-7-0/alf_data
    #dir.indexes=/opt/cstudio/authoring-head/alf_data/lucene-indexes
    db.username=alfresco
    db.password=alfresco
    
    ooo.exe=/Applications/OpenOffice.org.app/Contents/MacOS/soffice.bin
    ooo.enabled=false
    jodconverter.officeHome=/Applications/OpenOffice.org.app/Contents
    jodconverter.portNumbers=8101
    jodconverter.enabled=true
    img.root=./ImageMagick
    swf.exe=./bin/pdf2swf
    
    index.recovery.mode=AUTO
    
  4. Delete or rename the ./alfreso.sh script that comes with the archive (which has trouble shutting down Alfresco). Create a simpler version of ./alfresco.sh listed in "[Alfresco Enterprise 3.4 Manual Installation]". See also "Running Alfresco Enterprise" towards the bottom of that page.
  5. Start Alfresco and wait for everything fully deployed and running.
    ./alfresco.sh start
    tail -f tomcat/logs/catalina.out
    

Install to an external Tomcat

Refer to "[Alfresco Enterprise 3.4 Manual Installation]" on how to install Alfresco Enterprise and Tomcat. Instead of copying the alfresco.war and share.war from the Alfresco Enterprise archive, copy these two WARs from cstudio-1-7-x.zip into the Tomcat webapps folder.

(This topic is incomplete. Do the war files take care of importing crafter's database schema?)

Install the Preview Server

You can download Tomcat 6.0.x from Apache. Unzip the archive into /Application/Alfresco/preview-tomcat-6.0.x.

Edit conf/server.xml. Locate the <Server> and <Connector> elements. Modify all 3 port values and add the URIEncoding property as follows:

<Server port="8105" shutdown="SHUTDOWN">
...
<Connector port="8180" protocol="HTTP/1.1" URIEncoding="UTF-8"
connectionTimeout="20000"
redirectPort="8443" />
...
<Connector port="8109" protocol="AJP/1.3" redirectPort="8443" />
...

Edit conf/context.xml. Add the following within the <Context> element:

<Valve className="org.apache.catalina.authenticator.SSLAuthenticator"
securePagesWithPragma="false" />

Edit conf/catalina.properties. Set the shared.loader value as follows:

shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

Run these shell commands:

cd /Application/Alfresco/preview-tomcat-6.0.x
mkdir -p shared/classes/crafter/extension
mkdir -p shared/lib
# Do the following if you downloaded the ZIP archive:
chmod +x bin/*.sh
# Replace Tomcat's ROOT with the Crafter Studio's ROOT.war
rm -rf webapps/ROOT
cp -p ../cstudio-1-7-x/tomcat/webapps/ROOT.war webapps/

Create shared/classes/crafter/extension/custom-context.xml as follows:

<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!-- load common properties -->
<bean id="crafterConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="ignoreUnresolvablePlaceholders">
<value>true</value>
</property>
<property name="locations">
<list>
<value>classpath:core/system-cfg.properties</value>
<value>classpath:core/crafter-cfg.properties</value>
<value>classpath:crafter/custom-system-cfg.properties</value>
</list>
</property>
</bean>
<import resource="classpath:core/mode-alfwcm-preview-server.xml" />
</beans>

Create shared/classes/crafter/custom-system-cfg.properties as follows:

alfresco.preview.endpoint.username=admin
alfresco.preview.endpoint.password=admin
alfresco.preview.endpoint.servicebaseurl=http://localhost:8680/alfresco/s
alfresco.preview.endpoint.downloadbaseurl=http://localhost:8680/alfresco/s/api/node/content/avm
alfresco.preview.endpoint.authserviceurl=http://localhost:8680/alfresco/s/api/login

alfresco.authoring.endpoint.username=admin
alfresco.authoring.endpoint.password=admin
alfresco.authoring.endpoint.servicebaseurl=http://localhost:8680/share
alfresco.authoring.endpoint.downloadbaseurl=http://localhost:8680/share
alfresco.authoring.endpoint.overlay.callback=/proxy/authoring/service/cstudio/wcm/preview/overlayhook?site={site}&page={browser.uri}
crafter.fileSystemRootFolder=${crafter.base.site.path}/
crafter.preview.wcm.adapter.descriptorBasePath=/www/avm_webapps/ROOT

To start the preview server, run following command:

bin/startup.sh

To track the progress of the server startup, run following command:

tail -f logs/catalina.out

To shutdown the preview server, run following command:

bin/shutdown.sh

Domain Name Resolution

The Crafter Studio authoring and preview environment requires cross-domain cookies. Assuming both Crafter Studio and the preview server run in the local machine, the following entry must be added to the /etc/hosts file:

127.0.0.1 localhost acme.com acmecom--collab.cstudio.acme.com

Edit tomcat/webapps/share/WEB-INF/classes/cstudio-application-context.xml. Set the cookieDomain value to ".acme.com" (the top domain name of the demo site):

<property name="cookieDomain">
<value>.acme.com</value>
</property>

Restart Alfresco.

./alfresco.sh stop -force
./alfresco.sh start
tail -f tomcat/logs/catalina.out

Install the ACME Demo Site

This site demonstrates many features of Crafter Studio. Steps to import and configure it are:

  1. The cstudio-1-7-x-acme-demo-site.zip archive downloaded here must be split into two archives as follows:
    unzip cstudio-1-7-x-acme-demo-site.zip
    cd cstudio-1-7-x-acme-demo-site/acmecom/dm-store
    zip -r ~/dm-store.zip *
    cd ../wcm-store
    zip -r ~/wcm-store.zip *
    
  2. Login to Alfresco Explorer as admin. Click on "Company Home" in the navigation pane.
  3. Click on the "More Actions" drop-down menu and select "Import".
  4. In the import page, click "Browse". Find and import ~/dm-store.zip created above.
  5. Click on the Administration Console icon and select "Manage System Users". Then click "Create User"
  6. In step 1, enter "collab" for First Name, Last Name. Enter "collab@acme.com" for Email.
  7. In step 2, enter "collab" for User Name Password, and Home Space Name. Click "Finish".

  8. Click on "Web Projects" in the navigation pane.
  9. Click on the "Create" drop-down menu and select "Create Web Project".
  10. Enter "acmecom" in Name, DNS Name, Title and Description. Then click "Next".
  11. Continue to click "Next" for step 2 to 5.
  12. In step 6 "Add Users", enter "admin" and click "Search" next to it. Highlight "Administrator" and "Content Manager" in the two list boxes below, then click "Add to List". Repeat the same steps to add user "collab" as Content Manager. Then click "Next".
  13. Click "Next" for step 7, and finally click "Finish" in step 8.

  14. In "Web Projects", click on the "acmecom" project. Then under "User Sandboxes", click on "Browse Website".
  15. Click on the "Create" drop-down menu and select "Bulk Import".
  16. In the import page, click "Browse". Find and import ~/wcm-store.zip created above.
  17. Click on the "acmecom" Web project again. In User Sandboxes, click "Submit All".
  18. Enter an arbitrary label and description, then click "OK".

  19. Find and edit this XML file in Alfresco: Company Home > cstudio > config > sites > acmecom > environment-overrides > dev > environment-config.xml. Modify the <preview-server-url>, <authoring-server-url> and <cookie-domain> values as follows:
    <environment-config>
        <preview-server-url>http://acmecom--collab.cstudio.acme.com:8180</preview-server-url>
        <authoring-server-url>http://acmecom--collab.cstudio.acme.com:8680/share</authoring-server-url>
        <live-server-url>http://acme.com</live-server-url>
        <live-fsr>
            <fsr>
                <property name="name">acme-com-prod</property>
            </fsr>
        </live-fsr>
        <cookie-domain>acme.com</cookie-domain>
        <open-site-dropdown>false</open-site-dropdown>
    </environment-config>
    


  20. Login to Alfresco Share as collab using the following URL:
    http://acmecom--collab.cstudio.acme.com:8680/share
    
  21. Click on the "Sites" drop-down and select "Create Site".
  22. Enter "acmecom" for both Name and URL Name. Enter "ACME demo site" as Description. Select "Web Experience Management Site" for Type. Click "OK".
  23. From the Alfresco Share dashlet "My Sites" or the "Sites" drop-down, click on the "acmecom" site name to enter the Crafter Studio acmecom Dashboard.
  24. Click on the "Site Content" drop-down, open "Pages" and click on "Acme Home". This will lead to the home page preview served up by the preview server.
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.