Sunday, February 7, 2010

Alfresco 3.1 CIFS Quick Configuration.

Short and Effective!!!

In your alfresco installation directory locate
file-server-custom.xml.sample.
It is encouraged to changes configuration files of Alfresco only in the shared directory so:
In the
/tomcat/shared/classes/alfresco/extension directory locate the above named file.


The content looks like this:

 <alfresco-config area="file-servers">
<!-- To override the default Alfresco filesystem use replace="true", to -->
<!-- add additional filesystems remove the replace="true" attribute -->
<config evaluator="string-compare" condition="Filesystems" replace="true">
<filesystems>
<!-- Alfresco repository access shared filesystem -->
<filesystem name="${filesystem.name}">
<store>workspace://SpacesStore</store>
<rootPath>/app:company_home</rootPath>
<!-- Add a URL file to each folder that links back to the web client -->
<urlFile>
<filename>__Alfresco.url</filename>
<webpath>http://${localname}:8080/alfresco/</webpath>
</urlFile>
<!-- Mark locked files as offline -->
<offlineFiles/>
...
</filesystem>
<!-- AVM virtualization view of all stores/versions for WCM -->
<!-- virtual view can be any of the following: normal, site, staging, author, preview -->
<avmfilesystem name="AVM">
<virtualView stores="site,staging,author"/>
</avmfilesystem>
</filesystems>
</config>
</alfresco-config>


In the configuration file, filesystem.name refers to the name of the file system you are creating and localname refers to the name of you user to access your server via a browser URL. To avoid using localhost you might consider creating a new entry in the host configuration file in windows: c:\windows\system32\drivers\etc\ directory.

Rename the file-server-custom.xml.sample to
file-server-custom.xml
Change the values
${filesystem.name} and ${server.local.name} accordingly. In my case i used alfresco and cifs4real.com respectively (the latest one configured in the host file and bound to my network IP address).

Save and close the
file-server-custom.xml file in the same folder as the sample. That means in the extension folder.

Now before strarting you alfreso server make sure the port 445 is not in use. To do it just run the command netstats -a from a command prompt. If it appears that the port is in used turn off the service by sending net stop SERVICE_NAME from the command prompt. Do the same with start instead of stop when you are done with this exercise if you need to start the service again. We are almost done here.

First Run the command.
nbtstat -a SERVER_IP_ADDRESS

Now start the alfresco server.

Now we need to map a space of Alfresco as a device in your local machine. Do this using for instance the command.
net use X: \\SERVER_NAMEa\Alfresco\SPACE_NAME /user:ALFRESCO_USERNAME

The "a" at the end of your machine SERVER_NAME is not optional. The space name can be for instance "Sites".


That's all, now you can access your mounted alfresco space in the windows explorer.



No comments: