Author Topic: owncloud appliance (beta)  (Read 9546 times)

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
owncloud appliance (beta)
« on: December 19, 2011, 12:01:06 PM »
Hello guys,

Lately, I started playing with owncloud. You can try it here.
I was searching a minimal system (terminal prefered) but couldn't find one.
So I used openbox mini.

You can download and test

owncloud-2011-12.iso

Please give feedback and help to improove it since I'm not very familiar with technology. I study vet medicine.

First, I installed owncloud from the site.
I checked repositories and found out that it's there. So I downloaded it from there.

Next step was to set it up.

1. Install task-lamp

Code: [Select]
apt-get install task-lamp
Where are the?
mysql-administrator
mysql-gui-tools


2. Not sure about permissions.

Code: [Select]
cd /var/www/html
chown -R apache:apache owncloud

3. Start installation

http://localhost/owncloud/index.php

It'll show you possible missing dependencies. Mine were:

Code: [Select]
php-zip
4. There you must give username-password



I didn't create database. I tried using phpMyAdmin but couldn't figure out how to login (since I hit enter for password).

So I did it the hard way (please tell me if I made a mistake).

Code: [Select]
$ mysql -u root -p
Create User
Code: [Select]
CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'owncloud';
Create a Database in MySQL
Code: [Select]
CREATE DATABASE owncloud
GRANT privileges to a user for a new database
Code: [Select]
GRANT USAGE ON owncloud.* to owncloud@localhost IDENTIFIED BY 'owncloud';
GRANT ALL privileges to a user
Code: [Select]
GRANT ALL  ON owncloud.* to owncloud@localhost ;
I used owncloud as user and pass everywhere to be easier for my example.

5. I also installed some extras (as I saw from their site).

Code: [Select]
apt-get install mp3info curl php-curl
6. I installed draklive-install
I think there might be problem with the permissions on the ISO. So it's better to be installed.
I'm not sure yet what's happening with the firewall. If someone tests it, let us know.

================================================================

THNIGS TO BE DONE:

1. Increase the limit of upload file size.

Code: [Select]
- Open the PHP configuration file in /etc/php5/apache2/php.ini, look for:
       upload_max_filesize = 2M
        post_max_size= 2M
- In place of 2M write the maximum size you want to be allowed.

I couldn't find where this php.ini is.

2. Change the data directory.

Code: [Select]
- Open the file $apacheFolder/owncloud/config/config.php
- Change $CONFIG_DATADIRECTORY to the folder you want.
It’s recommended to put your data folder outside of your apache folder for security reasons.
You also need to set the owner of such directory to the webserver (apache):
sudo chown -R apache:apache ~/OwnCloud

3. Graphical environment or terminal?

Since this can or will be used by other computers, is the graphical login and the graphics needed? This will save a lot of space (I think) on the ISO file.
« Last Edit: September 25, 2012, 03:28:46 AM by diamond_gr »
PCLOS in Greek

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: owncloud appliance (beta)
« Reply #1 on: December 19, 2011, 01:07:33 PM »
Hi,

Welcome ! I find it is a great idea ! I was just wondering when I would have time to install and setup an Owncloud of my own, but if a spinoff is done with it already installed I won't bother waiting that I find time one day late in the future.

Admin : install phpMyAdmin and you will have a gui to administrate Mysql.

I leave a few questions for the other people ! ;)

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: owncloud appliance (beta)
« Reply #2 on: December 19, 2011, 02:57:43 PM »
Hello guys,

Lately, I started playing with owncloud. You can try it here.
I was searching a minimal system (terminal prefered) but couldn't find one.
So I used openbox mini.

You can download and test

owncloud-2011-12.iso

Please give feedback and help to improve it since I'm not very familiar with technology. I study vet medicine.

First, I installed owncloud from the site.
I checked repositories and found out that it's there. So I downloaded it from there.

Next step was to set it up.

1. Install task-lamp

Code: [Select]
apt-get install task-lamp
Where are the?
mysql-administrator
mysql-gui-tools


2. Not sure about permissions.


Those two programs were removed for being deprecated or something like that. There was a post on the forum referring to them in the last 30 days. A search may turn that post up.

You can us phpMyAdmin or Webmin to administrate MySQL.  Both are in synaptic.

Quote
Code: [Select]
cd /var/www/html
chown -R apache:apache owncloud

3. Start installation

http://localhost/owncloud/index.php

It'll show you possible missing dependencies. Mine were:

Code: [Select]
php-zip


Since this is a dependency it should be pulled in along with the program when installed from synaptic.

Quote
4. There you must give username-password



I didn't create database. I tried using phpMyAdmin but couldn't figure out how to login (since I hit enter for password).


The username for a default setting is
username:  root
password:   blank

Quote

So I did it the hard way (please tell me if I made a mistake).

Code: [Select]
$ mysql -u root -p
Create User
Code: [Select]
CREATE USER 'owncloud'@'localhost' IDENTIFIED BY 'owncloud';
Create a Database in MySQL
Code: [Select]
CREATE DATABASE owncloud
GRANT privileges to a user for a new database
Code: [Select]
GRANT USAGE ON owncloud.* to owncloud@localhost IDENTIFIED BY 'owncloud';
GRANT ALL privileges to a user
Code: [Select]
GRANT ALL  ON owncloud.* to owncloud@localhost ;
I used owncloud as user and pass everywhere to be easier for my example.

5. I also installed some extras (as I saw from their site).

Code: [Select]
apt-get install mp3info curl php-curl
6. I installed draklive-install


There is no reason that one would have to install draklive-install to run Owncloud.  After an install of a livecd the only reason to install draklive-install is if you were planning on making a remaster.

Quote
I think there might be problem with the permissions on the ISO. So it's better to be installed.
I'm not sure yet what's happening with the firewall. If someone tests it, let us know.

================================================================

THNIGS TO BE DONE:

1. Increase the limit of upload file size.

Code: [Select]
- Open the PHP configuration file in /etc/php5/apache2/php.ini, look for:
       upload_max_filesize = 2M
        post_max_size= 2M
- In place of 2M write the maximum size you want to be allowed.

I couldn't find where this php.ini is.


you will find it here /etc/php.ini

A better way would be to create a .htaccess file in the Owncloud directory with the following information

php_value post_max_size 50M
php_value upload_max_filesize 50M

and change your max size there. Doing it this way will only effect php when running Owncloud. All other instances of php running will use the original defaults found in the php.ini file.  This is far better than having different php.ini files for different requirements.

Quote
2. Change the data directory.

Code: [Select]
- Open the file $apacheFolder/owncloud/config/config.php
- Change $CONFIG_DATADIRECTORY to the folder you want.
It’s recommended to put your data folder outside of your apache folder for security reasons.
You also need to set the owner of such directory to the webserver (apache):
sudo chown -R apache:apache ~/OwnCloud


OwnCloud working directory is not in ones home directory!  "~/OwnCloud"  perhaps this was a typo or just an oversight. It should be found in your /var/www/html folder instead. (in the case for PCLOS)

sudo is not installed in PCLinuxOS by default.  Use "su" instead IE:

[dwmoar@laptop ~]$ su
Password: <--- Enter root password
[root@laptop dwmoar]#

than enter

chown -R apache:apache /path/to/OwnCloud

Quote
3. Graphical environment or terminal?

Since this can or will be used by other computers, is the graphical login and the graphics needed? This will save a lot of space (I think) on the ISO file.


If you want to access it from the server it is being ran on Yes it is needed. It will also needed to run the Owncloud install script if you don't install it from the repository.
« Last Edit: December 20, 2011, 12:56:10 AM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: owncloud appliance (beta)
« Reply #3 on: December 19, 2011, 04:13:29 PM »
Hi again,

php.ini is under /etc.

When in doubt, in a root console type "updatedb", then "locate my_name" where my_name is the name or part of the name of the file you are looking for (it is case sensitive).

YouCanToo: did you mean to say something ?

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: owncloud appliance (beta)
« Reply #4 on: December 20, 2011, 12:57:03 AM »
Hi again,

php.ini is under /etc.

When in doubt, in a root console type "updatedb", then "locate my_name" where my_name is the name or part of the name of the file you are looking for (it is case sensitive).

YouCanToo: did you mean to say something ?



There was an end quote missing, I got it fixed now.  Thanks




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: owncloud appliance (beta)
« Reply #5 on: December 20, 2011, 02:38:19 AM »
YouCanToo, I read your explanations much better now, thanks for fixing. I have a question : if diamond_gr wants the datas to be secure as the message says, and have the datas folder out of the apache directory, how should he proceed ? If he knows what directory it is in the tree structure of Owncloud, and if he puts it somewhere else, how will the Ownclound know where it is ? Should he for instance, create a symlink ?

Aren't there other ways to secure an install nowadays, such as adding .htaccess in the sensitive parts ? Something like :

Code: [Select]
Options -Indexes
Options -ExecCGI

?
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: owncloud appliance (beta)
« Reply #6 on: December 20, 2011, 06:41:03 PM »
YouCanToo, I read your explanations much better now, thanks for fixing. I have a question : if diamond_gr wants the datas to be secure as the message says, and have the datas folder out of the apache directory, how should he proceed ?

He can set the path to the data directory in /path/to/owncloud/config by editing the config.php file.  Just remember what ever directory it is put in that directory must have the uid and gid of "apache" with a permission setting of 700

Quote
If he knows what directory it is in the tree structure of Owncloud, and if he puts it somewhere else, how will the Ownclound know where it is ? Should he for instance, create a symlink ?

Since the /owncloud/config/config.php file contains usernames, dbnames, passwords and paths for the operation of owncloud, I would not use a symlink to it.  Also when one firsts installs owncloud they can change the path to the data directory right from the installation screen.

Quote
Aren't there other ways to secure an install nowadays, such as adding .htaccess in the sensitive parts ? Something like :

Code: [Select]
Options -Indexes
Options -ExecCGI

?

The two options you listed will not really do any good in this case. The first one will simply cause the web server not to display a listing of the files in a directory when there is no index file in a given directory. If one has access to the folder and knew the name of the file they could display a *.php file in their browser.

The second option simply stops the execution of .cgi/.pl code such as perl. It does nothing to stop php from being ran.




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Re: owncloud appliance (beta)
« Reply #7 on: December 21, 2011, 01:03:47 AM »
Some of the changes are here

http://owncloud.org/install/configure/

I just copied what needs to be done. I didn't know what to do, that's why I asked for help and a wise solution.
PCLOS in Greek

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: owncloud appliance (beta)
« Reply #8 on: December 21, 2011, 05:08:05 PM »
Some of the changes are here

http://owncloud.org/install/configure/

I just copied what needs to be done. I didn't know what to do, that's why I asked for help and a wise solution.


If you had noticed that is specifically geared towards the big brown distro. (Ubuntoo, Yes I know it is spelled wrong!) The package from the repository was packaged with PCLOS in mind and where PCLOS installs programs such as apache and who owns the service it is ran as.  Apache (httpd) is owned by apache (uid and gid) not www-data as in the big "U" distro. The paths are also going to be way different.  Even if you downloaded OwnCloud from their website, you should install it keeping in mind that you are using PCLOS!  The UID/GID of Apache will be "apache"

I really wish that when they post an installation guide for their software, they would make it more general in nature. Linux is not Ubuntoo! it is just a single version of a long line of distros.

Perhaps I should do a write up for installing it in PCLinuxOS on the knowledge base.  Does anyone think this would be a good idea?




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: owncloud appliance (beta)
« Reply #9 on: December 21, 2011, 06:00:14 PM »
A very good idea indeed ! Thank you YouCanToo !

melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode

Offline diamond_gr

  • Jr. Member
  • **
  • Posts: 44
    • Efstathios Iosifidis Official Web Site
Re: owncloud appliance (beta)
« Reply #10 on: December 21, 2011, 06:12:53 PM »
It's a very good idea.
Maybe if you can explain what you do. I mean personally, I know that the permissions must go to "apache" (I found out) but I didn't know about the php.ini.
I also didn't know about the .htaccess file and what it does.

I know I'm asking too much since this must be setup by specialists who know what they do. After lot of distros, PCLOS made my life easier...

Thanks again for your help.

I also tried it with free hosting servers. I passed some obstacles but I'm not sure if I made it.
PCLOS in Greek

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5335
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: owncloud appliance (beta)
« Reply #11 on: December 21, 2011, 11:09:04 PM »
« Last Edit: December 22, 2011, 04:40:48 PM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline melodie

  • Hero Member
  • *****
  • Posts: 5942
  • XMMP=Jabber, free instant messaging protocol !
    • PCLinuxOS Fr
Re: owncloud appliance (beta)
« Reply #12 on: December 29, 2011, 05:26:29 PM »
This looks like a very beautiful tutorial ! YouCanToo, thank you so much for all the work you do !

And Happy Holidays !
melodie at swissjabber dot ch - IRC #pclinuxos-fr sur freenode