Tuesday, 14 January 2014

OwnCloud Raspberry Pi




Owncloud is like dropbox, but then local and hosted on your OWN Raspberry Pi!
Features of Owncloud:
Acces your data
Sync your data
share your data
Calendar share
And more!

Here we go!

sudo aptitude install nginx php5-fpm php5-sqlite php5-gd
[ENTER]
cd /etc/nginx/sites-available
[ENTER]
sudo nano owncloud.vhost
[ENTER]
Copy this txt info the owncloud.vhost file

# redirect http to https.
#server {
#  listen 80;
#  server_name owncloud.example.org;
#  rewrite ^ https://$server_name$request_uri? permanent;  # enforce https
#}
 
# owncloud (ssl/tls)
server {
  #listen 443 ssl;
  listen 80;
  #ssl_certificate /etc/nginx/certs/server.crt;
  #ssl_certificate_key /etc/nginx/certs/server.key;
  #server_name localhost;
  root /usr/share/nginx/www/owncloud;
  index index.php;
  client_max_body_size 1000M; # set maximum upload size
 
  # deny direct access
  location ~ ^/(data|config|\.ht|db_structure\.xml|README) {
    deny all;
  }
 
  # default try order
  location / {
    try_files $uri $uri/ @webdav;
  }
 
  # owncloud WebDAV
  location @webdav {
    fastcgi_split_path_info ^(.+\.php)(/.*)$;
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    #fastcgi_param HTTPS on;
    include fastcgi_params;
  }
 
  # enable php
  location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    #fastcgi_param HTTPS on;
    include fastcgi_params;
  }
}




sudo ln -s /etc/nginx/sites-available/owncloud.vhost /etc/nginx/sites-enabled/
[ENTER]
sudo nano /etc/php5/fpm/php.ini
ADD THE FOLLOWING:
extension=sqlite.so
extension=zip.so
extension=json.so
extension=xmlrpc.so
extension=curl.so
extension=gd.so
Hit control + X to close/save the file.
Now download Owncloud. 
Check the website for the newest release: http://mirrors.owncloud.org/releases/
cd /home/pi
[ENTER]
wget http://download.owncloud.org/community/owncloud-4.5.7.tar.bz2
[ENTER]
sudo tar -xjf owncloud-4.5.7.tar.bz2

(CHANGE THE 4.7.5 TO THE CURRENT VERSION)

sudo chown -R www-data:www-data owncloud
[ENTER]
sudo mkdir /usr/share/nginx/www/owncloud[ENTER]sudo mv owncloud /usr/share/nginx/www/
[ENTER]
sudo /etc/init.d/nginx start[ENTER]sudo nano /etc/php5/fpm/php.ini
And change the  
upload_max_filesize = 2M (from 2MB to the max size you want)
post_max_size = 6M (To the size you want)

Reboot your raspberry pi:
Sudo reboot now
[ENTER]

Now acces the Owncloud page! http://RASPBERRYPIIPADRES




Register your own account, you are good to go!

Raspberry Pi CherryMusic - Music Streaming - Spotify look-a-like


A music streaming server written in python, Stream your own music collection to all your devices!
* You can listen to your music on all HTML5 compliant devices, that includes your pretty smart phone (Android or iPhone) as well as just about any modern browser.
* You can create accounts for your friends and share playlists. Just like ol'times, give away a cassette tape.* CherryMusic can automatically fetch the album cover art for all your music. But don't worry, we don't change anything in your collection.* CherryMusic has a built-in database, that will index your music. Find your favorite song in an instant!* And for those who have AppleTV, yes! It does also work with Apple TV.
Tested CherryMusic Raspberry pi by my self now for a few hours, it's great! And it's so easy to install..
How to install:

mkdir /home/pi/music
sudo apt-get -y install imagemagick vorbis-tools lame flac
git clone -b master https://github.com/devsnd/cherrymusic.git

Run python cherrymusic --setup --port 8080 in the CherryMusic directory.
Go to http://raspberry-pi-ip-adres:8080 for basic configuration and later the web client. 

Setup looks like this, edit the Media base dir. That's the important one!


Settings saved? Control + C to close server.

In my case, the config file was not saved. Let's edit the file manually: nano /home/pi/.config/cherrymusic/cherrymusic.conf
Edit the basedir to: /home/pi/Music
Control + x to close/save the file.
python cherrymusic to start the server!

Go to: http://raspberry-pi-ip-adres:8080

The putty session must be active. If you close the session. The server will stop.
2 options to run the server in the background.
1: start server with command: nohup  python cherrymusic --port 8080 &
2: Use the program "screen" to keep the putty session alive!

Note: Music files with special characters in it, like: Ø é ü wont load in the playlist. Change it to normal characters. Problem probably only occur with python 2.x

taken from - http://raspberrypihelp.net/tutorials/44-raspberry-pi-cherrymusic-music-streaming

Amazon

Donate

Donate Towards More Raspberry PI's for Projects