### Install and Verify Valkey on a New AL2023 Instance Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/redis6-to-valkey-al2023 Steps to install, start, enable on boot, and verify Valkey on a new Amazon Linux 2023 instance. This option is suitable for new deployments or when data migration from Redis 6 is not required. ```Shell [ec2-user ~]$ sudo dnf install valkey ``` ```Shell [ec2-user ~]$ sudo systemctl start valkey ``` ```Shell [ec2-user ~]$ sudo systemctl enable valkey ``` ```Shell [ec2-user ~]$ valkey-cli info server [ec2-user ~]$ valkey-cli ping ``` -------------------------------- ### Perform In-Place Valkey Replacement for Redis 6 on AL2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/redis6-to-valkey-al2023 Steps to replace an existing Redis 6 instance with Valkey on Amazon Linux 2023. This option is for scenarios where data persistence from the old Redis 6 instance is not required. It includes stopping Redis 6, installing Valkey, optionally migrating configuration files, starting Valkey, verifying the installation, and removing Redis 6. ```Shell [ec2-user ~]$ sudo systemctl stop redis6 ``` ```Shell [ec2-user ~]$ sudo dnf install valkey ``` ```Shell [ec2-user ~]$ sudo cp /etc/redis6/redis6.conf /etc/valkey/valkey.conf [ec2-user ~]$ sudo cp /etc/valkey/valkey.conf /etc/valkey/valkey.conf.backup [ec2-user ~]$ sudo chown valkey:root /etc/valkey/valkey.conf [ec2-user ~]$ sudo sed -i 's|^dir\s.*|dir /var/lib/valkey|g' /etc/valkey/valkey.conf ``` ```Shell [ec2-user ~]$ sudo cp /etc/redis6/sentinel.conf /etc/valkey/sentinel.conf [ec2-user ~]$ sudo chown valkey:root /etc/valkey/sentinel.conf ``` ```Shell [ec2-user ~]$ sudo systemctl start valkey ``` ```Shell [ec2-user ~]$ sudo systemctl enable valkey ``` ```Shell [ec2-user ~]$ valkey-cli info server [ec2-user ~]$ valkey-cli ping ``` ```Shell [ec2-user ~]$ sudo dnf remove redis6 ``` -------------------------------- ### Install Valkey on Amazon Linux Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/redis6-to-valkey-al2023 Installs the Valkey server package using `dnf` without removing any existing Redis 6 installation, allowing for concurrent operation. ```Shell sudo dnf install valkey ``` -------------------------------- ### Start Valkey Service Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/redis6-to-valkey-al2023 Starts the Valkey server service using `systemctl`. Ensure the Valkey configuration port is set to avoid conflicts with Redis 6 before starting. ```Shell sudo systemctl start valkey ``` -------------------------------- ### Install GNOME Desktop Environment on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/installing-gnome-al2023 This command installs the GNOME desktop environment and its related packages on an AL2023 instance using the `dnf` package manager. It requires `sudo` privileges and the `-y` flag automatically confirms all prompts. To access the graphical desktop environment after installation, additional software like Amazon DCV or VNC must be installed and configured. ```bash [ec2-user ~]$ sudo dnf groupinstall "Desktop" -y ``` -------------------------------- ### Example Amazon Linux Package Version Output Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/managing-repos-os-updates This snippet shows a typical output from an Amazon Linux 2023 system, listing installed package versions for `system-release` and `yum`. The `bash-5.2#` line indicates a shell prompt, providing context for the preceding package information. ```Shell system-release.noarch 2023.5.20240708-1.amzn2023 amazonlinux yum.noarch 4.14.0-1.amzn2023.0.5 amazonlinux bash-5.2# ``` -------------------------------- ### Installing DNF Release Notification Plugin in Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/managing-repos-os-updates Shows how to install the `dnf-plugin-release-notification` package, which provides the `check-release-update` command. The example uses the `-y` argument to automatically confirm and `-q` for quiet output during the installation process. ```Shell $ dnf -y -q install 'dnf-command(check-release-update)' Installed: dnf-plugin-release-notification-1.2-1.amzn2023.0.2.noarch ``` -------------------------------- ### Start TigerVNC Server Service Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/vnc-configuration-al2023 This command starts the TigerVNC server service for the specified display number (e.g., `:1`) using `systemctl`. This service needs to be started after every instance restart unless configured for automatic boot. ```bash sudo systemctl start vncserver@:1 ``` -------------------------------- ### Enable VNC Server to Start Automatically at Boot on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/vnc-configuration-al2023 This command configures the vncserver service to start automatically when your Amazon Linux 2023 instance boots, ensuring the graphical desktop environment is immediately accessible. The display number after @ (e.g., :1) must match the user's configuration in /etc/tigervnc/vncserver.users. The --now argument can be added to start the service immediately after enabling. ```bash [ec2-user ~]$ sudo systemctl enable vncserver@:1 ``` -------------------------------- ### Enable and Start kpatch Service on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/live-patching Enables the `kpatch` service to start automatically at boot and immediately starts it. This service is responsible for loading all applied kernel live patches. ```bash $ sudo systemctl enable kpatch.service && sudo systemctl start kpatch.service ``` -------------------------------- ### Enable Valkey Service on Boot Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/redis6-to-valkey-al2023 Configures the Valkey service to start automatically upon system boot using `systemctl`. This is an optional step for persistent Valkey operation. ```Shell sudo systemctl enable valkey ``` -------------------------------- ### Install Full Curl Package on Amazon Linux Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/release-notes/relnotes-2022.0.20220824 Instructions to switch from the minimal `curl` package to the full-featured `curl` by installing `curl-full` and `libcurl-full` using `dnf`. This command uses `--allowerasing` to replace the existing minimal package. ```Shell dnf install --allowerasing curl-full libcurl-full ``` -------------------------------- ### Install Libbrotli Compression Library on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/epel The `libbrotli` package provides the Brotli compression library. It was previously available in EPEL7. This command installs the `libbrotli` package on Amazon Linux 2023. ```shell [ec2-user ~]$ sudo dnf install libbrotli ``` -------------------------------- ### Install Inotify Tools for File System Events on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/epel The `inotify-tools` package provides command-line tools for monitoring file system events using inotify. It was available in EPEL7. This command installs `inotify-tools` on Amazon Linux 2023, though `systemd` path activation is noted as an alternative. ```shell [ec2-user ~]$ sudo dnf install inotify-tools ``` -------------------------------- ### Install Full-Featured Packages with DNF in Amazon Linux Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/release-notes/relnotes-2022.0.20221207 Commands to install the full-featured versions of `curl` and `gnupg` packages in Amazon Linux, replacing their minimal default counterparts. The `--allowerasing` flag is used to permit the replacement of existing packages. ```Bash dnf install --allowerasing curl-full libcurl-full ``` ```Bash dnf install --allowerasing gnupg2-full ``` -------------------------------- ### Verify Valkey Installation and Connectivity Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/redis6-to-valkey-al2023 Verifies the Valkey server's status and connectivity using `valkey-cli`. Replace `port` with the actual configured port number (e.g., 6380) to check server information and ping for responsiveness. ```Shell valkey-cli -p port info server valkey-cli -p port ping ``` -------------------------------- ### Install TigerVNC Server on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/vnc-configuration-al2023 This command installs the TigerVNC server package on Amazon Linux 2023 using `dnf`. The `-y` option automatically confirms the installation, allowing for unattended installation. ```bash sudo dnf install -y tigervnc-server ``` -------------------------------- ### Manually Install collectd-java with No Dependencies Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/release-notes/relnotes-2022.0.20230118 Provides a work-around for a known issue where collectd-java installation fails because the Amazon Corretto package does not announce that it provides libjvm.so. The command forces installation by ignoring dependencies. ```Shell rpm —nodeps -i collectd-java-5.12.0-16.amzn2022.0.1.x86_64.rpm ``` -------------------------------- ### Enable DNF Plugin for Kernel Live Patching on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/live-patching Enables the `kpatch-dnf` plugin and automatically installs the latest kernel live patch RPM from configured repositories. This command sets up the system for live patching. ```bash $ sudo dnf kernel-livepatch -y auto ``` -------------------------------- ### Install Smart-Restart Package on Amazon Linux 2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/managing-repos-os-updates This command installs the `smart-restart` package using the DNF package manager on Amazon Linux 2023. Once installed, `smart-restart` automatically manages service restarts following subsequent package installations or deletions. ```bash $ sudo dnf install smart-restart ``` -------------------------------- ### Install amazon-efs-utils package on AL2023 Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/efs This command installs the `amazon-efs-utils` package from the AL2023 repositories using the `dnf` package manager. This utility is essential for accessing Amazon EFS file systems. ```bash $ dnf -y install amazon-efs-utils ``` -------------------------------- ### Shell Commands to Create Dockerfile for Barebones Bash Container Source: https://docs.aws.amazon.com/linux/al2023/ug/what-is-amazon-linux.html/ug/barebones-containers These commands guide the user through creating a new directory and populating a Dockerfile within it. The `cat > Dockerfile < Dockerfile < hello-world.c < int main(void) { printf("Hello World!\n"); return 0; } EOF $ cat > Dockerfile <