Difference between revisions of "OwnCloud"

From Alpine Linux
Jump to: navigation, search
(avail since 2.5)
(Restructuring page)
Line 1: Line 1:
 +
{{draft}}
 
[http://owncloud.org/ ownCloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. You can have your ownCloud instance up and running in 5 minutes with Alpine!
 
[http://owncloud.org/ ownCloud] is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. You can have your ownCloud instance up and running in 5 minutes with Alpine!
  
== Installation ==
+
= Installation =
Currently ownCloud is available from Alpine 2.5 or greater. So, make sure you have it in /etc/apk/repositories. We will install it together with PostgreSQL and lighttpd. SQLite and Apache are also supported (not tested though).
+
{{pkg|ownCloud}} is available from Alpine 2.5 and greater.
  
# apk add owncloud-pgsql lighttpd
+
Before you start installing anything, make sure you have latest packages available. Make sure you are using a 'http' repository in your {{path|/etc/apk/repositories}} and then run:
 +
{{cmd|apk update}}
 +
{{tip|Detailed information is found in [[Include:Upgrading_to_latest_release|this]] doc.}}
  
The web server user needs to have ownership on the following dirs:
+
== Database ==
 +
First you have to decide which database to use. Follow one of the below database alternatives.
 +
=== sqlite ===
 +
All you need to do is to install the package
 +
{{cmd|apk add owncloud-sqlite}}
 +
{{warning|{{pkg|sqlite}}+{{pkg|owncould}} is known to have some problem, so do not expect it work. This note should be removed when {{pkg|sqlite}}+{{pkg|owncould}} works. <br>''(Still a problem at 2012-11-15)''}}
 +
=== postgresql ===
 +
Install the package
 +
{{cmd|apk add owncloud-psql}}
  
* /etc/owncloud
+
Next thing is to configure and start the database
* /usr/share/webapps/owncloud/apps
+
{{cmd|/etc/init.d/postgresql setup
* /var/lib/owncloud/data
+
/etc/init.d/postgresql start}}
  
# chown -R lighttpd.lighttpd /etc/owncloud
+
Next you need to create a user, database and set permissions.
# chown -R lighttpd.lighttpd /usr/share/webapps/owncloud/apps
+
{{cmd|# psql -U postgres
# chown -R lighttpd.lighttpd /var/lib/owncloud/data
+
postgres{{=}}# CREATE USER owncloud WITH PASSWORD '<%STRONG_PASSWORD%>';
 +
postgres{{=}}# CREATE DATABASE owncloud;
 +
postgres{{=}}# GRANT ALL ON DATABASE owncloud TO owncloud;
 +
postgres{{=}}# \q}}
 +
{{note|The above commands creates the user 'owncloud' with a password you provide and the database 'owncloud'. Remember these settings, you will need them later when setting up owncloud}}
  
Make sure you have FastCGI enabled in /etc/lighttpd/lighttpd.conf:
+
=== mysql ===
 +
Install the package
 +
{{cmd|apk add owncloud-mysql}}
  
include "mod_fastcgi.conf"
+
Now configure {{pkg|mysql}}
 +
{{cmd|/etc/init.d/mysql setup}}
 +
{{note|When you configure {{pkg|mysql}} for first time, you will see some instructions on the console. It is wise to do the actions presented on the screen to enhance security of {{pkg|mysql}} }}
 +
Next start the database
 +
{{cmd|/etc/init.d/mysql start}}
  
Consider adding the following line for additional security to the owncloud configuration file, where the password database is stored:
+
== Webserver ==
 +
Next thing is to choose, install and configure a webserver. Choose one alternative from below ''(or setup a webserver of your choise)''
  
url.access-deny = ("config.php")
+
=== lighttpd ===
 +
Install the package
 +
{{cmd|apk add lighttpd}}
  
Start the web server and PostgreSQL:
+
Make sure you have FastCGI enabled in {{pkg|lighttpd}}:
 +
{{cat|/etc/lighttpd/lighttpd.conf|...
 +
include "mod_fastcgi.conf"
 +
...}}
  
# /etc/init.d/lighttpd start
+
Start up the webserver
# /etc/init.d/postgresql start
+
{{cmd|/etc/init.d/lighttpd start}}
  
Create a Postgresql user and database for ownCloud:
+
=== XYZ webserver ===
 +
You could try installing some other webserver and document it here
 +
* Apache2
 +
* cherokee
 +
* other...
  
# psql -U postgres
+
=== Other ===
postgres=# CREATE USER owncloud WITH PASSWORD '<%STRONG_PASSWORD%>';
+
Link owncloud installation to web server directory:
postgres=# CREATE DATABASE owncloud;
+
{{cmd|ln -s /usr/share/webapps/owncloud /var/www/localhost/htdocs/owncloud}}
postgres=# GRANT ALL ON DATABASE owncloud TO owncloud;
 
postgres=# \q
 
  
Link owncloud installation to web server directory:
+
== Other settings ==
 +
=== Hardening ===
 +
Consider adding the following line for additional security to the owncloud configuration file, where the password database is stored:
 +
{{cat|/???/???/???|...
 +
url.access-deny {{=}} ("config.php")
 +
...}}
 +
{{todo|Where should this config go?}}
  
  # ln -s /usr/share/webapps/owncloud /var/www/localhost/htdocs/owncloud
+
=== Folder permissions ===
 +
The web server user needs to have ownership on some dirs. This is fixed by running the following commands:
 +
{{cmd|chown -R lighttpd.lighttpd /etc/owncloud
 +
chown -R lighttpd.lighttpd /usr/share/webapps/owncloud/apps
 +
chown -R lighttpd.lighttpd /var/lib/owncloud/data}}
  
 +
=== Additional packages ===
 
Some large apps, such as texteditor and videoviewer are in separate package:
 
Some large apps, such as texteditor and videoviewer are in separate package:
 +
{{cmd|apk add owncloud-texteditor owncloud-videoviewer}}
  
  # apk add owncloud-texteditor owncloud-videoviewer
+
= Configure and use ownCloud =
 
+
== Configure ==
== Finish Installation and Go! ==
+
Point your browser at <code><nowiki>http://<%MY_SERVER_IP%>/owncloud</nowiki></code> and follow the on-screen instructions to complete the installation, supplying the database user and password created before.
Point your browser at http://<%MY_SERVER_IP%>/owncloud and follow the on-screen instructions to complete the installation, supplying the PostgreSQL user and password created before.
 
  
 
== Clients ==
 
== Clients ==
 
There are clients available for many platforms, Android included:
 
There are clients available for many platforms, Android included:
 
+
* http://owncloud.org/sync-clients/ ''(ownCloud Sync clients)''
[[http://owncloud.org/sync-clients/ ownCloud Sync clients]]
+
* http://owncloud.org/support/android/ ''(Android client)''
 
 
[[http://owncloud.org/support/android/ Android client]]
 
  
 
[[Category:Server]]
 
[[Category:Server]]

Revision as of 09:26, 15 November 2012

Underconstruction clock icon gray.svg
This material is work-in-progress ...

Do not follow instructions here until this notice is removed.
(Last edited by Mhavela on 15 Nov 2012.)

ownCloud is WedDAV-based solution for storing and sharing on-line your data, files, images, video, music, calendars and contacts. You can have your ownCloud instance up and running in 5 minutes with Alpine!

Installation

ownCloud is available from Alpine 2.5 and greater.

Before you start installing anything, make sure you have latest packages available. Make sure you are using a 'http' repository in your /etc/apk/repositories and then run:

apk update

Tip: Detailed information is found in this doc.

Database

First you have to decide which database to use. Follow one of the below database alternatives.

sqlite

All you need to do is to install the package

apk add owncloud-sqlite

Tango-dialog-warning.png
Warning: sqlite+owncould is known to have some problem, so do not expect it work. This note should be removed when sqlite+owncould works.
(Still a problem at 2012-11-15)


postgresql

Install the package

apk add owncloud-psql

Next thing is to configure and start the database

/etc/init.d/postgresql setup /etc/init.d/postgresql start

Next you need to create a user, database and set permissions.

# psql -U postgres postgres=# CREATE USER owncloud WITH PASSWORD '<%STRONG_PASSWORD%>'; postgres=# CREATE DATABASE owncloud; postgres=# GRANT ALL ON DATABASE owncloud TO owncloud; postgres=# \q

Note: The above commands creates the user 'owncloud' with a password you provide and the database 'owncloud'. Remember these settings, you will need them later when setting up owncloud

mysql

Install the package

apk add owncloud-mysql

Now configure mysql

/etc/init.d/mysql setup

Note: When you configure mysql for first time, you will see some instructions on the console. It is wise to do the actions presented on the screen to enhance security of mysql

Next start the database

/etc/init.d/mysql start

Webserver

Next thing is to choose, install and configure a webserver. Choose one alternative from below (or setup a webserver of your choise)

lighttpd

Install the package

apk add lighttpd

Make sure you have FastCGI enabled in lighttpd:

Contents of /etc/lighttpd/lighttpd.conf

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

Start up the webserver

/etc/init.d/lighttpd start

XYZ webserver

You could try installing some other webserver and document it here

  • Apache2
  • cherokee
  • other...

Other

Link owncloud installation to web server directory:

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

Other settings

Hardening

Consider adding the following line for additional security to the owncloud configuration file, where the password database is stored:

Contents of /???/???/???

... url.access-deny = ("config.php") ...
Underconstruction clock icon gray.svg
Todo: Where should this config go?


Folder permissions

The web server user needs to have ownership on some dirs. This is fixed by running the following commands:

chown -R lighttpd.lighttpd /etc/owncloud chown -R lighttpd.lighttpd /usr/share/webapps/owncloud/apps chown -R lighttpd.lighttpd /var/lib/owncloud/data

Additional packages

Some large apps, such as texteditor and videoviewer are in separate package:

apk add owncloud-texteditor owncloud-videoviewer

Configure and use ownCloud

Configure

Point your browser at http://<%MY_SERVER_IP%>/owncloud and follow the on-screen instructions to complete the installation, supplying the database user and password created before.

Clients

There are clients available for many platforms, Android included: