Install OwnCloud on Raspberry Pi with Raspbmc

Tutorials on ownCloud administration
Forum rules
The forums were migrated over to https://central.owncloud.org which is based on the forum software Discourse. The forums here is put into read-only mode starting from today.

More background information about this move and the reasoning behind it is available in this blogpost:

https://daniel.molkentin.net/2016/07/20 ... d-central/
aelg305
Beginner
Posts: 22
Joined: Tue May 21, 2013 11:57 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Windows Desktop
PHP version: 5.4.12

Install OwnCloud on Raspberry Pi with Raspbmc

Postby aelg305 » Mon Dec 23, 2013 10:04 pm

My setup:
Pi B 512Mb
1TB external hard drive
OC 6.0, Raspbmc, Apache, PHP, MySQL, TTRS (Tiny TIny Rss)


I recently got a Raspberry Pi, and I was unable to find a good tutorial to install OwnCloud on it.... so.... here it goes:

Couple of things: I call my OwnCloud = Cloud
Sometimes you need to edit certain files, the command line is in italic and the code to input is in

Code: Select all

code
format, so you can copy the italic part and paste it on your terminal and then to open the file, the just simply edit where need it, hope this is not confusing.

-1-Lets start:
    download raspbmc from http://www.raspbmc.com/download/to your pc
    -install Raspbmc to your SD (fix ip for ease of setup)
    -insert SD in Pi and let it boot (takes a while!)
    -setup your Pi on the 1st run with a monitor/keyboard attached in order to update the following:
en_US.UTF
select locale



-2-Connect to your Pi from your PC:
-Open your SSH Client (putty recommended)
-type the fixed ip from prior step
-login: pi password: raspberry
(highly recommended to change this ASAP, just type passwd)


-3-configure for ssh external (fwd port 22 from the router)
sudo nano /etc/network/if-up.d/secure-rmc

add this line:

Code: Select all

iptables -A INPUT -p tcp --dport 22 -j ACCEPT

Code: Select all

iptables -A INPUT -p tcp --dport 80 -j ACCEPT
- (I found that for some reason my intranet would allow the connection to port 80.... but when I use the NoIp service, I cant access the port externally unless I use this line! any recommendation/proper way to setup would be highly appreciate it - I know this is not the best way!)
before this line "iptables -A INPUT -i $IFACE -j DROP"
sudo reboot


-4-edit the config file to free some memory:

sudo nano /boot/config.txt
edit mem to 16

When done, save it and then type in the cmd line type:

Code: Select all

reboot



-5-force raspbmc to update:

Code: Select all

sudo -s
cd /scripts/upd_sys
rm *.sh
wget http://svn.stmlabs.com/svn/raspbmc/release/update-system/getfile.sh
wget http://svn.stmlabs.com/svn/raspbmc/release/update-system/cdn_env_prep.sh
reboot



-6-run some more updates:

Code: Select all

sudo apt-get update


Currently "apt-get upgrade" is having issues, recommending not to use


-7-create permissions for your folders:

Code: Select all

sudo groupadd www-data
sudo usermod -a -G www-data www-data



-8-install screen, Apache, PHP, MySQL, PHPMyAdmin and dependencies (after MySQL and PHPMyAdmin, the system will ask for settings like password for the database, etc, look carefully into these and write them down!):

Code: Select all

sudo apt-get install screen apache2 php5 libapache2-mod-php5 php-pear php-apc php5-cli php5-common php5-gd php5-imap php5-mysql php5-bz2 php5-ctype php5-exif php5-iconv php5-intl php5-json php5-ldap php5-libxml php5-mb php5-mcrypt php5-openssl php5-SimpleXML php5-zlib php-xml-parser zip bzip2 curl libcurl3 libcurl3-dev make gcc php5-domxml unzip lbzip2 bzip2 openssl mysql-server phpmyadmin


*make sure no erros are produce during this step, if any package is not going through, try installing on its own


-9-add to the end of the file:
sudo nano /etc/apache2/apache2.conf

Code: Select all

ServerName cloud
Include /etc/phpmyadmin/apache.conf



-10-Edit
(add):
sudo nano /etc/hosts

Code: Select all

127.0.1.1 cloud


(edit) - (shit+w for lookup)
sudo nano /etc/apache2/sites-enabled/000-default

change: "allowOverride none" to All

Code: Select all

Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow, deny
allow from all
(apache 2.4= "Require all granted")

(edit) - (shit+w for lookup)
sudo nano /etc/php5/apache2/php.ini
upload_max_filesize = 2G
post_max_size = 2G


-11-delete old index, start engines:
*****

Code: Select all

sudo rm /var/www/index.html
- not mandatory!

Code: Select all

sudo a2enmod rewrite
sudo a2enmod headers
sudo /etc/init.d/apache2 restart



-12-install owncloud (version 6.0 at the time of writting the tutorial) and ttrs (tiny tiny Rss):

Code: Select all

cd
wget http://download.owncloud.org/community/[b]owncloud-6.0.0a.tar.bz2[/b]
tar xvf owncloud-6.0.0a.tar.bz2


Code: Select all

cd
wget https://github.com/gothfox/Tiny-Tiny-RSS/archive/[b]1.10.tar.gz[/b]
tar xvf 1.10.tar.gz



-13-move the files to the correct path:

Code: Select all

cd
sudo mkdir /var/www/cloud
sudo mv owncloud/* /var/www/cloud
sudo mv owncloud/.htaccess /var/www/cloud


Code: Select all

cd
sudo mkdir /var/www/reader
sudo mv [b]Tiny-Tiny-RSS-1.10[/b]/* /var/www/reader
sudo mv [b]Tiny-Tiny-RSS-1.10[/b]/.htaccess /var/www/reader



-14-install no-ip (for remote access)(version 2.1.9-1 at the time of writing this tutorial):

Code: Select all

mkdir /home/pi/noip
cd /home/pi/noip
wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz
tar vzxf noip-duc-linux.tar.gz
cd [b]noip-2.1.9-1[/b]
sudo make
sudo make install
sudo /usr/local/bin/[b]noip2[/b]
sudo [b]noip2[/b] - C
(press enter and input your no-ip login / password)



-15-clean up

Code: Select all

sudo rm -rf cloud owncloud-6.0.0a.tar.bz2 reader 1.10.tar.gz Tiny-Tiny-RSS-1.10 OwnCloud noip



-16-install external hard drive for extra capacity/storage:

Code: Select all

sudo fdisk -l


replace below where yourUSBdrive, with the actual name of your drive:

Code: Select all

sudo mkdir -p /media/[b]yourUBSdrive[/b]/owncloud/data
sudo mount /dev/sda /media/[b]yourUBSdrive[/b]
sudo nano /etc/fstab


make it writable:

Code: Select all

sudo chown -R www-data:www-data /var/www
sudo chown -R www-data:www-data /media/[b]yourUSBdrive[/b]/owncloud/data
sudo /etc/init.d/apache2 start



-17-Enabling SSL:

Code: Select all

sudo mkdir -p /etc/ssl/localcerts
openssl req -new -x509 -days 3650 -nodes -out /etc/ssl/localcerts/autosigned.crt -keyout /etc/ssl/localcerts/autosigned.key
chmod 600 /etc/ssl/localcerts/*
sudo service apache2 restart



-18-reboot and run and test:

Code: Select all

sudo reboot




:) happy testing!
Questions comments/concerns, feel free to contact me.

reference:
http://www.forum-raspberrypi.de/Thread- ... lternative
I have
OC 7.0.1
Raspberry Pi + Debian 7.0
Apache 2.0
Postcprl

sbrnaderi
Newbie
Posts: 1
Joined: Sun Dec 29, 2013 3:10 pm
ownCloud version: 6.0.0a
Webserver: Apache
OS: Linux

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby sbrnaderi » Sun Dec 29, 2013 4:23 pm

Thanks for this nice tutorial. I installed Owncloud on my Rbmc and initially it worked perfectly. However after rebooting my system I cannot access any of the webservers on my pi. The webservers that I have are XBMC webserver, tranmission-deamon and apache2. Any idea how I can check what causes this?

What I've already checked:
- ssh connection to Rbmc works. I have assigned a domain name to the pi and I can access it using this domain name.
- apache2 and transmission-daemon are up and running without any error. I restarted them and they both seem to work perfectly.

aelg305
Beginner
Posts: 22
Joined: Tue May 21, 2013 11:57 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Windows Desktop
PHP version: 5.4.12

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby aelg305 » Sun Dec 29, 2013 5:20 pm

recently I read that running the apt-get update and upgrade will most likely break your xbmc install, and to only run the upgrade from within the xbmc server, so I had to re install everything. I will most likely update the tutorial since there is several updates I found and are most needed. allow me a couple of days while I get back home.
I have
OC 7.0.1
Raspberry Pi + Debian 7.0
Apache 2.0
Postcprl

HelasBrice
Newbie
Posts: 2
Joined: Wed Jan 01, 2014 9:03 pm
ownCloud version: 4.5.2
Webserver: nginx
Database: SQLite
OS: Linux

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby HelasBrice » Fri Jan 03, 2014 9:58 am

I have done,

Cheers.

Jarulf
Newbie
Posts: 3
Joined: Tue Jan 07, 2014 2:33 pm

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby Jarulf » Tue Jan 07, 2014 2:38 pm

Hi and thanks for a great tutorial. I'm running into a little problem however when installing PHP.

Note, selecting 'php5-common' instead of 'php5-json'
Note, selecting 'libcurl4-openssl-dev' instead of 'libcurl3-dev'
E: Unable to locate package php5-bz2
E: Unable to locate package php5-ctype
E: Unable to locate package php5-exif
E: Unable to locate package php5-iconv
E: Unable to locate package php5-libxml
E: Unable to locate package php5-mb
E: Unable to locate package php5-openssl
E: Unable to locate package php5-SimpleXML
E: Unable to locate package php5-zlib
E: Unable to locate package php5-domxml


Have these packages been changed?

nielshansen
Newbie
Posts: 2
Joined: Tue Feb 25, 2014 10:06 pm
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.2

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby nielshansen » Tue Feb 25, 2014 10:10 pm

I have the exact same problem as #5.

My installation is based on Raspbian instead of raspbmc. Is this the problem?

fcturner
Newbie
Posts: 9
Joined: Fri Feb 28, 2014 2:17 pm
ownCloud version: 6.0.5
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.4-14+deb7u8

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby fcturner » Fri Feb 28, 2014 2:23 pm

nielshansen wrote:I have the exact same problem as #5.

My installation is based on Raspbian instead of raspbmc. Is this the problem?

It might, since I too had this problem with your setup.

But, it worked perfectly without the packages named in #5. I just tried without them, and haven't had a problem since. All functions of OwnCloud are working as far as I know. I used 6.0.1 by the way, using this tutorial.

The line without those packages so you can copy and paste:

Code: Select all

sudo apt-get install screen apache2 php5 libapache2-mod-php5 php-pear php-apc php5-cli php5-common php5-gd php5-imap php5-mysql php5-intl php5-json php5-ldap php5-mcrypt php-xml-parser zip bzip2 curl libcurl3 libcurl3-dev make gcc unzip lbzip2 bzip2 openssl mysql-server phpmyadmin

Greetings

nielshansen
Newbie
Posts: 2
Joined: Tue Feb 25, 2014 10:06 pm
ownCloud version: 6.0.1
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.2

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby nielshansen » Mon Mar 03, 2014 10:10 am

fcturner wrote:
nielshansen wrote:I have the exact same problem as #5.

My installation is based on Raspbian instead of raspbmc. Is this the problem?

It might, since I too had this problem with your setup.

But, it worked perfectly without the packages named in #5. I just tried without them, and haven't had a problem since. All functions of OwnCloud are working as far as I know. I used 6.0.1 by the way, using this tutorial.

The line without those packages so you can copy and paste:

Code: Select all

sudo apt-get install screen apache2 php5 libapache2-mod-php5 php-pear php-apc php5-cli php5-common php5-gd php5-imap php5-mysql php5-intl php5-json php5-ldap php5-mcrypt php-xml-parser zip bzip2 curl libcurl3 libcurl3-dev make gcc unzip lbzip2 bzip2 openssl mysql-server phpmyadmin

Greetings


Tanks. But what does the modules we can't install do?

fcturner
Newbie
Posts: 9
Joined: Fri Feb 28, 2014 2:17 pm
ownCloud version: 6.0.5
Webserver: Apache
Database: MySQL
OS: Linux
PHP version: 5.4.4-14+deb7u8

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby fcturner » Fri Mar 07, 2014 11:14 pm

I don't know. But I have found a Raspbian package list, split into categories.

Of course, unavailable packaged aren't listed. I guess they are replaced by newer packages (which I apparently haven't installed). But then again; don't fix what isn't broken :D

As I said, my ownCloud is running perfectly.

aelg305
Beginner
Posts: 22
Joined: Tue May 21, 2013 11:57 pm
ownCloud version: 5.0.10
Webserver: Apache
Database: MySQL
OS: Windows Desktop
PHP version: 5.4.12

Re: Install OwnCloud on Raspberry Pi with Raspbmc

Postby aelg305 » Tue Mar 11, 2014 7:54 pm

I put together this tutorial to have the following systems workings under one: OwnCloud, TinyTny RRS and Ninja Blocks (next app to be added: xbmc, but currently under development - memory its a big issue)

For those that have not read about NinjaBlocks, its basically in a nutshell a sensor added to your Pi, so, if you buy the HUE phillip light bulbs, or a door bell with 433mhz capabilities, you in turn could control or set rules to use these devices with your Pi!

My Setup:
-Raspberry Pi B
-LAN connection
-SD 8GB
-Ninja Pi Crust

Installed Packages:
-Raspbian 2013-02-09 (apparently NB has compatibility issues with newer versions - suggestion appreciate it)
-Apache 2
-PHP5
-MySQL
-PHPMyAdmin

Tutorial can be found under: http://andreslopez.us/blog/?p=483
Updates, corrections, comments; are always welcome.
setting up OwnCloud after installation should be similar to my original post.
I have
OC 7.0.1
Raspberry Pi + Debian 7.0
Apache 2.0
Postcprl


  • Similar Topics
    Replies
    Views
    Last post

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 2 guests