Setting up Development Environment for ownCloud

For setting up development environment for ownCloud, I tried several options:

1. Set the dev environment on Mac OS (I later realized after reading the prerequisites correctly that this was a bad choice because ownCloud has discontinued the support for Mac OSx). Thanks to my mentor, @jancborchardt who pointed me to the following posts on deploying ownCloud’s dev environment:

2. Create Virtual Machine using Virtualbox and Ubuntu LTS 12.04 Operating system.

3. Spin an Amazon EC2 instance with community AMIs for Ubuntu LTS 12.04.

4. Finally, after reading through several stackexchange posts, I came across an answer that suggested to use VMWare Fusion instead of VirtualBox.

Fortunately, I already had the license key for VMWare Fusion.  Here are detailed instructions on setting up ownCloud’s development environment on your Mac OS:

  1. Download Desktop version of Ubuntu LTS 12.04 from one of the mirror site (
  2. Deploy this on Fusion using the guided GUI based install of Fusion
  3. On the virtual machine, use the terminal application and deploy LAMP stack:
  • Install Apache using the following command:
sudo apt-get update
sudo apt-get install apache2
  • Go to your web browser and check if the webserver is correctly installed by visiting the following address:

You should see the default Ubuntu 12.04 Apache web page.

  • Install MySQL
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql

During the installation, the installer will ask you to confirm a password for the MySQL “root” user.

  • Create MySQL’s database directory structure by issuing the following command:
sudo mysql_install_db
  • Run the security script:
sudo mysql_secure_installation

Keep all the default settings by hitting the “Enter” key.

  • Install PHP
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
  • Change the following settings in the dir.conf file:
sudo nano /etc/apache2/mods-enabled/dir.conf

Change the settings in this file to the following:

<IfModule mod_dir.c>
    DirectoryIndex index.php index.html index.cgi index.xhtml index.htm

  • Restart your webserver:
sudo service apache2 restart

For more details on installing LAMP stack, see this post.

4. Install Python 3.4 on Ubuntu 12.04 LTS.

sudo apt-get install python3-pip
sudo apt-get install python3-setuptools

Because 12.04 is packaged with Pyton 2.7 by default, I had to setup a virtual env using the instructions listed here and here.

5. Install github:

sudo apt-get install git-core
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
git config --global "Your Name Here"
git config --global ""

For more information, see the instructions listed here.

Common errors
Some common errors I encountered during installation are as listed below:
While installing php5, I ran into the following issue:
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process 
Remove your /var/lib/dpkg/lock file and force package reconfiguration (for more details, see:
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a