LoginSignup
0
2

More than 5 years have passed since last update.

Ubuntu 17.10 へ ownCloud をインストール (前編)

Last updated at Posted at 2017-12-05

情報元はこちら。
https://doc.owncloud.org/server/latest/admin_manual/installation/linux_installation.html

owncloud-filesを取得 

リポジトリキーを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

リポジトリを追加してインストール

# 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

参考
https://download.owncloud.org/download/repositories/10.0/owncloud/

Apache設定の変更

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>

enabledディレクトリに設定ファイルを追加

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

PHPが有効になっていない場合があるので、apacheのモジュールとしてphpを有効に。

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

その他のApache設定

https://doc.owncloud.org/server/10.0/admin_manual/installation/source_installation.html 
によると、mod_rewriteは必須とのこと。

# a2enmod rewrite

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

SSL設定

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:

Ubuntuでインストールされたapacheは、simple self-signed certificateでセットアップ済みである。単にsslモジュールとdefault siteを有効にすればよい

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

サイトにアクセスしてみる

https://xxx/owncloud にアクセスしてみる。
おそらく下記のようなエラーが出るはず。次でこれらを解消する。

PHPの足りないモジュールをインストール

インストールされていない、と表示されているモジュールをインストールする

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


$ systemctl restart apache2

完了すると、下記のような表示に変わる。

後編へ続く。。。
https://qiita.com/t-akumarr/items/d1880382ebbb06a8fafc

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2