Search’d: How do I disable Alfresco Share

I’ve always found it fascinating what people searched for to find my blog.  And more fascinating why my blog even came up in the results!  The idea occurred to me that there were actually some meaningful questions in those searches. Yes, it was like one of those Windows 7 epiphanies.  I’m going to start a new weekly (cross your fingers) series based on those search terms. New posts will come every Friday and will incorporate some facet of the search terms that brought people to this blog.  The post size will vary based on the question and the technical depth it may require.  Hopefully, this can prove to be valuable. I’ll also add a pitch here for Alfresco Professional Services — bread on the table, mouths to feed and all — we offer the in-depth knowledge you need to help with your Alfresco Enterprise Subscription. So without further ado….I give you: Search’d

Today’s search terms came in as “alfresco start up disable share studio”.  For most Java Developers who have worked with Java application servers this will be pretty simple — you may even want to find something else to do now.  For those new to Java or not even in the market to learn, it will not be.  But the answer is pretty simple, but first some background…..

Java based applications can be packaged into several different formats. Typically you will find JARs and WARs.  In some circumstances they are packaged in other formats as well…RARs and EARs being the most common.  We at Alfresco like to use AMPs (which may or may not actually include Java code) to manager extensions to Alfresco.  These archives are zip files with specific file layouts. Go ahead, take a copy of the alfresco.war file and open it with a archive manager that understands zip.  It won’t hurt.

Now, if you downloaded Alfresco as one of the full blown installers or as a bundle with tomcat, go ahead and run the installer or unpackaged the archive.  Once that is done navigate down into the tomcat/webapps directory.  In there you will see a few directories and a couple of files with the extension .war (alfresco.war, share.war, mobile.war (Community only), studio.war (Community only)).  To disable any of these simply remove the war file or rename it by anding a new/additional extension.  I like to add the extension .off, which lets me clearly see that this part of Alfresco is — off.  Removing the war files also may seem a bit brute force and unless you are really desperate for the space it won’t hurt anything to leave them.  This is my preferred approach.  If you ever want to add that part of Alfresco back, just remove the extension and restart Alfresco.

If you have already started Alfresco you will see directories that match the name of the war file.  You will also need to remove those directories. (Don’t forget to restart Alfresco after removing those directories).

It’s as simple as that.

**Q:  Is there ever a case where I would disable  the Alfresco application? **Yes.  If you are using Alfresco Share, you can add a bit of scale to your deployment by having Share installed on another server.  It does require some additional configuration, but we won’t cover that today.

**Q: I just removed _\_.war!  Or I just removed the ___ directory! How do I get it back? **For basic out of the box installs, stop Alfresco and simply grab the war file from the Alfresco Community Page or Alfresco Network (versions must match) and copy it back into the webapps directory.  If you have added extensions via AMPs to your war files, reapply the amps to the new war file. Restart Alfresco.  For the case where you deleted an expanded directory, with the war files in place, restart Alfresco and they will be deployed again.