LoginSignup
0
0

More than 1 year has passed since last update.

【簡単】Linuxサーバ(Ubuntu)に管理ツールのCockpitを導入する

Last updated at Posted at 2022-01-12

ただのエンジニアのメモ書きです。参考程度にしてくださいませ。

環境

  • GCE(Google Cloud Pratform の Compute Engine)
  • Ubuntu 16.04.7 LTS

手順

公式サイトの方法でインストールする

※ちなみにaptでのインストールもできるみたいです。

. /etc/os-release
sudo apt install -t ${VERSION_CODENAME}-backports cockpit

② Cockpitの自動起動設定をする

sudo systemctl start cockpit
sudo systemctl enable --now cockpit
sudo systemctl enable --now cockpit.socket

# 確認
sudo systemctl status cockpit
sudo systemctl status cockpit.socket

③ Network Managerがenableだと、Cockpitでネットワーク操作ができないのでオフにする

参考:https://github.com/cockpit-project/cockpit/issues/8477#issuecomment-622253139

systemctl stop NetworkManager
systemctl disable NetworkManager

④ GCPのファイアウォール設定で、TCP:9090 を許可する設定をする

VPCネットワーク > ファイアーウォール を開き、以下のように入力する
なお、ここではネットワークタグcockpitとしています。

image.png
image.png
image.png

⑤ GCEでファイアーウォール設定を適応する

Compute Engine > サーバ名 > 編集 の下部に、一個上で入力したネットワークタグを入力する
image.png (44.9 kB)

⑥ 完成

https://#{グローバルIP}:9090にアクセスしてください。
証明書エラーとかでますがそのまま突き進んでください。
以下の画面が出たら成功です。LinuxにログインするIDとPWで入れます。

image.png (221.9 kB)

あとがき

Ubuntu 18.04.6 LTSはNetworkManagerをオフにしなくても大丈夫でした。
もしかしたらUbuntu16系固有のバグなのかも?

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