If you don't want to go through the steps for downloading and setup up the software you can download the image I have setup from here. While I have done everything I can to check this is working it should be understood that you use at your own risk. If you do download the image you can skip to step 5.
Step 1: What you need
An Usb External Harddisk or a USB Drive
An Enclosure for the Raspberry Pi and Hard Disk
Wireless network card (optional)
Step 2: Setting up the network download the software
$ sudo nano /etc/network/interfaces
Once open we need to make the file look like this (your IP address might be different)
auto eth0
iface eth0 inet static
address 192.168.1.118
gateway 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
The file then needs to be saved by pressing ctrl o and ctrl x to exit
once exited the networking need to be restarted
$ sudo /etc/init.d/networking restart
After that is done we need to update the Pi and download the software. This will take a little while to complete
$ sudo apt-get update
We are going to install Apache with SSL, PHP5, PHP APC which will load pages faster
$ sudo apt-get install apache2 php5 php5-json php5-gd php5-sqlite curl libcurl3 libcurl4-openssl-dev php5-curl php5-gd php5-cgi php-pear php5-dev build-essential libpcre3-dev php5 libapache2-mod-php5 php-apc gparted
Step 3: Configuor php & Apache
First off we need to install PHP apc
$ sudo pecl install apc
After that is done we need to create the apc.ini
$ sudo nano /etc/php5/cgi/conf.d/apc.ini
In to that file we need to add the following
extension=apc.so
apc.enabled=1
apc.shm_size=30
Once added the file needs saving
Next up we have to change the PHP.ini to change the max upload file so we can add large file and add the APC externsion to PHP
$ sudo nano /etc/php5/apache2/php.ini
In this file we need to find upload_max_filesize and then change the value to 1024M which will allow files of upto 1GB to be uploaded
The we need to find post_max_size and then chaged the value to 1200m which will allow files to upto 1 gb to be uploaded
We need to find externsion= section and add in the extension=apc.so
After we have done that save and exit
next up we need to config apache and enable SSL
$ sudo nano /etc/apache2/sites-enabled/000-default
inside the file we need to change Allow over ride to All from none
Next up we need to setup SSL
$ sudo a2enmod rewrite
$ sudo a2enmod headers
After the follow command you will be asked to provide information
sudo openssl genrsa -des3 -out server.key 1024; sudo openssl rsa -in server.key -out server.key.insecure;sudo openssl req -new -key server.key -out server.csr;sudo openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt;sudo cp server.crt /etc/ssl/certs;sudo cp server.key /etc/ssl/private;sudo a2enmod ssl;sudo a2ensite default-ssl
Once all that is done the apache need restarting
$ sudo service apache2 restart
Step 4: Download and install own cloud
$ wget http://mirrors.owncloud.org/releases/owncloud-4.5.1.tar.bz2
once download it needs unziping
$ sudo tar -xjf owncloud-4.5.1.tar.bz2
And then copying in to the web root
$ sudo cp -r owncloud /var/www
After it's been copied we need to give the webserver permission to access the owncloud directory
$ sudo chown -R www-data:www-data /var/www/owncloud/
We also need to edit the .htaccess file to change the max upload file these values need to changed to the same values as you set in you php.ini
$ sudo nano /var/www/owncloud/.htaccess
Step 5: Setup own cloud
$ startx
and the from inside the GUI open a ternmail and type
$ sudo gprarted
from here you can partion and format the drive
Once done give the web-server permission
$ sudo chown -R www-data:www-data /media/owncloud
All that needs to be done now is to setup owncloud
in a web browser type in https://IPADDRESS/owncloud
Choose a user name and password by typing then in to the user name and password box
click advanced and changed the data location to the place of your external drive in my case it's /media/owncloud
The click finish and you are done.
You should now be able to upload files. To play video files you'll need to enable the video player app.
To setup external access to your device I would suggest using DyDns or Noip.
Step 6: Placing it in the encloser
And that's it done.













































Visit Our Store »
Go Pro Today »




99.9% of the general population has no idea what open source is or cares about the ideology. They are not developers and they just want something that works. My neighbors and friends have no clue about what open source is when I bring it up in a discussion, and they all seem to concur about going with a product supported by a company.
BTW, although Real Time Logic could close the project, the software would still be available on the Internet for eternity. Just because software is old and not maintained does not mean it's not useful. I still prefer XP over Windows 8. In any event, I find it extremely unlikely that Real Time Logic would close the project. Just because something is open source does not mean that it could not be shut down or maintained.
Owncloud is extremely slow on the Raspberry Pi. You should check out the following benchmarking, which shows how BarracudaDrive outperforms all major servers such as Apache and Nginx by a large margin.
http://barracudadrive.com/blog/2013/03/Apache-Nginx-Lighttpd-Monkey-and-BarracudaDrive-Speed-Test
http://store.raspberrypi.com/projects/barracudadrive
wget http://mirrors.owncloud.org/releases/owncloud-4.5.7.tar.bz2
sudo tar -xjf owncloud-4.5.7.tar.bz2
Following these instructions (http://www.stuffaboutcode.com/2012/06/raspberry-pi-access-from-internet-using.html) I've set up the no-ip account, got a host and set the client running on the Rpi (which has a fixed internal IP address) but all I'm seeing when I put in http address in the browser (http://myname.no-ip.org) is the home page of my router. I see from other posts I need to set up port forwarding but I'm a bit new at this and can't work out which port I need to forward. I guess I'm then forwarding that port to the fixed IP address of my RPi. Once I've done this, what shoud I expect to see? Grateful for your views
Or give instructions on how to update from version 4.51?
Thanks in advance!
From http://software.opensuse.org/download/package?project=isv:ownCloud:community&package=owncloud
For Debian 6.0 run the following as root:
echo 'deb http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/ /' >> /etc/apt/sources.list.d/owncloud.list
apt-get update
apt-get install owncloud
You can add the repository key to apt like this:
wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_6.0/Release.key
apt-key add - < Release.key
Cheers! Thanks for the guide.
make sure /media/owncloud is mounted. From the command prompt type:
mount
And see (mine was /dev/sdb1) the usb drive mounted (you'll see /media/owncloud). If not simply type:
mount /dev/sdb1 /media/owncloud
I get to step 5 and enter
$ sudo chown -R www-data:www-data /media/owncloud
and I get
chown: cannot access '/media/owncloud': no such file or directory?
I am a noob to all this so any help would be grateful.
many thanks
Phil
I am able to upload tons of pics with no issue. I see in php.ini the max upload size is set to 1200MB - is that too large perhaps? I also saw the temp directory location commented out so I un-commented it and created a tmp directory in /media/owncloud/tmp (and added it to the path in the .ini) - however, it still fails.
Any suggestions? Cheers
Thanks for the great write up
My isp blocks port 80 so i can't access owncloud through my DyDNS url.
I currently have a DyDns account setup and working for monitoring my torrent client when outside the network. (i access through http://mydyndnsurl.dyndns-free:port)
Would it be possible to access Owncloud through the same DyDns url on an alternate port? If so could you provide some instructions, i'm still learning the basics of debian and server administration.
Thanks again for the guide.
I took the easy way and started off trying the image file you'd created. There is a problem though, I can't bypass login, and I think it's your username/password information I have to use.
Thanks in advance,
if I'm just a big douche that misunderstood something simple, I'm sorry
MutatioM
It would be handy for me and others who are less familiar with the Pi and getting started if you would either explain how or point to where to get info on how to go from Step 1 to Step2. ie: Get the Pi ready to Set up the network and download the software.
I may just use your image - thanks for them - but there is a part of me that likes tinkering and it would be fun to go through the process.
In the meantime I will be trying to figure it out.
Thanks again
Steve
Wouldn't using nginx speed it a bit up?
Using nginx might speed it a bit but it seems to be going at an acceptable speed and I've been using apache for about 12 years so am just more use to it.