Install ownCloud to Ubuntu 17.10 (Part 1)


The source of the information is here.

Get owncloud-files

Add Repository Key to APT

# wget -nv -O Release.key
# apt-key add - < Release.key

Add and install the repository

# echo 'deb /' > /etc/apt/sources.list.d/owncloud.list
# apt-get update
# apt-get install owncloud-files


Modifying Apache Configuration

Create a configuration file for owncloud

# touch /etc/apache2/sites-available/owncloud.conf
Alias /owncloud /var/www/owncloud/
   <Directory /var/www/owncloud/>
 Options +FollowSymlinks
 AllowOverride All

 <IfModule mod_dav.c>
  Dav off

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


Add configuration files to the enabled directory

# ln -s /etc/apache2/sites-available/owncloud.conf /etc/apache2/sites-enabled/owncloud.conf

PHP may not be enabled, so enable PHP as a module in Apache.

$ sudo apt-get install libapache2-mod-php
$ sudo a2enmod php7.1
$ systemctl restart apache2

Other Apache Configuration  According to him, mod_rewrite is essential.

# a2enmod rewrite

* 下記はRecommended。デフォルトで幾つかは有効になっているかも。
# a2enmod headers
# a2enmod env
# a2enmod dir
# a2enmod mime

SSL Configuration

Apache installed under Ubuntu comes already set-up with a simple self-signed certificate. All you have to do is to enable the ssl module and the default site. Open a terminal and run:

Apache installed on Ubuntu is pre-configured with a simple self-signed certificate. Simply enable SSL module and default site

# a2enmod ssl
# a2ensite default-ssl
# service apache2 reload

Try visiting the site

Try accessing https://xxx/owncloud. You should probably get an error like the one below. These will be resolved in the following.

Install PHP missing modules

Install a module that says it is not installed

$ sudo apt install -y php-xxx
* 必要なモジュールをインストール
* mb multibyteは、`php-mbstring`をインストール

$ systemctl restart apache2

When completed, the display will change to the following.

To be continued in the second part...

Author by

Updated on December 06, 2017