nextcloud:build_nextcloud_try1
Nextcloud構築の記録 (1)
前提条件
構築した場所
- WebARENA Indigo (VPS)
- 1 CPU 1 GB
- Ubuntu 22.04
ドメイン
No-IP(無料のDynamic DNSサービス)で取得
- xxx.ddns.net
作業ログ
OSのアップデート
PowerShellのsshコマンドで、VPSにログイン
(Ubuntu 22.04から「Tera Term」「RLogin」からは初期設定のままではログインできなくなった?)
PS C:\Users\hiroshi> ssh -i C:\Users\hiroshi\.ssh\private_key_webarena.txt ubuntu@xxx.ddns.net
sudo apt update sudo apt -y upgrade
Nextcloudのインストール(コマンド)
SNAPコマンドでインストール
SSL設定
ubuntu@i-19100000390517:~$ sudo snap install nextcloud nextcloud 24.0.1snap1 from Nextcloud✓ installed ubuntu@i-19100000390517:~$ sudo nextcloud.manual-install admin 'パスワード' Nextcloud was successfully installed ubuntu@i-19100000390517:~$ sudo nextcloud.occ config:system:get trusted_domains localhost ubuntu@i-19100000390517:~$ sudo nextcloud.occ config:system:set trusted_domains 1 --value=xxx.ddns.net System config value trusted_domains => 1 set to string xxx.ddns.net ubuntu@i-19100000390517:~$ sudo nextcloud.occ config:system:get trusted_domains localhost xxx.ddns.net ubuntu@i-19100000390517:~$ ubuntu@i-19100000390517:~$ sudo nextcloud.enable-https lets-encrypt In order for Let's Encrypt to verify that you actually own the domain(s) for which you're requesting a certificate, there are a number of requirements of which you need to be aware: 1. In order to register with the Let's Encrypt ACME server, you must agree to the currently-in-effect Subscriber Agreement located here: https://letsencrypt.org/repository/ By continuing to use this tool you agree to these terms. Please cancel now if otherwise. 2. You must have the domain name(s) for which you want certificates pointing at the external IP address of this machine. 3. Both ports 80 and 443 on the external IP address of this machine must point to this machine (e.g. port forwarding might need to be setup on your router). Have you met these requirements? (y/n) y Please enter an email address (for urgent notices or key recovery): xxx@xxxxxx.co.jp Please enter your domain name(s) (space-separated): xxx.ddns.net find: Failed to restore initial working directory: /home/ubuntu: Permission denied Restarting apache... done ubuntu@i-19100000390517:~$
なんかFail出てるけど大丈夫なのかな???
httpsで鍵マーク出てるし、おそらく大丈夫なんだろう。
CODEサーバー構築
Nextcloud上でOfficeファイルを扱えるようにしたいので
※いちいちsudoつけるのがツラいので ここからrootになって作業します。(自己責任で)
root@i-19100000390517:~# cd /usr/share/keyrings/ root@i-19100000390517:/usr/share/keyrings# wget https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg --2022-07-17 06:00:26-- https://collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg Resolving collaboraoffice.com (collaboraoffice.com)... 46.235.227.219, 2a00:1098:0:82:1000:25:2eeb:e3db Connecting to collaboraoffice.com (collaboraoffice.com)|46.235.227.219|:443... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://www.collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg [following] --2022-07-17 06:00:27-- https://www.collaboraoffice.com/downloads/gpg/collaboraonline-release-keyring.gpg Resolving www.collaboraoffice.com (www.collaboraoffice.com)... 46.235.227.219, 2a00:1098:0:82:1000:25:2eeb:e3db Connecting to www.collaboraoffice.com (www.collaboraoffice.com)|46.235.227.219|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 639 Saving to: ‘collaboraonline-release-keyring.gpg’ collaboraonline-release-keyrin 100%[====================================================>] 639 --.-KB/s in 0s 2022-07-17 06:00:29 (166 MB/s) - ‘collaboraonline-release-keyring.gpg’ saved [639/639] root@i-19100000390517:/usr/share/keyrings# vi /etc/apt/sources.list.d/collaboraonline.sources root@i-19100000390517:/usr/share/keyrings# cat /etc/apt/sources.list.d/collaboraonline.sources Types: deb URIs: https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu2204 Suites: ./ Signed-By: /usr/share/keyrings/collaboraonline-release-keyring.gpg root@i-19100000390517:/usr/share/keyrings# root@i-19100000390517:~# apt update : root@i-19100000390517:~# apt install coolwsd code-brand : root@i-19100000390517:~# vi /etc/coolwsd/coolwsd.xml usernameを設定 passwordを設定 root@i-19100000390517:~# cd /etc/coolwsd/ root@i-19100000390517:/etc/coolwsd# cp /var/snap/nextcloud/current/certs/certbot/config/archive/xxx.ddns.net/ cert1.pem chain1.pem fullchain1.pem privkey1.pem root@i-19100000390517:/etc/coolwsd# cp /var/snap/nextcloud/current/certs/certbot/config/archive/xxx.ddns.net/cert1.pem ./c ert.pem root@i-19100000390517:/etc/coolwsd# cp /var/snap/nextcloud/current/certs/certbot/config/archive/xxx.ddns.net/privkey1.pem ./key.pem root@i-19100000390517:/etc/coolwsd# cp /var/snap/nextcloud/current/certs/certbot/config/archive/xxx.ddns.net/fullchain1.pem ./ca-chain.cert.pem root@i-19100000390517:/etc/coolwsd# chown cool:cool *.pem root@i-19100000390517:/etc/coolwsd# root@i-19100000390517:/etc/coolwsd# systemctl start coolwsd root@i-19100000390517:/etc/coolwsd#
nextcloud/build_nextcloud_try1.txt · 最終更新: 2022/07/17 15:27 by nipa28