petrockblog / owncloudpie Goto Github PK
View Code? Open in Web Editor NEWShell script for installing Owncloud on the Raspberry Pi
Shell script for installing Owncloud on the Raspberry Pi
I am fighting some problems with my sync client and WebDav being really slow especially when it comes to many files (suggestions on that would be greatly appreciated).
While searching the web for my problem, I found the following:
"7. To further optimize your web server setup I highly recommend you perform this last step. However, It’s not necessary.
Run the following command on your Pi -
apt-get install memcached php5-memcache php-apc varnish"
php-apc is already included in your script. memcached, php5-memcache and varnish all are supposed to do some performance improvements to php and http. While I did not test them separably my RaspberriPi web interface is much faster now.
File transfer is to be tested, but even if that is not effected its still worth it.
found it here:
http://rstreefland.com/2013/01/24/how-to-a-complete-super-fast-super-efficient-web-server-setup-for-the-pi/#more-56
Ps. grr I misspelled the headline
Greetings Lennart
The script seems to assume Raspbian, so it would make sense to use the Linux packages instead of the generic zip files:
http://owncloud.org/install/#instructions-packages
The commands for that are
echo 'deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/Debian_7.0/ /' >> /etc/apt/sources.list.d/owncloud.list
apt-get update
apt-get install owncloud
And for adding the key
wget http://download.opensuse.org/repositories/isv:ownCloud:community/Debian_7.0/Release.key
apt-key add - < Release.key
What do you think @petrockblog?
Thanks for the great script! I ran into one issue while skipping through the certificate creation process (using via nginx): the dialog let's me assume that all certificate details are optional, but OwnCloud (5.0.6) does not seem to think so as all sync operations failed because Common name was blank.
So maybe it would be good to reword the dialog slightly? It does not matter what the common name says. My made-up domain name fixed the syncing.
Hi there,
after doing a new installation with nginx I get a blank page when calling owncloud/index.php.
/var/log/nginx/access.log and /var/log/nginx/error.log don't give a hint. There is no logfile in /srv/http/owncloud/data/.
Thanks in advance for helping out. Cheers, Sascha
Hi, I'm having the following issue after a default installation on the latest Raspbian build:
Server backend message: Server certificate was missing commonName attribute in subject name
This message shows up in my OSX Client. The iPhone client is also not working, can't upload.
Erro rwhile sharing:
Could not execute: /usr/sbin/sendmail
Rewrite NGINX config after change of server URL.
I got this issue: “can not connect to database, using sqlite3. (unable to find package ‘MDB2_Driver_sqlite3′ file ‘MDB2/Driver/sqlite3.php’)”
Just typed: sudo apt-get install owncloud-sqlite
problem solved.
Maybe you can attach this into the script
Include "update" option to allow for an automatic upgrade of the owncloud installation to the newest release.
the embedded address that the script pulls from Changelog doesnt seem to pull out the correct address to download update. i manually added the current address to my script:
wget "http://download.owncloud.org/community/owncloud-6.0.0.tar.bz2"
tar -xjf owncloud-6.0.0.tar.bz2
of course that will change. just letting you know. other than that your script is really helpful. thanks for your time and effort.
the readme file is a bit outdated and it made me wounder if the script is going to use apache or not, and also which version of the owncloud is going to be used at all.
Fresh installation with apache keeps redirecting to https://url.ofmyserver.com/
What can i do?
I'd suggest to change the rewrite rule to enforce https to
return 301 https://$server_name$request_uri;
See: http://nginx.org/en/docs/http/converting_rewrite_rules.html
When creating certificates for owncloud it's necessary to have the web servers host name in the common name field of the certificate.
(See http://forum.owncloud.org/viewtopic.php?f=14&t=3949#p11234, I can confirm that behaviour).
I needed a lot of time to figure this out, so maybe add a hint to the creation process would save other people some time.
The Mac OS X ownCloud client refuses to connect via HTTPS in case of an apache installation. This problem can be solved by generating a pem AND a key file instead of only a pem file as done in the script:
sudo openssl req -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.key
sudo chmod 600 /etc/apache2/apache.pem
sudo chmod 600 /etc/apache2/apache.key
/etc/apache2/sites-available/default-ssl should then contain the lines:
SSLCertificateFile /etc/apache2/apache.pem
SSLCertificateKeyFile /etc/apache2/apache.key
I'm using nginx and a self-generated SSL certificate. Without any direct intervention from me, browser and desktop client cannot connect anymore (timeout). Trying curl to access the owncloud directory might show a certificate problem:
$curl --local-port 53234 https://myserver
curl: (60) SSL certificate problem: Invalid certificate chain
More details here: http://curl.haxx.se/docs/sslcerts.html
curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). If the default
bundle file isn't adequate, you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.
with the -k (or --insecure) option I get a response at last:
<html>
<head><title>403 Forbidden</title></head>
<body bgcolor="white">
<center><h1>403 Forbidden</h1></center>
<hr><center>nginx/1.6.2</center>
</body>
</html>
I'm on the latest Raspbian Jessie lite, everything updated to the latest version. I also generated a new SSL cert, to no avail. Not sure if this is related, but a day earlier Jessie updated some or all of its php packages.
The following packages will be upgraded:
libldap-2.4-2 php-pear php5 php5-cgi php5-cli php5-common php5-curl php5-dev
php5-fpm php5-gd php5-mysql php5-readline php5-sqlite
hi,
the URL is not updating for me. Shouldn't you also update the redirect after Line 148 like you did in line 100? Or am I wrong here and just forgot to reboot?
I was also wondering, why you change the Servername back to default in 306 every time the script starts? Again, if I was wrong in part 1 would you be so kind to tell me what it does (googling for "__servername" is not working too well).
Ps. I hope I am not filing too many issues. I'm done now
have a good evening
Greetings Lennart
Hi,
I've been trying to install Owncloudpie via Nginx for the last few hours but it seems to fail indefinitely on this:
[FAIL] Restarting PHP5 FastCGI Process Manager: php5-fpm failed!
I don't know if this is related to nginx 1.6.1 or not (I see that nginx 1.9.0 has been released recently, don't know if your script is including this.)
On a sidenote: Apache seems to install fine, but load times are fairly slow it seems
Hope you can help
Please add Hiawatha as a server choice to your script as it is even more lightweight regarding the limited performance of a Raspberry Pi.
See
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=30&t=41914
and
http://doc.owncloud.org/server/5.0/admin_manual/installation/installation_others.html
It would be nice to get the configs of all supported servers tweaked for the highest performance.
Also note that there is a new version of ownCloud and Raspbian.
Looking forward to seeing this great project continued!
HUI,
first I wanna say, that the skript is a great Job for beginners and for lazy people as me ;-)
But I installed yesterday oc 8.0.2 in RasPI 2 and teh skript dont copy the file ".htaccess" from the download folder to the www/owncloud folder.
I get the error " .htaccess" ist not at tzhe right place....
I copied the file manually from the download folder and all ist good.
Currently there’s a check for the git
and dialog
packages. If they are not present, the setup exits:
OwncloudPie/owncloudpie_setup.sh
Lines 65 to 66 in b7849d2
Instead, we could just let the script do the commands and install the packages, right?
Got this while running script
http://pastebin.com/WQ4DGCL3
I've reinstalled 2015-02-16-raspbian-wheezy.img a couple of times, first setting the locales and then installing Owncloud either with Apache2 or nginx.
I also updated all packages first.
Each time I got http://ip/owncloud not found.
hi,
owncloud says under settings/admin, that it's .htaccess is not recognized and mentions security risks.
changing the root directory in line 109 from "root /var/www;" to "root /var/www/owncloud;" fixes the problem for me.
I decided not to do a pull request for that one, because it is not so elegant, since if people might decide to run other things on that webserver.
But since you seem to be more into server configurations I am sure you will find a better way to fix this.
maybe a .htaccess or a index.php in "/var/www"?
Ps. I really like your script and have already recommended it to a couple people, who are going to get a Raspberry Pi soon. Keep up the good work
Greetings Lennart
Updating the script from the menu further enhances the usability of the script.
The update function essentially calls "git pull" from within the script's folder and restarts the script.
ok i'm all set up but just wondering the best way to make use of a ext hdd, dedicated for owncloud?
i use this method for retropie,
http://www.raspberrypi.org/forums/viewtopic.php?f=29&t=44177&hilit=move+root+fs+usb+tutorial&sid=2503f9ffe9afaa2edb49aef4537a862a
is it ok to use for this too?
thanks for your time
Ad
I updated and now I see is a message that says "ownCloud is in maintenance mode". Sync clients have failed, web access is denied due to this message.
I realized that the script seems to configure NGiNX such that Owncloud 5.0 does not run properly.
It would be great if someone could post a working nginx configuration file (/etc/nginx/sites-available/default) here.
how to change URL after first installation?
I run owncloudpie_setup.sh again, and(1)set new URL, but after[OK], it didn't save
Hi, when following the steps on a stock RasPi, I get the following error:
Your web server is not yet properly setup to allow files synchronization because the WebDAV interface seems to be broken.
Please double check the installation guides.
This is the message I find in my owncloud error logfile:
{"app":"core","message":"isWebDAVWorking: NO - Reason: [CURL] Error while making request: SSL: unable to obtain common name from peer certificate (error code: 51) (Sabre_DAV_Exception)","level":2,"time":"2013-12-29T21:27:43+00:00"}
Possibly this page could be relevant?
http://nginx.org/en/docs/http/ngx_http_dav_module.html
Trying it with Apache now...
Line 177 of the script
I guess it's a typo
I installed owncloud with this script. Storage directory is a external HDD whith the right path: /path/to/hdd/owncloud/data
After login (admin) I got always the error message: This content failed to load. I don*t have any other users yet. I just wanted to play around with the cloud.
After that owncloud looks like:
Currently I did the last update via script with no success.
Any ideas?
Is it possible to merge the Let's Encrypt certificate generation, instead of self signed?
https://letsencrypt.org/getting-started/
Thanks for the great work
Hi,
I've been using your script a few times now (really loving it, thanks!), and I've been doing a few details differently though:
As I said, I'm really enjoying your script, and I'm working on a Dutch blog article/howto in making an OwnCloudPie (I'm calling it SkyPi) in which I'm obviously crediting your for the great work you've done! Hope to have it out tomorrow... (link follows)
the script just fails on Raspbian Stretch without giving an error message. Using 2018-04-18-raspbian-stretch-lite
Can you update it? (would be nice to be able to run the latest Raspbian. I think we need Stretch anyway as OwnCloud will require a newer version of PHP, which I think only runs on Stretch?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.