You are not logged in.
Hello guru's
I am attempting to setup ownCloud 8.2.2 in my arch installation. I scoured the web for the past couple of days trying to get ownCloud installed as cloud.domain.tld. In the process of doing this, I also wanted to move the storage location to my larger drive (the home folder). I can list the various sites that I looked through to accomplish this, but really I think that's overkill on information.
So, the steps that I took.
The base system is up-to-date on everything and is on a headless server that I ssh into. I have mariadb, php7 and apache installed.
I made the configuration changes mentioned in the Arch wiki for ownCloud under the 'Installation' section except for running the script provided for hardening oc.
Logged into mysql and create the database.
I created a vhost configuration specifically for OC (owncloud.domain.tld).
I copied this vhost file (Virtual Host and HTTPS section) as well as attempting to modify the provided vhost configuration.
I modified the OC config.php to set the datadirectory to my alternate location -- 'datadirectory' = '/var/www/owncloud' was changed to 'datadirectory'='/home/owncloud' (from memory, so if there is an error, it's in memory. I set the permissions as 0755 and owner to http:http.
Initially loading cloud.domain.tld I wold receive the default fallback page, then playing around I would get a blank page and my errors would indicate that /var/www/owncloud/apps wasn't available and that I needed to set teh datadirectory to /var/www/owncloud. That leads me to believe I need to make some more location changes and change all references of /var/www/owncloud. More errors, and notice in a page that php7 doesn't set open_basedir by default and that I need to fill in those values. I do that. Receive an error about unexpected mount, expecing ) on line 1089 of the oc config.php. This line was a particular line that switched from /var/www/owncloud to /home/owncloud. The line, if I remember correctly was /var/www/owncloud/data/mount.json; my change made it /home/owncloud/data/mount.json. There was no ')' before the change, there was no '(' after the change, and not sure what it was calling to generate the error to check that. Also notice that /usr/share/php/pear is in this path. Check to see if I have php-pear installed. Nope - -not in base, but in aur. Install that. Still not working, try googling and searching. At somepoint set off alarms at Google and now must enter a captcha to do a search. WTF? How the hell did I violate terms of service by searching? At this point, became frustrated poking around and trying random hit and miss attempts. So, I have completely removed it to start over.
This is the where I'm hoping to receive help.
I have no issue with installing owncloud, it's simply with the configuration for apache and moving the storage location to my larger storage drive. I have no issue with creating a soft link to that location (ln -s /home/owncloud /var/www/owncloud) if that's the best way, but I figure that setting it in the config file is probably the most appropriate way.
Please go ahead and treat me as a newb, because after the php-pear, I'm now worried that I didn't investigate enough and don't have some minor things that would normally be installed in a desktop environment that I haven't installed.
I'm currently sitting at a rebooted server after having removed anything and everything that has owncloud except /home/owncloud.
Please help me, you're my only hope.
Last edited by Anaximander (2016-03-05 23:34:25)
Offline
Since you prefer using a static owncloud installation, without having updates overwriting it's files, then I think you're better off doing something like the following:
1. Install owncloud with pacman
2. Configure /etc/php/php.ini to have those: https://wiki.archlinux.org/index.php/Ow … stallation
2. Copy over the whole /usr/share/webapps/owncloud to /var/www/owncloud or /srv/http/owncloud
3. Make sure that <owncloud_dir>/config is not still a symlink. Make it a normal directory and copy over the example config there.
4. Modify it to your owncloud mariadb/mysql user which should be standalone for owncloud.
5. Login as root into mysql/mariadb with root and do the following:
CREATE DATABASE owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO <oc_user>@localhost IDENTIFIED BY '<oc_pass>';6. Make sure 'dbuser' and 'dbpassword' in config.php are the one you entered in step 5.
7. Create the following file in /etc/httpd/conf/extra/httpd-owncloud.conf
<IfModule mod_alias.c>
Alias /owncloud /var/www/owncloud/
</IfModule>
<Directory /var/www/owncloud/>
Options FollowSymlinks
AllowOverride all
Require all granted
php_admin_value open_basedir "/srv/http/owncloud/:/home/:/tmp/:/usr/share/pear/:/var/www/owncloud:/home/owncloud:/dev/urandom"
</Directory>8. Include it in httpd.conf or httpd-vhosts.conf or httpd-ssl.conf like so:
<VirtualHost *:443>
DocumentRoot "/path/to/owncloud"
ServerName cloud.domain.ltd
ServerAdmin dat@mail.lol
ServerAlias cloud.localhost
ErrorLog "/var/log/httpd/cloud-error_log"
CustomLog "/var/log/httpd/cloud-access_log"
Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
Include conf/extra/httpd-owncloud.conf
SSLEngine on
SSLProtocol all -SSLv3
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH+aRSA+RC4 EECDH EDH+aRSA RC4 !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !RC4"
SSLCertificateFile /etc/letsencrypt/live/cloud.domain.ltd/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/cloud.domain.ltd/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/cloud.domain.ltd/chain.pem
</VirtualHost>This is my HTTPS example, a little bit modified for you, but not perfect.
9. Check permissions just in case if http user can read those places.
10. Restart httpd and start debugging if there is what to debug.
Some feedback afterwards would be nice ![]()
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
<grr -- had a nice message and I took to long to post it and lost it! Wit, humor and tears down the drain!>
First thank you for the post. It made something slip into place that made me utter an expletive very loudly at work. My boss laughed.
So, I have a hosted remote server that the company loads various OS's on. When I got this initially, I had them install Ubuntu 14.04 on it. In that time, several packages have lagged behind and I just figured it was time to get Arch (I switched to Arch a while back for my other computers and I like it a hell of a lot better). Ubuntu installed ownCloud to /var/www/owncloud. User data was stored in /var/www/owncloud/data. In arch, it's not installed there, although the config files I looked at still retained /var/www/owncloud. Reading your post slipped it in place that I was operating with two merged pieces of information, leading to completely incorrect information and thus my revelation has left my head hurting where my hand smacked it as the expletive emerged.
The hosting company has set the root to 15G and /home to 445G. I've resized the 445G partition to 345G and created a new 100G partition. I'll use the 100G for storing user data. Based on the fact that I do want owncloud to update as new arch packages become available, I'm thinking that I should do everything except step two and three -- ermm -- well, I'll do the first step two, but not the second step two nor step three. And then to make sure the data is on the 100G part, which is the preferred way to handle that?
using /etc/fstab, should I mount 100G under /mnt/something and then bind /mnt/something to /usr/share/webapps/owncloud/data or mount 100G directly to /usr/share/webapps/owncloud/data?
Thanks,
@
Offline
If you need a dedicated partition for owncloud data, them you can mount it in /home/owncloud as you already started to do, just make sure that it's http:http owned.
As for the owncloud installation, if you need a stable owncloud that doesn't risk breakage after updates, you should copy it over somewhere as I already stated above, /srv/http is Archlinux's place for storing http server platforms, but it's not mandatory...
As I said, you can choose whatever you like it to be.
" Based on the fact that I do want owncloud to update as new arch packages become available"
Well, if that's what you want, just leave the installation as it is after you installed the package and just configure the data storage to point at /home/owncloud or whatever you choose it to be.
You DO NOT need mount points for /usr/share/webapps/owncloud/data, that's ridiculous. It will work, but it's better to use the /home scenario, since owncloud is highly configurable (well, not that highly).
Personal spot :: https://www.smirky.net/ :: Try not to get lost!
Offline
I'll be attempting this this weekend -- I haven't forgotten it.
Offline
Okay -- I got it installed correctly. Part of my initial problem that prompted this entire thread, there is no mention in the arch wiki to set up the user and database, nor that your initial connection will CREATE your config file. However, right at the begining there is talk of setting up caching and it specifically mentions your config file. I'll admit it threw me off. I had copied the default the first time, and I copied it again this time. Difference is I had worked through Smirky's steps first and ownCloud notified that I had copied it and that the current settings would cause issues. I deleted the config.php, ownCloud ran through it's configuration and I didn't have to worry about about anything.
I'll be looking in to helping out with archwiki entry for ownCloud to make sure to point some of the issues I had.
Smirky, thank you. Tremendous help!
Last edited by Anaximander (2016-03-05 23:35:42)
Offline