Part 1: Introduction
Part 2: Installing Debian 8
Part 3: Installing ownCloud 8
Part 4: Connecting to Active Directory
Part 5: Security
Part 6: Miscellany
Part 7: Server maintenance

The download bit
I’m installing on a 64bit vm. 32 or 64bit shouldn’t make any difference for this project. You can install both 32 and 64bit on a 64bit host; you can’t install a 64bit guest on a 32bit host.

Download the small installation image from https://www.debian.org/distrib/, not the complete installation. Use the torrent if you can or ftp/html if you must.

The difference between the small and the complete installation is that the small installation does not have all possible options on board and downloads what’s missing. It saves the server’s bandwidth by not downloading the portion of the installation that you don’t use.

Choose the most recent Debian release. At the time of writing that’s 8.2.

Creating the VM
Fire up VirtualBox and click the big New button top left.
0c8ad_001
Give the VM a sensible name. I’m calling it ‘owncloud’. This doesn’t have to be the same as the VM’s hostname. Type: Linux. Version: Debian (choose the right bit number).
0c8ad_002
More memory means a faster machine. Less memory means more speed for other processes on the host. If you’re going to use encryption (either in ownCloud itself, the filesystem or SSL) and you have a lot of users more memory is better. Also crank up the number of CPUs if you can spare them. Keep in mind your upload speed may be the bottleneck so experiment to find what works best in your particular situation.0c8ad_003
For this project we’ll create a new virtual disk. It is possible and probably a good idea to use a dedicated storage target (i.e. a local drive or an ISCSI target on your SAN) to store ownCloud’s data on but for now we’ll put everything on one and the same virtual disk.
0c8ad_004
Choose VDI unless you have a reason not to.
0c8ad_005
Choose your disk type. I value space over speed so I choose Dynamic.
0c8ad_006
Choose the size.
0c8ad_007
You have created a VM.
0c8ad_008
Right-click the new VM and choose Settings.
0c8ad_009
Click Storage, right-click the IDE controller’s drive and choose ‘Choose Virtual Optical Disk File…’ and select the Debian ISO file you downloaded earlier on.0c8ad_0100c8ad_011
In the Network section choose Bridged Adapter and select the network interface you use to connect to your AD server. VirtualBox’s Help text provides an excellent discussion on the topic of virtual networking. Read up on it if you need a more interesting network connection on your VM. For now Bridging will do just fine.

Installing Debian
Start the VM.

After the boot screen you’ll be greeted by the Debian installer.oc8ad_012
oc8ad_013
While it is possible to install in other languages I recommend using English because most available information online is in English. It makes it easier to Google the occasional error message.
oc8ad_014
Guess where I am.
oc8ad_015
Unless you have a good reason to do otherwise choose en_US.UTF-8.
oc8ad_016
Choose your keymap. Mine is American English.
oc8ad_017
Configure the network. Let’s try DHCP.
oc8ad_018
Oops. Better try the manual way.
oc8ad_019
oc8ad_020
oc8ad_021
oc8ad_022
oc8ad_023
As stated in the introduction of this article series my AD server’s IP address is 192.168.1.2. I like to have just one source of DNS information in my network (AD’s DNS servers are synchronised so I count them as one). So I choose my AD server as DNS server. It makes it easier to configure other network settings as internal names will properly resolve.
oc8ad_024
Hostname. Not necessarily the VM name but I like to do so anyway: easy to remember.
oc8ad_025
The domain name doesn’t have to mirror the domain name but things are a lot easier if addresses resolve properly.
oc8ad_026
oc8ad_027
Set the root password.

Then do it again.oc8ad_028
Enter your name. I tend to just fill out my name twice in all lowercase. You probably don’t have to do it but it prevents typos I guess.
oc8ad_029
Enter a username.
oc8ad_030
And of course a password.oc8ad_031
The quick and easy way to partition is the first option: ‘Guided – use entire disk’. For a production machine you would probably choose an other option the first one is perfectly valid.
oc8ad_032
Choose the disk. The only disk shown is the virtual disk you created earlier.oc8ad_033
Choose ‘All files in one partition’ unless you have a reason not to.oc8ad_034
Write the changes to disk.oc8ad_038
Just do it already.oc8ad_039
And now… we wait.
oc8ad_040oc8ad_041
Since we’re using the small installation disc we need to get the remainder of the installation files from a network mirror. Choose a location close to you.
oc8ad_042
One of the defaults will probably work.
oc8ad_043
I’m not using a proxy.
oc8ad_044
Time for coffee.
oc8ad_045
I like to contribute to the popularity contest but this is completely optional.
oc8ad_046
We’re installing a server, not a workstation. So uncheck Debian desktop environment and just select ‘web server’, ‘SSH server’ and ‘standard system utilities’. In case you’re wondering: the ‘standard system utilities’ are libraries, documentation, common tools such as whois and package management utilities. Also a DHCP client and some other common network tools. Leave it checked.
oc8ad_047
More coffee \o/
oc8ad_048
Install the GRand Unified Bootloader to your virtual drive…
oc8ad_049
…which is device /dev/sda.
oc8ad_050
Hit Continue. Then wait for the VM to reboot.
oc8ad_051
There we are.

Log in as root. Since we installed from the small installation disc the /etc/apt/sources.list is already in order and the system is up to date.
By default you can’t SSH into the system as root and it’s a good idea to keep it that way, so let’s set up sudo to make things a bit easier:

# aptitude install sudo 

Add user vorkbaard to the sudoers group:

# usermod -G sudo vorkbaard

Now if you want to perform multiple operations as root do

$ sudo su

and you’ll get a root prompt.

Next time you need to access your ownCloud server, do it from an SSH client like PuTTY. Log in with your regular username and sudo to root.

oc8ad_052

Next up: installing ownCloud.