Owncloud: Difference between revisions

From Alpine Linux
(to be mergeg)
Line 43: Line 43:


{{Cmd|cd /usr/share/webapps/  
{{Cmd|cd /usr/share/webapps/  
wget wget http://owncloud.org/releases/owncloud-3.0.2.tar.bz2}}
wget http://owncloud.org/releases/owncloud-4.0.7.tar.bz2}}


* Unpack  
* Unpack  


{{Cmd|tar xfj owncloud-3.0.2.tar.bz2
{{Cmd|tar xfj owncloud-4.0.7.tar.bz2
rm owncloud-3.0.2.tar.bz2}}
rm owncloud-4.0.7.tar.bz2}}


* Change Folder Persmissions
* Change Folder permissions


{{Cmd|chown -R lighttpd:lighttpd /usr/share/webapps/owncloud}}
{{Cmd|chown -R lighttpd:lighttpd /usr/share/webapps/owncloud}}

Revision as of 15:56, 7 October 2012

This material is proposed for merging ...

It should be merged with OwnCloud. (Discuss)

What is ownCloud?

ownCloud gives you easy and universal access to all of your files. It also provides a platform to easily view, sync and share your contacts, calendars, bookmarks and files across all your devices. ownCloud 3 brings loads of new features and hundred of fixes…

  • Sharing at the click of a button

We like to share things, so we made sure you can do that easily. You can share files with other users in your ownCloud instance or through a public link that you can send to anyone. Can be used as an open source dropbox alternative too.

  • Explore your photos

ownCloud features a photo gallery application to help, view and organize photos of different file types. Photo albums are automatically created for uploaded photos and make it easy to scroll through your pictures.

  • Edit your files on the go

With ownCloud, you can access and edit your documents in multiple ways. You can edit text files directly in your browser with the online text editor, or mount your files locally via WebDAV, viewing and editing them with the desktop apps you are used to.

Set up ownCloud on Alpine Linux

This document will be a quick c/p guide to setup this file sharing system on Alpine linux. What we will setup is the following:

  • Lighttpd with PHP
  • MySql
  • ownCloud

Install lighttpd, PHP, and MySql

Basic Installation

For installing the additional packages first activate community packages and update the package index

Install the required packages:

# apk add lighttpd php82 fcgi php82-cgi

Configure Lighttpd

Edit lighttpd.conf (/etc/lighttpd/lighttpd.conf) and uncomment the line:

Contents of /etc/lighttpd/lighttpd.conf

... include "mod_fastcgi.conf" ...

Edit mod_fastcgi.conf (/etc/lighttpd/mod_fastcgi.conf), find and change /usr/bin/php-cgi to /usr/bin/php-cgi82.

Contents of /etc/lighttpd/mod_fastcgi.conf

... "bin-path" => "/usr/bin/php-cgi82" # php-cgi ...

Start lighttpd service and add it to default runlevel

# rc-service lighttpd start # rc-update add lighttpd default

Install extra packages:

apk add php-mysql mysql mysql-client

Installing and configuring ownCloud

Install ownCloud

  • Make webapps folder

mkdir /usr/share/webapps/ -p

  • Download

cd /usr/share/webapps/ wget http://owncloud.org/releases/owncloud-4.0.7.tar.bz2

  • Unpack

tar xfj owncloud-4.0.7.tar.bz2 rm owncloud-4.0.7.tar.bz2

  • Change Folder permissions

chown -R lighttpd:lighttpd /usr/share/webapps/owncloud

  • Make symlinks to ownCloud

ln -s /usr/share/webapps/owncloud/ /var/www/localhost/htdocs/owncloud

Config and start MySql

/usr/bin/mysql_install_db --user=mysql /etc/init.d/mysql start && rc-update add mysql default /usr/bin/mysqladmin -u root password 'password'

Create the ownCloud database

mysql -u root -p

CREATE DATABASE owncloud; GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'owncloud password'; FLUSH PRIVILEGES; EXIT

Config your ownCloud

  • Browse

http://WEBSERVER_IP_ADDRESS/ownCloud/

  • "Create a administrator account"
  • User Name: <username> - new admin username
  • Password: <password> - new admin password
  • "Set the storage folder:"
  • </usr/share/webapps/owncloud/data> - Storage folder
  • "Configure the database"
  • User Name: <username> - db admin username
  • Password: <password> - db admin password
  • Database Name: owncloud - db name
  • Database Host: localhost - db host


After you've done that, click "Complete Installation"

You have ownCloud working, to access go to http://WEBSERVER_IP_ADDRESS/owncloud and enjoy!

Note: You will need to create at least one user.

WebDAV

You can access ownCloud directly via WebDAV, as an Dropbox alternative.

Here we will explain how to setup WebDAV access on several Operating Systems. Some applications only allow you to save to a local folder. By mounting ownCloud to a local folder, you can get around this issue.

Server configuration

  • Add webdav packages

apk add lighttpd-mod_webdav mod_dav_svn

  • Configure the lighttpd

nano +36 /etc/lighttpd/lighttpd.conf

  • Restart the web server

/etc/init.d/lighttpd restart

  • Confiugre the fstab

nano /etc/fstab

Add:

 usr/share/webapps/owncloud/files/webdav.php /usr/share/webapps/owncloud/<username>/data/ davfs user,rw,noauto 0 0

Change <username> to the username created in the owncloud. e.g. public

mount -a

Client configuration

Windows XP and Vista should work perfectly fine.

In Windows 7, you can map ownCloud as a network folder.

Enable the Webclient service Services.

  • Webclient service (Mouse right click -> Enable)

Modify the registry

  • Change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters\BasicAuthLevel from 1 to 2.
  • Restart Webclient service (Mouse right click -> Restart)

Map the network folder