CentOS Stream9にパッケージ管理システムSnappyをインストールする

環境
OSバージョンの確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# cat /etc/redhat-release
CentOS Stream release 9
# cat /etc/redhat-release CentOS Stream release 9
# cat /etc/redhat-release
CentOS Stream release 9

Snappyのインストール手順
1.EPELからsnapdをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# dnf --enablerepo=epel -y install snapd
# dnf --enablerepo=epel -y install snapd
# dnf --enablerepo=epel -y install snapd

2.環境パスを設定します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# ln -s /var/lib/snapd/snap /snap
# echo 'export PATH=$PATH:/var/lib/snapd/snap/bin' > /etc/profile.d/snap.sh
# ln -s /var/lib/snapd/snap /snap # echo 'export PATH=$PATH:/var/lib/snapd/snap/bin' > /etc/profile.d/snap.sh
# ln -s /var/lib/snapd/snap /snap
# echo 'export PATH=$PATH:/var/lib/snapd/snap/bin' > /etc/profile.d/snap.sh

3.自動起動を設定します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# systemctl enable --now snapd.service snapd.socket
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service.
# systemctl enable --now snapd.service snapd.socket Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service.
# systemctl enable --now snapd.service snapd.socket
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service.

4.インストール済 Snap パッケージ一覧を確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# snap list
No snaps are installed yet. Try 'snap install hello-world'.
# snap list No snaps are installed yet. Try 'snap install hello-world'.
# snap list
No snaps are installed yet. Try 'snap install hello-world'.

5.「hello-world] パッケージをインストールします

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# snap install hello-world
Setup snap "core" (13250) security profiles /
2022-06-09T05:23:46+09:00 INFO Waiting for automatic snapd restart...
hello-world 6.4 from Canonical? installed
# snap install hello-world Setup snap "core" (13250) security profiles / 2022-06-09T05:23:46+09:00 INFO Waiting for automatic snapd restart... hello-world 6.4 from Canonical? installed
# snap install hello-world
Setup snap "core" (13250) security profiles /
2022-06-09T05:23:46+09:00 INFO Waiting for automatic snapd restart...
hello-world 6.4 from Canonical? installed

6.パッケージ情報を表示します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
# snap list
Name Version Rev Tracking Publisher Notes
core 16-2.55.5 13250 latest/stable canonical? core
hello-world 6.4 29 latest/stable canonical? -
# snap info hello-world
name: hello-world
summary: The 'hello-world' of snaps
publisher: Canonical?
store-url: https://snapcraft.io/hello-world
# snap list Name Version Rev Tracking Publisher Notes core 16-2.55.5 13250 latest/stable canonical? core hello-world 6.4 29 latest/stable canonical? - # snap info hello-world name: hello-world summary: The 'hello-world' of snaps publisher: Canonical? store-url: https://snapcraft.io/hello-world
# snap list
Name         Version    Rev    Tracking       Publisher   Notes
core         16-2.55.5  13250  latest/stable  canonical?  core
hello-world  6.4        29     latest/stable  canonical?  -
# snap info hello-world
name:      hello-world
summary:   The 'hello-world' of snaps
publisher: Canonical?
store-url: https://snapcraft.io/hello-world

 

CentOS Stream 9

Posted by arkgame