Install ownCloud to Ubuntu 17.10 (Part 1)

0

The source of the information is here. https://doc.owncloud.org/server/latest/admin_manual/installation/linux_installation.html

Get owncloud-files

Add Repository Key to APT

# wget -nv https://download.owncloud.org/download/repositories/10.0.3/Ubuntu_17.04/Release.key -O Release.key
# apt-key add - < Release.key

Add and install the repository

# echo 'deb http://download.owncloud.org/download/repositories/10.0.3/Ubuntu_17.04/ /' > /etc/apt/sources.list.d/owncloud.list
# apt-get update
# apt-get install owncloud-files

reference https://download.owncloud.org/download/repositories/10.0/owncloud/

Modifying Apache Configuration

Create a configuration file for owncloud

# touch /etc/apache2/sites-available/owncloud.conf
/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
 </IfModule>

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

</Directory>

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

https://doc.owncloud.org/server/10.0/admin_manual/installation/source_installation.html  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... https://qiita.com/t-akumarr/items/d1880382ebbb06a8fafc

Share:
0
Author by

Updated on December 06, 2017