wire.less.dk

wireless networking, free software, solar power

Raspberry Pi filesharing server with ownCloud – [IPv6 enabled::!]

Posted on | March 19, 2015 | No Comments

(On the occasion of the IPv6 sessions at http://wireless.ictp.it/school_2015/ if you are interested in a workshop on this, please contact us!)

 

How to set up a Raspberry PI, IPv6 enabled filesharing server with ownCloud

 

1/ Install Ubuntu or Debian or similar

on a Raspberry PI – a PI2 is best.

help on installation is at: http://raspberry.org

2/ USB stick: plug in and mount

On the command line of you Pi, do the following

#cd /dev

and then plug in a USB stick and see what device name it shows up as.
typically it is

/dev/sda1

or similar.
if in doubt, take USB stick out,
#ls /dev

and plug in again, until you see the device name.

you can also do a

#grep sd /var/log/kern.log

or

#grep usb /var/log/kern.log

to help you find it.

in what follows, we assume it is

/dev/sda1
#mkdir /media/usbstick

and mount it:

#mount -t vfat -o rw /dev/sda1 /media/usbstick/

3/ ownCloud

install ownCloud:

#cd /home/<your username>
#sh -c “echo ‘deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_14.04/ /’ >> /etc/apt/sources.list.d/owncloud.list”
#apt-get update
#wget http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_14.04/Release.key
#apt-key add – < Release.key
#apt-get update
#apt-get install owncloud

put the data directory on the stick and symlink it:

#cd /var/www/owncloud/
#mkdir /media/usbstick/data
#cp -R ./* /media/usbstick/data/
#rm -rf ./data
#ln -s /media/usbstick/data/

 

 

Instead of the symlink, you could also edit

config/config.php

in your owncloud directory, and point at the data directory on the usb stick:

  ‘datadirectory’ => ‘/path/to/your/data’,

At this point, you should have an ownCloud server, reachable on

http:///owncloud

4/ Make it IPv6

Edit your apache’s site configuration

#vi /etc/apache2/sites-enabled

to start with this:

<VirtualHost [2001:760:2e0b:1728:ba27:ebff:fe97:18da]:80>
ServerName your.server.name.org

of course you do this with your IPv6 address, which you can find by doing

#ifconfig

Then restart apache:

#apache2ctl restart

you should now have an IPv6 ownCloud server.

5/ Put this on your home’s DSL (or what your connection might be)

If you do this at home, you might now want to put this on your routers’ DMZ.

Comments

Leave a Reply