In Part 1 of this articled, we began to take the edge off the somewhat daunting task of analyzing Zurmo’s file structure. We learned that even though the way the file system is organized might not exactly be the most intuitive for a new Zurmo administrator or developer; it’s better to than trying to analyze the database tables when first coming to grips with Zurmo.
In the previous post, we used Bitbucket to browse the official source code repository. Today we’re going to use a Unix command-line tool called tree to visualize our hosted installation or local instance.
If you intend to follow this tutorial on your system, Arvixe personal hosting customers need to obtain ssh shell access to their account by calling or emailing tech support, as shell access is not enabled by default on shared hosting plans. Simply contact tech support and let them know you need terminal ssh access to your account. You can find instructions on how to install and configure a vt100 terminal emulator PuTTy in a previous post. Nothing could be easier.
Of course we also need to have an instance of Zurmo CRM installed in your hosting account. If haven’t yet installed the Zurmo application, Arvixe provides a convenient”one-click” Softaculous installation through your control panel. If you need to review the installation process, see this previous article: Zurmo CRM – 5 minute installation.
Finally, if you don’t have access to a Zurmo instance, you can still follow this tutorial by omitting the command-line instructions and instead browsing with Bitbucket as we explained in Part 1. The directory structure is the same, we are just using the command-line to browse instead of Bitbucket’s graphical interface.
Once you have obtained remote shell access to your instance of Zurmo CRM, you are ready to follow the rest of this tutorial. Let’s get started!
If you accepted the default installation location using the Arvixe Softaculous installer, then your Zurmo CRM instance should be running from:
Change directory to the Zurmo installation:
You should see the top-level directory structure, which we reviewed in the last post. Today we’re going to inspect the /app directory, so enter the following commands in your terminal window.
cd app ls -al
You should see output similar to the following:
Don’t worry if the prompts don’t look exactly the same or if your output is not in color, the important thing is that you can see the listing of directories and files. Let’s look at the same information in a different way using the linux tree command. Type the following command in your terminal
tree -L 2
Now you should see something like this:
The -L option for the tree command allows you to specify the directory level you wish to browse. In this case we asked tree to show us a picture of the directory 1 level deep. You can use the tree command with -L n where n is the number of levels you want to display. Another handy option is tree -d which will only print the directories. You can also combine options like tree -L 2 -d which will print only the directories up to two levels deep.
Great job! Now you know how to browse the Zurmo source code two different ways. Stay tuned! In the final post in this 3 part series, I’ll provide you with a “cheat-sheet” reference table which describes the purpose of the various directories in the Zurmo file system.
(c) 2014 Windsor Wallaby. All rights reserved.