LoginSignup
7
1

More than 3 years have passed since last update.

クラウドサーバーを作る

Last updated at Posted at 2020-12-08

クラウドサーバーを作る

この記事では、Raspberry Pi4、NextCloudを使ってクラウドサーバーを作成します。

環境

環境
Raspberry Pi 4 modelB
Ubuntu 20.04
NextCloud

§1.Raspberry Piをセットアップする

image.png

§1.1Ubuntuをインストールする

Raspberry Pi Imagerを使って、Ubuntu LTS 2020をMicorSDに入れます。
Imagerで、フォーマット等ができます。
image.png

フォーマット
(Rasberry Pi Imagerを使うと、フォーマットもしてくれます)
image.png

§1.2Ubuntuを起動する

image.png

ラズパイ4はデスクトップ向けUbuntuでもサクサク動きます。

§1.3アップデート

raspi2020126_4.gif

§2.クラウド構築

§2.1 NextCloudインストール

sudo snap install nextcloud

raspi10.png

§2.2 管理アカウント設定

sudo nextcloud.manual-install username password

§3.使ってみる

Raspberry PiのIPアドレスを確認して、同じネットワーク内にある別PCからwebブラウザで見るとNext Cloudを使用できるようになります。

http://ラズパイのIPアドレス

Raspberry PiのIPアドレスを固定したり、ドメインを設定することで外部からでもクラウドサーバーに接続できるようになります。
image.png

§4.おまけ(ファイルサーバーを作る)

Sambaインストール

sudo apt install samba samba-common-bin

Sambaのconfigを変える

image.png

[share]
path = /home/share
browseable = yes
writable = yes
省略

Shareフォルダを作る

image.png

Samba再起動

sudo systemctl restart samba

§5.おまけ(ラズパイにssh接続(Windows))

ssh RaspberryPiユーザ名@IPアドレス

§5.終わりに

いかがでしたでしょうか?
Raspberry Piを使うと、自宅でサーバー周りについて、手を動かしながら学べるのでとても楽しいです。

7
1
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
7
1