My ownCloud adventures - Part 1: Installation and Initial Configuration

If you own multiple different computing devices (portable computers and Desktop PCs at different places, Smartphones, tablets, ...) - and I bet you do - then you will sooner or later feel the need to share your personal files between them in a seamless, convenient way. You may e.g. want to have your music files and pictures available on any device at any place without manually copying them around. This is why using a Cloud Storage provider is becoming more and more popular: Dropbox, Google Drive,, ... just to name a few. They will offer you a limited amount of online storage for free - if you pay them a monthly fee then you will get more. However, if you want to have a lot of space (1 TB, 2 TB?) then this will get very expensive ... and there are also other concerns: Data security, privacy, ...

Luckily there is software available that enables you to be your own Cloud Storage provider like the Open Source solution ownCloud. I have started playing with ownCloud in my hosted virtual lab and will blog about how I got this up and running, configured for my needs, and what else is needed to make good use of it. This first post is about installing and initial configuration.

Importing the Bitnami ownCloud stack appliance

I like the idea of providing complex applications as virtual appliances. OwnCloud relies on Apache, MySQL and PHP. There is extensive documentation available on the ownCloud web site to put all the pieces of the puzzle together, but I wanted to save time and work, and so I decided to download a pre-installed virtual appliance with ownCloud. There are several choices available, and I picked the BitNami ownCloud stack.

Importing the machine into ESXi was not as straight forward as I thought, because the appliance is not provided in OVF format (that you could just import through the vSphere client), but in VMware Workstation format. It turned out that the best way to deploy to an ESXi 5.x host is to use VMware Converter. In the Bitnami documentation there is misleading information that you should convert the VM to OVF format with an older version of Converter - ignore that. You can use the latest version (5.0.1) of Converter (with ESXi 5.1 you even must use the latest version) to directly upload the machine to the host. In the import wizard be sure to change the VM's disk controller type from auto-select to "SCSI LSI Logic". Otherwise you will end up with an IDE disk.
If you don't want to use VMware Converter you could also upload the VM files to a datastore of your host and convert the disk files into an ESXi compatible format (using vmkfstools -i in an ESXi shell). With ESXi 5.1 you will then run into another issue that I already described in an earlier post. This method also requires you to manually register the VM's configuration file (.vmx) and fixing the virtual hardware (add an e1000 Ethernet adapter and a CD-ROM drive).

Before you go and power on the machine for the first time upgrade its virtual hardware to the latest version (vmx-09 in ESXi 5.1).

Initial configuration steps

After powering on the machine the console will look like this:

BitNami ownCloud VM - initial console
If the machine got an IP address through DHCP (like shown here) then you can immediately start playing with it by pointing your browser to ownCloud's web interface.

However, if you plan to keep it for longer then you should take the time to run through some initial configuration steps - right now or later:

1. Log in on the console as user "bitnami" with password "bitnami". You will be prompted to change the password.

2. If you can not or don't want to use DHCP then set up networking as described in the Ubuntu help docs by editing the file /etc/network/interfaces to define a static IP address and DNS servers for the device eth0. Reboot the machine to make the new settings effective.

3. Enable ssh in Ubuntu like described here. You can then stop using the console and access the machine via an ssh client (like putty) to perform the remaining steps. After logging on as user bitnami run "sudo su -l" to switch to the root account.

4. Install the VMware Tools. This appliance is based on Ubuntu 12.04 with Linux kernel version 3.2.0-31-virtual (determine with "uname -a"). So the following steps are required (taken from the BitNami docs) after mounting the VMware Tools ISO by using the "VM / Guest / Install/Upgrade VMware Tools" menu:
# Install the gcc compiler and kernel headers (Replace
# "3.2.0-31-virtual" with the kernel version from "uname -a")
apt-get update
apt-get install gcc make tar linux-source linux-headers-3.2.0-31-virtual
ln -s /lib/modules/3.2.0-31-virtual/build/include/generated/utsrelease.h /lib/modules/3.2.0-31-virtual/build/include/linux/utsrelease.h
ln -s /lib/modules/3.2.0-31-virtual/build/include/generated/autoconf.h /lib/modules/3.2.0-31-virtual/build/include/linux/autoconf.h
# Mount the Tools CD-ROM to a temp. directory:
cd /tmp
mkdir cdrom
mount /dev/cdrom /tmp/cdrom
# Unpack and install the Tools (The tar.gz file name may differ):
tar xzf /tmp/cdrom/VMwareTools-9.0.0-782409.tar.gz
cd vmware-tools-distrib
./ -d --clobber-kernel-modules=vmxnet3,pvscsi,vmmemctl

These steps worked for me using the Tools of ESXi 5.1.

5. Run tzconfig as root to configure your time zone. To synchronize the clock with an NTP server edit root's crontab file by running crontab -e. Add a line like
    1 * * * * /usr/sbin/ntpdate >/dev/null 2>&1
to run a time sync one minute after each full hour. Adjust the schedule and time server to use as required.

What's next

We now have the BitNami ownCloud stack running in an ESXi VM. In the next part of my ownCloud adventures I will explain
  • how to install a custom SSL certificate and
  • how to use Windows 7 to securely access ownCloud via the WebDAV protocol

No comments:

Post a Comment

***** All comments will be moderated! *****
- Please post only comments or questions that are related to this post's contents!
- Advertising and link spamming will not be tolerated!