LoginSignup
0
0

Incus: Debian 12 を使う

Last updated at Posted at 2024-02-03

使用した incus のバージョン

$ incus --version
6.0.0

image を探す

incus image list images:debian | grep amd64

コンテナーのインストール

incus launch images:debian/12/amd64 debian12

インストールされたことを確認

$ incus list debian
+----------+---------+----------------------+------+-----------+-----------+
|   NAME   |  STATE  |         IPV4         | IPV6 |   TYPE    | SNAPSHOTS |
+----------+---------+----------------------+------+-----------+-----------+
| debian12 | RUNNING | 10.56.160.214 (eth0) |      | CONTAINER | 0         |
+----------+---------+----------------------+------+-----------+-----------+

root のパスワードを設定

incus exec debian12  -- bash
$ incus exec debian12  -- bash
root@debian12:~# 

login

incus console debian12
$ incus console debian12
To detach from the console, press: <ctrl>+a q

debian12 login:

Login 後の設定

ユーザーの作成

adduser --uid 1200 uchida
gpasswd -a uchida sudo

sshd のインストール

apt install ssh

タイムゾーンの設定

timedatectl set-timezone Asia/Tokyo

ip アドレスでログイン

ssh 10.56.160.214
$ ssh 10.56.160.214
Linux debian12 6.7.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 01 Feb 2024 10:30:35 +0000 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Feb  3 16:51:45 2024 from 10.56.160.1

パスワードなしで、sudo が実行できるようにする

sudo visudo
(省略)
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
(省略)

avahi-daemon のインストール

sudo systemctl status avahi-daemon
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