NextCloud インストール
2016/07/27 |
クラウドストレージサーバー NextCloud をインストールします。
|
|
[1] | |
[2] | NextCloud は PHP 5.6 以上が必要なため、CentOS Software Collections から PHP 7.0 をインストールします。あわせて Apache httpd も CentOS Software Collections 提供のパッケージを使用します。 |
# SCLoからインストール
[root@dlp ~]#
yum --enablerepo=centos-sclo-rh -y install rh-php70 rh-php70-php rh-php70-php-pear rh-php70-php-mbstring rh-php70-php-pdo rh-php70-php-intl rh-php70-php-gd rh-php70-php-mysqlnd httpd24
[root@dlp ~]#
[root@dlp ~]# wget https://download.nextcloud.com/server/releases/nextcloud-13.0.4.zip unzip nextcloud-13.0.4.zip [root@dlp ~]# chgrp -R apache nextcloud [root@dlp ~]# chown -R apache nextcloud/{apps,config,occ} [root@dlp ~]# chmod 775 nextcloud [root@dlp ~]# mv nextcloud /opt/rh/httpd24/root/var/www/html/ [root@dlp ~]# systemctl start httpd24-httpd [root@dlp ~]# systemctl enable httpd24-httpd |
[3] | NextCloud 用のユーザーとデータベースを MariaDB に登録します。 |
[root@dlp ~]# mysql -u root -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 112 Server version: 10.1.29-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]>
create database nextcloud; Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]>
grant all privileges on nextcloud.* to nextcloud@'localhost' identified by 'password'; Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]>
MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) exit Bye |
[4] | SELinux を有効にしている場合は、許可ルールの追加が必要です。 |
[root@dlp ~]# semanage fcontext -a -t httpd_sys_rw_content_t /opt/rh/httpd24/root/var/www/html/nextcloud/apps [root@dlp ~]# semanage fcontext -a -t httpd_sys_rw_content_t /opt/rh/httpd24/root/var/www/html/nextcloud/config [root@dlp ~]# restorecon /opt/rh/httpd24/root/var/www/html/nextcloud/apps [root@dlp ~]# restorecon /opt/rh/httpd24/root/var/www/html/nextcloud/config |
[5] | Firewalld を有効にしている場合は、サービスポートの許可が必要です。 |
[root@dlp ~]# firewall-cmd --add-service={http,https} --permanent success [root@dlp ~]# firewall-cmd --reload success |
[6] | 任意のクライアントコンピューターから Webブラウザで [http://(ホスト名またはIPアドレス)/nextcloud/] へアクセスします。 すると以下のような画面が表示されるので、任意のユーザー名とパスワードを入力して、管理者ユーザーの登録をします。 さらに、データベースの設定で [MySQL/MariaDB] をクリックして選択し、事前に作成した NextCloud 用のユーザーとデータベースを指定します。 全て入力後、[セットアップを完了します] をクリックします。 |
![]() |
[7] | データベースの入力情報が正しければ、以下のように初回ログイン時の [ようこそ] 画面が表示されます。 |
![]() |
[8] | NextCloud のメイン画面になります。以上で NextCloud のインストールは完了です。 |
![]() |
[9] | ユーザープロファイルの設定から、日本語表示にも容易に切り替え可能です。 |
![]() |