Installation and Setup of ownCloud on Arch Linux

Preconditions

This tutorial presumes that a preferred stack like LAMP stack is  already deployed and configured on the system. If a file or a command needs changes at any time, then the text to be changed will appear red.

ownCloud- what is it?

An open source, online storage solution- ownCloud is very similar to Google Drive or Dropbox. ownCloud’s advantage is that the server is not located some place else but is at a place that it has been installed upon.

Utilization of Arch Linux for ownCloud’s installation is that the “Community” or official repository,  provides an ownCloud package, which is effortlessly deployed and configured.

Installation

As stated before, LAMP should be installed alongwith MDB2 pear module.

pacman -Sy php-pear
pear install MDB2

Now install ownCloud from the repository.

pacman -Sy owncloud

In order to enable it usable, copy the sample configuration file.

#
cp /etc/webapps/owncloud/apache.example.conf /etc/httpd/conf/extra/owncloud.conf

Now you have to provide it for Apache. So add this line to /etc/httpd/conf/httpd.conf.

Include /etc/httpd/conf/extra/owncloud.conf

Now you will have to enable the list provided below of php extensions in /etc/php/php.ini. The lines that require to be uncommented look like ;extension=module.so. In order to uncomment it, simply remove the semicolon (;).

  • openssl.so

  • gd.so

  • xmlrpc.so

  • intl.so

  • iconv.so

  • mysqli.so

  • zip.so

  • pdo_mysql.so

  • mysql.so

In-built Webdav also needs to be disabled  in apache. Open /etc/httpd/conf/httpd.conf and search the lines LoadModule dav_module
modules/mod_dav.so
 and LoadModule dav_fs_module modules/mod_dav_fs.so and comment both of them out by using a hash.

# LoadModule dav_module modules/mod_dav.so
# LoadModule dav_fs_module modules/mod_dav_fs.so

Now open /etc/httpd/conf/extra/owncloud.conf and revise the
file as per your liking.

<IfModule mod_alias.c>
Alias /owncloud /usr/share/webapps/owncloud/
</IfModule>
<Directory /usr/share/webapps/owncloud/>
   Options FollowSymlinks
   Order allow,deny
   AllowOverride all
   allow from all
   php_admin_value open_basedir
"/srv/http/:/home/:/tmp/:/usr/share/pear/:/usr/$
</Directory>
<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot /usr/share/webapps/owncloud
    ServerName owncloud.example.com
    ErrorLog logs/owncloud.foo.info-error_log
    CustomLog logs/owncloud.foo.info-access_log common
</VirtualHost>

Now mysql database for ownCloud needs to be created.

$ mysql -u root -p
sql> CREATE DATABASE owncloud;
sql> CREATE USER 'owncloud'@'localhost' IDENTIFIED BY '<span
style="color: red">password';
sql> GRANT ALL PRIVILEGES ON owncloud TO 'owncloud'@'localhost' WITH
GRANT OPTION;
sql> \q

Following this, simply restart (or start, just replace restart with start) httpd and this completes the installation.

# systemctl restart httpd

Configuring

For the http user, you may want to make the owncloud webapp folder readable.

# chown -R http.http /usr/share/webapps/owncloud

Open any web browser, like Google Chrome, Firefox, etc. and go to your domain name or IP and the path to any alias that you set in /etc/httpd/conf/extra/owncloud.conf (e.g. http://example.com/owncloud). Now input your preferred credentials like username, password, and complete database information.

Your ownCloud is completely set up and ready:)!

KB Admin has written 28 articles

Leave a Reply