EDIT: I am by no means a master at Kloxo, or servers for that matter. There might be better ways to do this, or I might have done something wrong. I'm just writing out here what worked for me. If there is a better, or more logical, way of doing something please let me know.I finally had some time to reply to this thread with an outline of what I did to get ownCloud installed alongside Kloxo.
I didn't want to start my server over, as suggested and install ownCloud first - then install Kloxo. So I opted for the
manual install. I'll outline the steps I took here, to get it working.
I wanted to install ownCloud alongside Kloxo (
read: not under a user) and have it run from an unused port on the same domain the panel is on. You could very easily just install and run this from a user account or a subdomain created within the panel.
First up check dependencies:
- PHP module ctype
- PHP module dom
- PHP module GD
- PHP module iconv
- PHP module JSON
- PHP module libxml
- PHP module mb multibyte
- PHP module SimpleXML
- PHP module zip
- PHP module zlib
- PHP module mysql (you could use a different database, but mysql is recommended and what I'll be covering here)
Recommended:
- PHP module curl (highly recommended, some functionality, e.g. http user authentication, depends on this)
- PHP module fileinfo (highly recommended, enhances file analysis performance)
- PHP module bz2 (recommended, required for extraction of apps)
- PHP module intl (increases language translation performance)
- PHP module mcrypt (increases file encryption performance)
- PHP module openssl (required for accessing HTTPS resources)
Required for specific apps:
- PHP module ldap (for ldap integration)
- smbclient (for SMB storage)
- PHP module ftp (for FTP storage)
- PHP module exif (for image rotation in pictures app)
For preview generation (optional):
- PHP module imagick
- avconv or ffmpeg
- OpenOffice or libreOffice
You can check which php modules you have installed via command line (or checking the output of php_info page):
[root@dedicated tmp]# php -m
[PHP Modules]
bcmath
bz2
calendar
Core
...
...
etc
If a module you need isn't installed, you can attempt to install it via package manager (I am assuming
CentOS here):
[root@dedicated tmp]# yum install php53u-bz2
Obviously replace
php53u with your php version from Kloxo. After you've installed all modules, restart php:
[root@dedicated ssl]# sh /script/restart-web
Then check php again with
php -m.
Depending which php version you run will depend on which version of ownCloud you can run... ownCloud 8+ requires PHP 5.4+. So if you check your Kloxo settings under Admin > Web - Mail - Database > Webserver Config (or just enter Webserver Config into the search) you can see which PHP version you are running under "Php Branch". Everything under version 8 requires PHP 5.3.8+.
If you are running PHP 5.4+ then you can get the latest version of ownCloud, if you aren't get version 7.0.9:
[root@dedicated ~]# cd /tmp
[root@dedicated tmp]# wget https://download.owncloud.org/community/owncloud-7.0.9.tar.bz2
--2015-09-08 23:36:26-- https://download.owncloud.org/community/owncloud-7.0.9.tar.bz2
Resolving download.owncloud.org... 144.76.105.220, 209.126.100.233
Connecting to download.owncloud.org|144.76.105.220|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28635307 (27M) [application/x-bzip]
Saving to: “owncloud-7.0.9.tar.bz2”
100%[=======================================================================================================>] 28,635,307 8.14M/s in 3.4s
2015-09-08 23:36:30 (8.14 MB/s) - “owncloud-7.0.9.tar.bz2” saved [28635307/28635307]
[root@dedicated tmp]#
If you are downloading the latest version because your PHP can run it, change the wget URL to
https://download.owncloud.org/community/owncloud-8.1.1.tar.bz2 and then change the extract command below.
Once downloaded, extract it:
[root@dedicated tmp]# tar -xjf owncloud-7.0.9.tar.bz2
Next we want to move it to the correct location (that it will be served from). As I said I want it to run beside Kloxo on a different port, and not under a user, so I want to move it to the default folder that Kloxo is in (so it is organized and in a logical place on the server). If you are going to run it under a user/domain you've setup in the panel, move the extracted folder to that location instead:
[root@dedicated tmp]# mv owncloud /home/kloxo/httpd
Next,
chown the files to the user that will be executing them (the php user, or account owner) and fix the directory and file permissions on the newly extracted and moved files:
[root@dedicated tmp]# cd /home/kloxo/httpd
[root@dedicated httpd]# chown -R apache:apache owncloud
[root@dedicated httpd]# find owncloud -type d -exec chmod 750 {} \;
[root@dedicated httpd]# find owncloud -type f -exec chmod 640 {} \;
Next we need to create a new webserver configuration. I'm using Apache, so I create a new .conf file. Again, because I am running it alongside Kloxo I'm going to do this in the default folder for webserver .conf files. If you are installing under a user, this step will probably already be completed.
[root@dedicated httpd]# vi /etc/httpd/conf.d/owncloud.conf
Paste the following into the above file:
Listen 9111
<VirtualHost *:9111>
ServerName YOUR.PANEL.DOMAINNAME.COM
DocumentRoot "/home/kloxo/httpd/owncloud"
SSLEngine On
SSLCertificateFile /home/kloxo/httpd/ssl/owncloud.crt
SSLCertificateKeyFile /home/kloxo/httpd/ssl/owncloud.key
SuexecUserGroup apache apache
SuPhp_UserGroup apache apache
<Directory /home/kloxo/httpd/owncloud>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
# add any possibly required additional directives here
# e.g. the Satisfy directive (see below for details):
Satisfy Any
</Directory>
CustomLog "/home/kloxo/httpd/owncloud/owncloud-custom_log" combined
ErrorLog "/home/kloxo/httpd/owncloud/owncloud-error_log"
</VirtualHost>
As you can see from this conf file, we set a few options. Most importantly, the port to listen on
9111 in this case and the
ServerName, which is the domain name of the panel. Lastly, because we want this to be secure, we set the
SSLCert paths to self-signed certs. We'll generate them next and make sure they are owned by the apache user:
[root@dedicated httpd]# cd /home/kloxo/httpd/ssl/
[root@dedicated ssl]# openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout owncloud.key -out owncloud.crt
[root@dedicated ssl]# chown apache:apache owncloud.*
After running the first command, you'll have to enter a few options. The defaults will work, except for
Common Name enter your servers (panels) domain name.
Lastly we restart apache and webservices:
[root@dedicated ssl]# sh /script/restart-web
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
Stopping php-fpm: [ OK ]
Starting php-fpm: [ OK ]
[root@dedicated oc]#
If you don't get any errors after restarting you should be ready to access ownCloud from the port you entered in the .conf file.
If you do get errors, I guess retrace your steps and see what it wrong/different. The install may change slightly if your server is configured differently (ie. Nginx, etc.). You can always just delete all the folders/files you've created here to revert back.