Snappy : Install2021/02/23 |
Install Snappy that is a software deployment and package management system.
|
|
[1] | Install and Run Snapd to use Snap packages. |
# install from EPEL
[root@dlp ~]#
[root@dlp ~]# dnf --enablerepo=epel -y install snapd ln -s /var/lib/snapd/snap /snap [root@dlp ~]# echo 'export PATH=$PATH:/var/lib/snapd/snap/bin' > /etc/profile.d/snap.sh [root@dlp ~]# systemctl enable --now snapd.service snapd.socket |
[2] | Basic usage of [Snap] command. |
# list installed packages [root@dlp ~]# snap list No snaps are installed yet. Try 'snap install hello-world'. # search packages with words in Snap repository [root@dlp ~]# snap find kubernetes Name Version Publisher Notes Summary microk8s v1.20.2 canonical classic Lightweight Kubernetes for workstations and appliances eks v1.18.9 canonical classic Amazon EKS Distro (EKS-D) snap kata-containers 1.12.1 katacontainers classic Lightweight virtual machines that seamlessly plug into the containers ecosystem doctl v1.57.0 digitalocean - The official DigitalOcean command line interface kubectl 1.20.4 canonical classic Command line client for controlling a Kubernetes cluster. ..... ..... # install [hello-world] package [root@dlp ~]# snap install hello-world 2021-02-23T09:41:56+09:00 INFO Waiting for automatic snapd restart... hello-world 6.4 from Canonical✓ installed snap list Name Version Rev Tracking Publisher Notes core 16-2.48.2.1 10823 latest/stable canonical✓ core hello-world 6.4 29 latest/stable canonical✓ - # show package info [root@dlp ~]# snap info hello-world name: hello-world summary: The 'hello-world' of snaps publisher: Canonical✓ store-url: https://snapcraft.io/hello-world contact: snaps@canonical.com license: unset description: | This is a simple hello world example. commands: - hello-world.env - hello-world.evil - hello-world - hello-world.sh snap-id: buPKUD3TKqCOgLEjjHx5kSiCpIs5cMuQ tracking: latest/stable refresh-date: today at 09:42 JST channels: latest/stable: 6.4 2019-04-17 (29) 20kB - latest/candidate: 6.4 2019-04-17 (29) 20kB - latest/beta: 6.4 2019-04-17 (29) 20kB - latest/edge: 6.4 2019-04-17 (29) 20kB - installed: 6.4 (29) 20kB - # run application [root@dlp ~]# hello-world Hello World! # PATH [root@dlp ~]# which hello-world /var/lib/snapd/snap/bin/hello-world
[root@dlp ~]#
ll /var/lib/snapd/snap/bin/hello-world lrwxrwxrwx. 1 root root 13 Feb 23 09:42 /var/lib/snapd/snap/bin/hello-world -> /usr/bin/snap # disable application [root@dlp ~]# snap disable hello-world hello-world disabled snap list Name Version Rev Tracking Publisher Notes core 16-2.48.2.1 10823 latest/stable canonical✓ core hello-world 6.4 29 latest/stable canonical✓ disabled
[root@dlp ~]#
hello-world -bash: /var/lib/snapd/snap/bin/hello-world: No such file or directory # enable application [root@dlp ~]# snap enable hello-world hello-world enabled
[root@dlp ~]#
hello-world Hello World! # uninstall an application # [snap remove] requires [tar] command on the System # [tar] is not included in CentOS Stream Minimal Install [root@dlp ~]# snap remove hello-world hello-world removed snap list Name Version Rev Tracking Publisher Notes core 16-2.48.2.1 10823 latest/stable canonical✓ core |
Sponsored Link |