How to Install Glances using Snap on AlmaLinux 9
Glances is a cross-platform curses-based system monitoring tool written in Python. Glances provide information regarding memory, CPU, Disk IO, file system, Uptime, processes, interfaces, alerts & many other system information.
Update System
dnf update
Install EPEL Repo
Install EPEL Repo by running the following command.
dnf install epel-release
Install Snap Package
dnf install snapd
Output:
[root@server ~]# dnf install snapd
Last metadata expiration check: 1:22:19 ago on Wed May 25 15:05:23 2022.
Dependencies resolved.
================================================================================
Package Architecture Version Repository Size
================================================================================
Installing:
snapd x86_64 2.55.3-1.el9 epel 15 M
Installing dependencies:
bash-completion noarch 1:2.11-4.el9 baseos 291 k
libpkgconf x86_64 1.7.3-9.el9 baseos 35 k
pkgconf x86_64 1.7.3-9.el9 baseos 40 k
pkgconf-m4 noarch 1.7.3-9.el9 baseos 14 k
pkgconf-pkg-config x86_64 1.7.3-9.el9 baseos 9.8 k
snap-confine x86_64 2.55.3-1.el9 epel 2.5 M
snapd-selinux noarch 2.55.3-1.el9 epel 234 k
Transaction Summary
Run the below commands to start and enable the Snap upon boot.
systemctl start snapd.socket
systemctl enable snapd.socket
To check status
systemctl status snapd.socket
Output:
[root@server ~]# systemctl start snapd.socket
[root@server ~]# systemctl enable snapd.socket
Created symlink /etc/systemd/system/sockets.target.wants/snapd.socket → /usr/lib /systemd/system/snapd.socket.
[root@server ~]# systemctl status snapd.socket
● snapd.socket - Socket activation for snappy daemon
Loaded: loaded (/usr/lib/systemd/system/snapd.socket; enabled; vendor pres>
Active: active (listening) since Wed 2022-05-25 16:31:32 CEST; 21s ago
Until: Wed 2022-05-25 16:31:32 CEST; 21s ago
Triggers: ● snapd.service
Listen: /run/snapd.socket (Stream)
/run/snapd-snap.socket (Stream)
Tasks: 0 (limit: 5912)
Memory: 0B
CPU: 490us
CGroup: /system.slice/snapd.socket
Enable the classic snap support by creating a symbolic link from /var/lib/snapd/snap
to /snap
with the command below:
ln -s /var/lib/snapd/snap /snap
To check the version of snap run the command:
snap --version
Output:
[root@server ~]# snap version
snap 2.55.3-1.el9
snapd 2.55.3-1.el9
series 16
almalinux 9.0
kernel 5.14.0-70.5.1.el9_0.x86_64
Install Glances via Snap
snap install glances
Firewall Configuration
Glances listen on port 61208 by default and enable ports in the firewall to use glances from the browser.
firewall-cmd --zone=public --add-port=61208/tcp --permanent
firewall-cmd --reload
Once successfully installed, we can use it for real-time Linux monitoring by opening the terminal & running the following command below:
glances
glances -w
Output:
[root@server ~]# glances -w
Glances Web User Interface started on http://0.0.0.0:61208/
Now, open your web browser and access your website using the URL http://your-server-ip-address:61208/
.