Quantcast
Channel: Linux Device Hacking
Viewing all articles
Browse latest Browse all 3178

Owncloud 10 On Debian 10 (1 reply)

$
0
0
I did managed to get Owncloud10 running on a 128Mb Pogoplug with Debian 10 installed....

Based on a proper quality microUSB card (32GB) formatted with one 6GB ext4 primary partition
labeled ¨rootfs¨ and remaining data space ext4 formatted labeled ¨data¨

Create or update system to Debian Buster as described here: https://forum.doozan.com/read.php?2,16044
Ensure systemd is working.
ssh into your Pogolug.....
First enhance memory headroom for installation and running multiple programs to prevent memory shortage

add to fstab:

nano /etc/fstab
add:
none /run tmpfs defaults,size=64M 0 0
save fstab and remount:
mount -o remount /run

check with: df -h /run
(maybe 32M would have been more than enough)

add swapfile of 512MB
fallocate -l 512MB /swapfile
dd if=/dev/zero of=/swapfile bs=1024 count=524288
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile

make it permanent bu adding to fstab:
nano /etc/fstab
add to fstab:
nano /etc/fstab
add to fstab so it is always used:
/swapfile swap swap defaults 0 0
save fstab

check with: swapon --show
and:
free -h
(I did not adjust swappyness)

then run:
apt update
DO NOT INSTALL updates! just update list ( applying updates broke the system, ethernet interface not activated).

Install apache and php including some extra modules for OC10:
apt install apache2 php libapache2-mod-php php-{mysql,intl,curl,json,gd,xml,mbstring,sqlite3,zip}

Then to prevent problems with untrusted cetificates:
apt-get install ca-certificates

Manually install OC .deb package: (Using OC repository still nagged about something not trusted)
cd /tmp
wget https://download.owncloud.org/download/repositories/production/Debian_10/all/owncloud-files_10.4.1-1+1.1_all.deb
install:
dpkg -i owncloud-files_10.4.1-1+1.1_all.deb

create OC (host?) config file for apache:
nano /etc/apache2/sites-available/owncloud.conf
Insert following text:
Alias /owncloud "/var/www/owncloud/"

<Directory /var/www/owncloud/>
Options +FollowSymlinks
AllowOverride All

<IfModule mod_dav.c>
Dav off
</IfModule>

SetEnv HOME /var/www/owncloud
SetEnv HTTP_HOME /var/www/owncloud

</Directory>

save it and tell apache to use that file:
ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf
enable changes with:
a2enmod rewrite unique_id
(I am not sure if unique_id is required)
restart apache:
systemctl restart apache2

in browser open:
http://ipadress_pogoplug/owncloud
be patient.....
login: admin
pw: owncloud
be more patient....
if all is well then you can login a second time with admin/owncloud and then the OC openingscreen appears.

Adding external local storage to OC
Logout from OC. (don´t know if required, but just to prevent problems)
login with ssh at Pogoplug server:
mkdir /media/ocldata
mount /dev/sda2 /media/ocldata ( make sure the correct /dev is available on your system and that it is formatted properly)
adjust proper permissions:
chown -R www-data:www-data /media/ocldata
chmod -R 0750 /media/ocldata

make permanent:
nano /etc/fstab

add:
/dev/sda2 /media/ocldata ext4 defaults 0 1

save and remount:
umount /media/ocldata
mount -a
df -h

then to enable local storage in OC:
nano /var/www/owncloud/config/config.php
add the following variable declaration:
'files_external_allow_create_new_local' => true,

login OC with browser as admin. select top right: settings
then left side below admin selections:
select storage
external storage is disabled, enable it
then add storage select local enter path /media/ocldata
thats it.
When you now go to files in OC the local storage direcetory is displayed and can be used
Uploading a file af 1.8G was no problem, you only have to be patient....

I did not tweak anything yet, memory usage seems heavy but just using it only for up- and downloading files seems to be fully functional.
I did not experiment with other modules and other ways of connections yet. But any additional help or experience for extra functionality or tweaking is welcome.
I did create another installation using MariaDB with MySQL instead of SQLite. That install run OK as well, but for now I chose to use sqlite.
I do not know if this is actually easier on resources.
I first tried to use Nginx instead of apcahe, but could not get it to run. I expect that due to nginx config problems and I was completely new to most of this stuff. After (too) many hours of experimenting and trying to find a solution I just installed LAMP (apache) instead of LEMP (nginx) and that sort of worked out of the box.
So when someone is at home with nginx: I would be happy to try because whit initial trials a had the impression it´s reponse was notably faster.
Available system resources are pretty low so if nginx uses less of them that would be nice as well.
Probably all will work a little faster when installed on a ssd disk on the sata interface. I did not try that either.

Have fun!

hacksome

Viewing all articles
Browse latest Browse all 3178

Trending Articles