### Install and Enable Varnish Service Source: https://docs.rockylinux.org/books/web_services/052-load-balancer-proxies-varnish Installs Varnish using dnf, enables it to start on boot, and starts the service. ```bash dnf install -y varnish systemctl enable varnish systemctl start varnish ``` -------------------------------- ### Install the community.general Collection Source: https://docs.rockylinux.org/books/learning_ansible/04-ansible-galaxy This example shows the command to install the `community.general` collection and the output indicating a successful installation. ```bash ansible-galaxy collection install community.general Starting galaxy collection install process Process install dependency map Starting collection install process Downloading https://galaxy.ansible.com/download/community-general-3.3.2.tar.gz to /home/ansible/.ansible/tmp/ansible-local-51384hsuhf3t5/tmpr_c9qrt1/community-general-3.3.2-f4q9u4dg Installing 'community.general:3.3.2' to '/home/ansible/.ansible/collections/ansible_collections/community/general' community.general:3.3.2 was installed successfully ``` -------------------------------- ### Install with verbose, directory creation, and target options Source: https://docs.rockylinux.org/books/admin_guide/04-advanced-commands This example demonstrates creating a directory and copying a file verbosely, showing the process and output. ```bash $ install -v -D -t ~/samples/ src/sample.txt install: creating directory '~/samples' 'src/sample.txt' -> '~/samples/sample.txt' ``` -------------------------------- ### Query and List RPM Packages with Options Source: https://docs.rockylinux.org/books/admin_guide/13-softwares These examples demonstrate querying all installed packages, querying specific packages with detailed information and file lists, and listing the last installed packages. ```bash sudo rpm -qa ``` ```bash sudo rpm -qilp zork-1.0.3-1.el8.x86_64.rpm tree-1.7.0-15.el8.x86_64.rpm ``` ```bash sudo rpm -qa --last | head ``` ```bash sudo rpm -qa --last kernel ``` -------------------------------- ### Enable and Start OliveTin Service Source: https://docs.rockylinux.org/guides/automation/olivetin Use this command to enable OliveTin to start on boot and start it immediately. This is the initial setup command. ```bash sudo systemctl enable --now OliveTin ``` -------------------------------- ### Install and Enable Nginx Source: https://docs.rockylinux.org/books/web_services/022-web-servers-nginx?q= Installs the Nginx web server and enables it to start automatically on boot. ```bash sudo dnf install nginx sudo systemctl enable nginx --now ``` -------------------------------- ### Basic Docker Setup Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_tool_guide Sets up the documentation environment using Docker, providing an isolated and consistent build environment without local Python dependency installation. ```bash ./rockydocs.sh --setup --docker ``` -------------------------------- ### Kickstart Configuration File Example Source: https://docs.rockylinux.org/guides/automation/templates-automation-packer-vsphere?q= An example Kickstart file used by Anaconda for automated installation. It configures repositories, network settings, disk partitioning, and system services. ```bash # Use CD-ROM installation media repo --name="AppStream" --baseurl="http://download.rockylinux.org/pub/rocky/8.4/AppStream/x86_64/os/" cdrom # Use text install text # Don't run the Setup Agent on first boot firstboot --disabled eula --agreed ignoredisk --only-use=sda # Keyboard layouts keyboard --vckeymap=us --xlayouts='us' # System language lang en_US.UTF-8 # Network information network --bootproto=static --device=ens192 --gateway=192.168.1.254 --ip=192.168.1.11 --nameserver=192.168.1.254,4.4.4.4 --netmask=255.255.255.0 --onboot=on --ipv6=auto --activate # Root password rootpw mysecurepassword # System services selinux --permissive firewall --enabled services --enabled="NetworkManager,sshd,chronyd" # System timezone timezone Europe/Paris --isUtc # System booloader configuration bootloader --location=mbr --boot-drive=sda # Partition clearing information clearpart --all --initlabel --drives=sda ``` -------------------------------- ### Install and Enable pcsd Daemon Source: https://docs.rockylinux.org/books/web_services/07-high-availability?q= Install the pcs package and enable the pcsd service to start on boot and immediately. ```bash sudo dnf install pcs sudo systemctl enable pcsd --now ``` -------------------------------- ### Install and Enable OpenIPMI Service Source: https://docs.rockylinux.org/guides/hardware/ipmi_management Install the OpenIPMI package using dnf and then enable and start the ipmi service. This is useful if the service is not installed or not running. ```bash sudo dnf install OpenIPMI ``` ```bash sudo systemctl enable --now ipmi ``` -------------------------------- ### Install and Enable Squid Service Source: https://docs.rockylinux.org/books/web_services/053-load-balancer-proxies-squid Install the Squid package using DNF, enable the service to start on boot, and configure the firewall. ```bash sudo dnf install squid sudo systemctl enable squid sudo firewall-cmd --add-port=3128/tcp --permanent sudo firewall-cmd --reload ``` -------------------------------- ### Install Varnish Source: https://docs.rockylinux.org/books/web_services/052-load-balancer-proxies-varnish Installs Varnish, enables and starts the service, and configures the firewall to allow access on port 6081. ```bash sudo dnf install -y varnish sudo systemctl enable varnishd --now sudo firewall-cmd --permanent --add-port=6081/tcp --permanent sudo firewall-cmd --reload ``` -------------------------------- ### Start Rsync Daemon Service Source: https://docs.rockylinux.org/books/learning_rsync/03_rsync_demo02 Install the rsync daemon package if necessary and start the `rsyncd.service`. Verify it is listening on the configured port. ```bash [root@Rocky ~]# systemctl start rsyncd.service [root@Rocky ~]# netstat -tulnp Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 691/sshd tcp 0 0 192.168.100.4:873 0.0.0.0:* LISTEN 4607/rsync tcp6 0 0 :::22 :::* LISTEN 691/sshd udp 0 0 127.0.0.1:323 0.0.0.0:* 671/chronyd udp6 0 0 ::1:323 :::* 671/chronyd ``` -------------------------------- ### Enable Quadlet Service for Autostart Source: https://docs.rockylinux.org/gemstones/containers/podman?q= Add an [Install] section to the Quadlet file to enable the service to start automatically on system boot or user login. ```ini [Install] WantedBy=default.target ``` -------------------------------- ### Install Apache (Passive Voice) Source: https://docs.rockylinux.org/rocky_insights/blogs/active_voice Example of a passive voice instruction for installing Apache. This phrasing is less direct and uses more words. ```text For our web platform, Apache must be installed using this command: sudo dnf install httpd ``` -------------------------------- ### PAM Configuration Example Source: https://docs.rockylinux.org/books/security_enhancements/18-about-pam This is an example of a PAM configuration file, showing the order and type of modules used for authentication, account management, password changes, and session setup. ```pam auth required pam_env.so auth sufficient pam_unix.so try_first_pass nullok auth required pam_deny.so account required pam_unix.so password requisite pam_pwquality.so try_first_pass local_users_only retry=3 authtok_type= password requisite pam_pwhistory.so remember=3 use_authtok <<<< Add a new line password sufficient pam_unix.so try_first_pass use_authtok sha512 shadow password required pam_deny.so session optional pam_keyinit.so revoke session required pam_limits.so -session optional pam_systemd.so session [success=1 default=ignore] pam_succeed_if.so service in crond quiet use_uid session required pam_unix.so ``` -------------------------------- ### Install Apache (Passive Voice) Source: https://docs.rockylinux.org/rocky_insights/blogs/active_voice?q= Example of a passive voice instruction for installing Apache. This phrasing is less direct and uses more words. ```text For our web platform, Apache must be installed using this command: `sudo dnf install httpd` ``` -------------------------------- ### Configure Boot Command for Installation Source: https://docs.rockylinux.org/guides/automation/templates-automation-packer-vsphere?q= Define the command executed during boot to configure network settings and point to the Kickstart file. This example uses static IP configuration. ```json "boot_command": [ " text ip=192.168.1.11::192.168.1.254:255.255.255.0:template:ens192:none nameserver=192.168.1.254 inst.ks=http://{{ user `HTTP_IP` }}/{{ user `HTTP_PATH` }}" ], ``` -------------------------------- ### Install Apache and PHP Source: https://docs.rockylinux.org/guides/web/apache-sites-enabled Installs the Apache web server and PHP package from the Rocky Linux repositories. This is a common starting point for web server setups. ```bash dnf install httpd php ``` -------------------------------- ### Setup Project Directory and Permissions Source: https://docs.rockylinux.org/books/admin_guide/14-special-authority This snippet demonstrates creating a directory, setting its owner and group, and assigning initial permissions using `groupadd`, `mkdir`, `chown`, and `chmod`. ```Shell # The teacher is the root user Shell > groupadd class1 Shell > mkdir /project Shell > chown root:class1 /project Shell > chmod 770 /project Shell > ls -ld /project/ drwxrwx--- 2 root class1 4096 Jan 12 12:58 /project/ ``` -------------------------------- ### Install directive example Source: https://docs.rockylinux.org/books/admin_guide/16-about-sytemd The `WantedBy` directive in the `[Install]` section specifies the target that should include this unit when enabled. `multi-user.target` is commonly used for services that should start in a normal multi-user system. ```systemd-unit-file [Install] WantedBy=multi-user.target ``` -------------------------------- ### Initialize Incus Server Source: https://docs.rockylinux.org/books/incus_server/03-incusinit?q= Run this command to start the interactive Incus initialization script. It will guide you through the setup process. ```bash incus admin init ``` -------------------------------- ### Serve Static Production-Identical Website Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_tool_guide Start a local web server to preview the documentation in static mode, serving pre-built files exactly as they appear in production. Changes require re-running --deploy. ```bash ./rockydocs.sh --serve --static ``` -------------------------------- ### Get Detailed RockyDocs Help Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_tool_guide Access comprehensive help for the rockydocs.sh script and its subcommands like --setup and --serve by using the --help flag. ```bash ./rockydocs.sh --help ./rockydocs.sh --setup --help ./rockydocs.sh --serve --help ``` -------------------------------- ### Enable and Secure MariaDB Source: https://docs.rockylinux.org/guides/cms/mediawiki Enables the MariaDB service to start on boot and runs the security setup script. It's important to secure your database installation. ```bash systemctl enable --now mariadb mysql_secure_installation ``` -------------------------------- ### Create and Boot Base Image for Customization Source: https://docs.rockylinux.org/guides/virtualization/cloud-init/05_image_builders_perspective Use qemu-img to create a disk image and virt-install to boot a base cloud image for modification. Connect to the console to begin customization. ```bash qemu-img create -f qcow2 -o size=10G golden-image-template.qcow2 virt-install --name golden-image-builder \ --memory 2048 --vcpus 2 \ --disk path=golden-image-template.qcow2,format=qcow2 \ --cloud-init none --os-variant rockylinux10 --import virsh console golden-image-builder ``` -------------------------------- ### DNF Group Install Output Example Source: https://docs.rockylinux.org/guides/package_management/dnf_package_manager?q= This is an example of the output you might see when installing a package group like 'xfce' using DNF. ```bash sudo dnf group install xfce Last metadata expiration check: 1:04:31 ago on Mon 05 Feb 2024 08:31:09 PM UTC. Dependencies resolved. ``` -------------------------------- ### Serve Local Documentation with MkDocs Source: https://docs.rockylinux.org/guides/contribute/localdocs/mkdocs_venv Start the MkDocs local development server, specifying the configuration file and the Material theme. ```bash mkdocs serve -f ../docs.rockylinux.org/configs/mkdocs.yml --theme material ``` -------------------------------- ### Basic install command syntax Source: https://docs.rockylinux.org/books/admin_guide/04-advanced-commands?q= Shows the fundamental syntax for the `install` command, including copying files and creating directories. ```bash installwsource dest ``` ```bash installw-t directory source [...] ``` ```bash installw-d directory ``` -------------------------------- ### Example Flatpak List Output Source: https://docs.rockylinux.org/desktop/gnome/flatpak?q= This is an example of the output generated by the 'flatpak list' command, showing installed applications, their IDs, versions, branches, and installation types. ```text Name Application ID Version Branch Installation OBS Project com.obsproject.Studio 30.1.2 stable system FileZilla org.filezillaproject.Filezilla 3.66.1 stable system Freedesktop Platform org.freedesktop.Platform 22.08.24 22.08 system Freedesktop Platform org.freedesktop.Platform 23.08.16 23.08 system Mesa org.freedesktop.Platform.GL.default 24.0.4 22.08 system Mesa (Extra) org.freedesktop.Platform.GL.default 24.0.4 22.08-extra system Mesa org.freedesktop.Platform.GL.default 24.0.5 23.08 system Mesa (Extra) org.freedesktop.Platform.GL.default 24.0.5 23.08-extra system Intel org.freedesktop.Platform.VAAPI.Intel 22.08 system Intel org.freedesktop.Platform.VAAPI.Intel 23.08 system openh264 org.freedesktop.Platform.openh264 2.1.0 2.2.0 system openh264 org.freedesktop.Platform.openh264 2.4.1 2.4.1 system The GIMP team org.gimp.GIMP 2.10.36 stable system GNOME Application Platform version 46 org.gnome.Platform 46 system Adwaita theme org.kde.KStyle.Adwaita 6.6 system KDE Application Platform org.kde.Platform 6.6 system QGnomePlatform org.kde.PlatformTheme.QGnomePlatform 6.6 system QAdwaitaDecorations org.kde.WaylandDecoration.QAdwaitaDecorations 6.6 system ``` -------------------------------- ### Redo a Specific DNF Transaction Example Source: https://docs.rockylinux.org/guides/package_management/dnf_package_manager?q= This example demonstrates redoing transaction ID 20, which was an attempt to install 'tar'. The output shows that the package was already installed. ```bash sudo dnf history redo 20 ``` -------------------------------- ### View Installation Instructions Source: https://docs.rockylinux.org/labs/systems_administration_I/lab7-software_management?q= Use a pager like `less` to read installation or README files that accompany source code. This provides essential information before compiling. ```bash less INSTALL ``` -------------------------------- ### Install LXD Snap Package Source: https://docs.rockylinux.org/books/lxd_server/01-install?q= Installs the LXD snap package. This command only installs LXD; setup is a separate step. ```bash snap install lxd ``` -------------------------------- ### Create Disk Image and Boot Base VM Source: https://docs.rockylinux.org/guides/virtualization/cloud-init/05_image_builders_perspective?q= Use `qemu-img` to create a disk image and `virt-install` to boot a base cloud image for customization. Connect to the console using `virsh console`. ```bash # Create a disk image for our new template qemu-img create -f qcow2 -o size=10G golden-image-template.qcow2 # Boot the base image using virt-install virt-install --name golden-image-builder \ --memory 2048 --vcpus 2 \ --disk path=golden-image-template.qcow2,format=qcow2 \ --cloud-init none --os-variant rockylinux10 --import # Connect to the console and log in as the default 'rocky' user virsh console golden-image-builder ``` -------------------------------- ### Install and Enable amsd Service Source: https://docs.rockylinux.org/guides/hardware/hpe_amsd Installs the amsd package and enables it to start automatically on boot. It also updates the system before installation. ```bash dnf -y update && dnf -y install amsd systemctl enable --now amsd ``` -------------------------------- ### Enable and Start Apache Source: https://docs.rockylinux.org/guides/cms/mediawiki Enable the Apache web server to start on boot and start it immediately. ```bash systemctl enable --now httpd ``` -------------------------------- ### LXD Initialization Questions and Answers Source: https://docs.rockylinux.org/books/lxd_server/03-lxdinit?q= Example answers for the `lxd init` script, covering clustering, storage pools, networking, and remote access. ```bash Would you like to use LXD clustering? (yes/no) [default=no]: ``` ```bash Do you want to configure a new storage pool? (yes/no) [default=yes]: ``` ```bash Name of the new storage pool [default=default]: storage ``` ```bash Name of the storage backend to use (btrfs, dir, lvm, zfs, ceph) [default=zfs]: ``` ```bash Create a new ZFS pool? (yes/no) [default=yes]: no ``` ```bash Name of the existing ZFS pool or dataset: storage ``` ```bash Would you like to connect to a MAAS server? (yes/no) [default=no]: ``` ```bash Would you like to create a new local network bridge? (yes/no) [default=yes]: ``` ```bash What should the new bridge be called? [default=lxdbr0]: ``` ```bash What IPv4 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: ``` ```bash What IPv6 address should be used? (CIDR subnet notation, “auto” or “none”) [default=auto]: none ``` ```bash Would you like the LXD server to be available over the network? (yes/no) [default=no]: yes ``` ```bash Address to bind LXD to (not including port) [default=all]: ``` ```bash Port to bind LXD to [default=8443]: ``` ```bash Trust password for new clients: ``` ```bash Again: ``` ```bash Would you like stale cached images to be updated automatically? (yes/no) [default=yes] ``` ```bash Would you like a YAML "lxd init" preseed to be printed? (yes/no) [default=no]: ``` -------------------------------- ### Install `iftop` Source: https://docs.rockylinux.org/gemstones/network/iftop Installs the EPEL repository and then installs the `iftop` package using `dnf`. ```bash dnf -y install epel-release dnf -y install iftop ``` -------------------------------- ### Install DNF Environment Group Source: https://docs.rockylinux.org/labs/systems_administration_I/lab7-software_management?q= Installs all packages associated with a specified environment group, simplifying the setup of feature sets. The '-y' flag confirms the installation. ```bash sudo dnf -y group install "Development Tools" ``` -------------------------------- ### Serve Documentation with Docker (Live Development) Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_tool_guide Starts the live development server with auto-reloading capabilities using Docker. Changes are reflected instantly in the browser. ```bash ./rockydocs.sh --serve --docker ``` -------------------------------- ### Serve Documentation with Docker (Dual Servers) Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_tool_guide Starts dual servers in a containerized environment, offering both full site navigation and live content editing. ```bash ./rockydocs.sh --serve-dual --docker ``` -------------------------------- ### Launch VM with ISO Source: https://docs.rockylinux.org/guides/virtualization/cloud-init/02_first_contact Launches a virtual machine using virt-install, attaching both the VM disk image and the cloud-init configuration ISO. ```bash virt-install --name rocky10-iso-boot \ --memory 2048 --vcpus 2 \ --disk path=first-boot-vm.qcow2,format=qcow2 \ --disk path=config.iso,device=cdrom \ --os-variant rockylinux10 \ --import --noautoconsole ``` -------------------------------- ### Install and Enable Incus Source: https://docs.rockylinux.org/books/incus_server/30-appendix_a Installs the Incus server and tools, and enables the Incus systemd service to start on boot. ```bash sudo dnf install incus incus-tools sudo systemctl enable incus ``` -------------------------------- ### Enable and Start Nginx Source: https://docs.rockylinux.org/guides/containers/lxd_web_servers?q= Enable Nginx to start on boot and start the service immediately using `dnf`. ```bash dnf enable --now nginx ``` -------------------------------- ### Start VMware Tools Services Source: https://docs.rockylinux.org/guides/virtualization/vmware_tools?q= Use this command to start the VMware Tools services after installation. Ensure you have root privileges. ```bash sudo /etc/init.d/vmware-tools start Checking acpi hot plug done Starting VMware Tools services in the virtual machine: Switching to guest configuration: done Guest filesystem driver: done Mounting HGFS shares: done Blocking file system: done Guest operating system daemon: done VGAuthService: ``` -------------------------------- ### PAM Configuration Line Example Source: https://docs.rockylinux.org/guides/containers/rootless_podman_advanced This is an example of a correctly configured pam_systemd.so line in PAM configuration, using the '-session' form. ```text -session optional pam_systemd.so ``` -------------------------------- ### Install Podman and Git Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_webdev_v2?q= Installs Podman, docker-compose compatibility for Podman, and Git. Enables and starts the Podman socket service. ```bash sudo dnf -y install podman podman-docker git sudo systemctl enable --now podman.socket ``` -------------------------------- ### Install vsftpd and openssl Source: https://docs.rockylinux.org/guides/file_sharing/secure_ftp_server_vsftpd Install the vsftpd package and openssl for secure FTP server setup. This is a prerequisite for configuring the server. ```bash dnf install vsftpd openssl ``` -------------------------------- ### Install `semanage` Command Source: https://docs.rockylinux.org/guides/security/learning_selinux Install the `policycoreutils-python-utils` package to get the `semanage` command. This command is essential for managing SELinux rules. ```bash sudo dnf install policycoreutils-python-utils ``` -------------------------------- ### Install and Configure Apache Source: https://docs.rockylinux.org/books/web_services/052-load-balancer-proxies-varnish Installs Apache HTTP Server, enables it, configures the firewall, and creates a basic index.html file. ```bash sudo dnf install -y httpd mod_ssl sudo systemctl enable httpd --now sudo firewall-cmd --permanent --add-service=http sudo firewall-cmd --permanent --add-service=https sudo firewall-cmd --reload echo "Node $(hostname -f)" | sudo tee "/var/www/html/index.html" ``` -------------------------------- ### Initialize and Enable Services Source: https://docs.rockylinux.org/teams/testing/documentation/dev_guides/openqa_manual_install Initializes the PostgreSQL database and enables/starts essential openQA services, HTTPD, and libvirtd. Also configures the firewall. ```bash sudo dnf install postgresql-server sudo postgresql-setup --initdb # enable and start services sudo systemctl enable postgresql --now sudo systemctl enable httpd --now sudo systemctl enable openqa-gru --now sudo systemctl enable openqa-scheduler --now sudo systemctl enable openqa-websockets --now sudo systemctl enable openqa-webui --now sudo systemctl enable fm-consumer@fedora_openqa_scheduler --now sudo systemctl enable libvirtd --now sudo setsebool -P httpd_can_network_connect 1 sudo firewall-cmd --add-service=http --permanent sudo firewall-cmd --reload sudo systemctl restart httpd ``` -------------------------------- ### Install and Enable Redis for Fact Caching Source: https://docs.rockylinux.org/books/learning_ansible/08-management-server-optimizations Install the Redis package, start and enable the Redis service, and install the Python Redis client. This is a prerequisite for using Redis as a fact cache. ```bash sudo yum install redis sudo systemctl start redis sudo systemctl enable redis sudo pip3 install redis ``` -------------------------------- ### Start NFS Server Daemon Source: https://docs.rockylinux.org/labs/networking/lab5-nfs Starts the nfs-server daemon. This command is used to activate the NFS server services after installation or if they are stopped. ```bash systemctl start nfs-server ``` -------------------------------- ### Enable and Start Apache Service Source: https://docs.rockylinux.org/guides/web/php?q= Enable the Apache service to start on boot and start it immediately using 'systemctl'. Check its status to ensure it is running correctly. ```bash sudo systemctl enable --now httpd sudo systemctl status httpd ``` -------------------------------- ### Download and run the micro installer Source: https://docs.rockylinux.org/guides/editors/micro?q= Fetches the micro installer script from the official website and executes it. This command installs micro in the current directory. ```bash curl https://getmic.ro | bash ``` -------------------------------- ### Serve Documentation with Docker (Static Mode) Source: https://docs.rockylinux.org/guides/contribute/localdocs/rockydocs_tool_guide Starts a production-identical static server using Docker. This mode is suitable for final verification. ```bash ./rockydocs.sh --serve --docker --static ``` -------------------------------- ### Start OpenVPN Client Source: https://docs.rockylinux.org/guides/security/openvpn Initiates the OpenVPN connection using the specified client configuration file. ```bash sudo openvpn /etc/openvpn/client.conf ``` -------------------------------- ### Lsyncd Log Output Example Source: https://docs.rockylinux.org/guides/contribute/localdocs/mkdocs_lsyncd?q= This is an example of the expected output in the lsyncd log file if the service starts correctly and begins synchronization. ```log Fri Feb 25 08:10:16 2022 Normal: --- Startup, daemonizing --- Fri Feb 25 08:10:16 2022 Normal: recursive startup rsync: /home/youruser/documentation/ -> root@10.56.233.189:/home/youruser/documentation/ Fri Feb 25 08:10:41 2022 Normal: Startup of "/home/youruser/documentation/" finished: 0 Fri Feb 25 08:15:14 2022 Normal: Calling rsync with filter-list of new/modified files/dirs ``` -------------------------------- ### Start a service with systemctl Source: https://docs.rockylinux.org/labs/systems_administration_II/lab3-bootup_and_startup?q= Use `systemctl start` to initiate a service. The command should complete without output if successful. ```bash [root@localhost ~]# systemctl start crond.service ``` -------------------------------- ### Enable and Start libvirtd Service Source: https://docs.rockylinux.org/guides/virtualization/libvirt-rocky?q= Enable the libvirtd service to start on boot and start it immediately. ```bash sudo systemctl enable --now libvirtd ``` -------------------------------- ### Set up MkDocs Docs Directory Source: https://docs.rockylinux.org/guides/contribute/localdocs/mkdocs_lsyncd?q= Create the necessary 'docs' directory and symlink the documentation source into it for MkDocs to use. ```bash mkdir docs cd docs ln -s ../../documentation/docs ``` -------------------------------- ### Install EPEL Repository Source: https://docs.rockylinux.org/guides/containers/podman-nextcloud?q= Install the Extra Packages for Enterprise Linux (EPEL) repository, which provides additional packages needed for this guide. ```bash dnf -y install epel-release ``` -------------------------------- ### Install Squid Package Source: https://docs.rockylinux.org/books/web_services/053-load-balancer-proxies-squid Use this command to install the Squid proxy server package on your system. Ensure the service is not started until the cache is initialized. ```bash sudo dnf install squid ``` -------------------------------- ### Enable and Start Service Immediately Source: https://docs.rockylinux.org/labs/systems_administration_II/lab3-bootup_and_startup Use `systemctl --now enable` to both enable a service for automatic startup and start it running immediately. This is a convenient way to ensure a service is active and will persist across reboots. ```bash [root@localhost ~]# systemctl --now enable crond.service ``` -------------------------------- ### Create Site Configuration Directories Source: https://docs.rockylinux.org/guides/web/nginx-multisite Create the `sites-available` and `sites-enabled` directories to manage individual website configurations. ```bash mkdir sites-available mkdir sites-enabled ``` -------------------------------- ### Example Dependency Resolution Source: https://docs.rockylinux.org/guides/backup/rsnapshot_backup An example output showing dependency resolution during the rsnapshot installation process, including package versions and transaction summary. ```text dnf install rsnapshot rsync Last metadata expiration check: 2:03:40 ago on Fri 19 Sep 2025 03:54:16 PM UTC. Package rsync-3.4.1-2.el10.x86_64 is already installed. Dependencies resolved. ============================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================== Installing: rsnapshot noarch 1.5.1-1.el10_0 epel 112 k Installing dependencies: perl-DirHandle noarch 1.05-512.2.el10_0 appstream 12 k Transaction Summary ============================================================================================================================== Install 2 Packages Total download size: 124 k Installed size: 388 k Is this ok [y/N]: y ``` -------------------------------- ### Example Dependency Resolution Prompt Source: https://docs.rockylinux.org/guides/backup/rsnapshot_backup?q= Illustrates the DNF dependency resolution process when installing rsnapshot, showing packages to be installed and prompting for confirmation. ```bash dnf install rsnapshot rsync Last metadata expiration check: 2:03:40 ago on Fri 19 Sep 2025 03:54:16 PM UTC. Package rsync-3.4.1-2.el10.x86_64 is already installed. Dependencies resolved. ============================================================================================================================== Package Architecture Version Repository Size ============================================================================================================================== Installing: rsnapshot noarch 1.5.1-1.el10_0 epel 112 k Installing dependencies: perl-DirHandle noarch 1.05-512.2.el10_0 appstream 12 k Transaction Summary ============================================================================================================================== Install 2 Packages Total download size: 124 k Installed size: 388 k Is this ok [y/N]: y ``` -------------------------------- ### Install markdown-preview.nvim Plugin Source: https://docs.rockylinux.org/books/nvchad/plugins/md_preview?q= Add this code block to your plugins/init.lua to install the markdown-preview.nvim plugin. It's configured to be lazy-loaded and includes a build step for setup. ```lua { "iamcco/markdown-preview.nvim", cmd = {"MarkdownPreview", "MarkdownPreviewStop"}, lazy = false, build = function() vim.fn["mkdp#util#install"]() end, init = function() vim.g.mkdp_theme = 'dark' end }, ``` -------------------------------- ### Enable and Start Apache Service Source: https://docs.rockylinux.org/books/web_services/03-application-servers?q= Enable the Apache service to start on boot and start it immediately. Also, check its status. ```bash sudo systemctl enable --now httpd sudo systemctl status httpd ``` -------------------------------- ### Build ISO with Kickstart File Source: https://docs.rockylinux.org/guides/isos/iso_creation?q= Use the `mkksiso` command to create a new ISO image with an integrated kickstart file. Replace placeholders with the actual paths to your kickstart file, original ISO, and desired new ISO. ```bash mkksiso --ks ``` -------------------------------- ### Install Nginx Package Source: https://docs.rockylinux.org/guides/web/nginx-mainline Installs the Nginx web server package from the Rocky Linux repositories. This is the standard way to get Nginx on Rocky Linux. ```bash sudo dnf install nginx ``` -------------------------------- ### Create Index File for Site 1 Source: https://docs.rockylinux.org/guides/web/nginx-multisite Open an index.html file in the 'html' directory of the first test site using the nano text editor. This file will contain the basic HTML content for the first website. ```bash nano test.server.site1/html/index.html ``` -------------------------------- ### Install SELinux Management Tools Source: https://docs.rockylinux.org/guides/security/learning_selinux?q= Install the `policycoreutils-python-utils` package to get the `semanage` command and other SELinux management utilities. This command requires superuser privileges. ```bash sudo dnf install policycoreutils-python-utils ``` -------------------------------- ### Install mailx and Postfix Source: https://docs.rockylinux.org/books/learning_bash/appendix/02-variables-logs?q= Installs the mailx utility and Postfix mail transfer agent, then enables and starts the Postfix service. These are required for sending emails from the server. ```bash dnf install mailx postfix systemctl enable --now postfix ``` -------------------------------- ### Setup Tripwire Keyfiles Source: https://docs.rockylinux.org/labs/security/lab3-auditing_the_system?q= Execute the Tripwire setup utility to generate and protect configuration and policy files with passphrases. You will be prompted for both a site keyfile passphrase and a local keyfile passphrase. ```bash [root@localhost tripwire]# tripwire-setup-keyfiles ..... Enter the site keyfile passphrase: Verify the site keyfile passphrase: ...... Generating key (this may take several minutes)...Key generation complete. Enter the local keyfile passphrase: Verify the local keyfile passphrase: .... Generating key (this may take several minutes)...Key generation complete. ``` ```bash ---------------------------------------------- Signing configuration file... Please enter your site passphrase: ******** ---------------------------------------------- Signing policy file... Please enter your site passphrase: ******** ...... Wrote policy file: /etc/tripwire/tw.pol ``` -------------------------------- ### Ansistrano Custom Before Setup Tasks Source: https://docs.rockylinux.org/books/learning_ansible/05-deployments Define custom tasks to be executed before the Ansistrano setup phase. This example sends an email notification using the `mail` module. ```yaml --- - name: Send a mail mail: subject: Starting deployment on {{ ansible_hostname }}. delegate_to: localhost ``` -------------------------------- ### Configure and Mount Additional Storage Source: https://docs.rockylinux.org/guides/automation/kickstart-rocky Example of configuring and mounting additional storage during the post-installation phase. ```kickstart %post # Configure and mount additional storage %end ``` -------------------------------- ### Install and Launch nmtui Source: https://docs.rockylinux.org/gemstones/network/nmtui?q= Install the NetworkManager and nmtui packages, then launch the nmtui interface to configure network settings. ```shell shell > dnf -y install NetworkManager NetworkManager-tui shell > nmtui ``` -------------------------------- ### PHP-FPM Dynamic Process Management Example Source: https://docs.rockylinux.org/books/web_services/03-application-servers?q= Example configuration for dynamic process management in PHP-FPM, specifying maximum children, start servers, and spare server limits. ```ini pm = dynamic pm.max_children = 5 pm.start_servers = 2 pm.min_spare_servers = 1 pm.max_spare_servers = 3 ``` -------------------------------- ### Example Hosts File Configuration Source: https://docs.rockylinux.org/guides/cms/dokuwiki_server Example configuration for the /etc/hosts file, mapping a private IP to example.com. ```text 127.0.0.1 localhost 127.0.1.1 myworkstation-home 10.56.233.179 example.com example # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ``` -------------------------------- ### Uninstall Packages with RPM Source: https://docs.rockylinux.org/labs/systems_administration_I/lab7-software_management Before installing with DNF, ensure the target package and its dependencies are uninstalled using the `rpm -e` command. This is a prerequisite step for the DNF installation example. ```bash sudo rpm -e wget libmetalink ``` -------------------------------- ### Packer Provisioners Section (Shell) Source: https://docs.rockylinux.org/guides/automation/templates-automation-packer-vsphere?q= Configure provisioners to execute scripts after the OS installation. This example uses a shell provisioner to run a script for cleaning up the VM and installing additional packages. ```json "provisioners": [ { "type": "shell", "expect_disconnect": true, "execute_command": "bash '{{.Path}}'", "script": "{{template_dir}}/scripts/requirements.sh" } ], ``` -------------------------------- ### Example /etc/fstab Entry Source: https://docs.rockylinux.org/books/admin_guide/07-file-systems This is an example of how file systems are configured for automatic mounting at boot time in the /etc/fstab file. Each line defines a file system, its mount point, type, options, and dump/check order. ```shell /dev/mapper/VolGroup-lv_root / ext4 defaults 1 1 UUID=46….92 /boot ext4 defaults 1 2 /dev/mapper/VolGroup-lv_swap swap swap defaults 0 0 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 ``` -------------------------------- ### Update and Install MySQL 8.4 LTS Community Server Source: https://docs.rockylinux.org/books/web_services/042-database-servers-mysql Updates the system and installs MySQL 8.4 LTS Community Server after adding its repository. Includes example command output. ```bash $ dnf update Error: This command has to be run with superuser privileges (under the root user on most systems). [antoine@localhost ~]$ sudo dnf update MySQL 8.4 LTS Community Server 377 kB/s | 226 kB 00:00 MySQL Connectors Community 110 kB/s | 53 kB 00:00 MySQL Tools 8.4 LTS Community 170 kB/s | 97 kB 00:00 Dependencies resolved. ============================================================================================================================================= Package Architecture Version Repository Size =============================================================================================================================================Installing: mysql-community-client x86_64 8.4.0-1.el9 mysql-8.4-lts-community 3.1 M replacing mysql.x86_64 8.0.36-1.el9_3 mysql-community-server x86_64 8.4.0-1.el9 mysql-8.4-lts-community 50 M replacing mariadb-connector-c-config.noarch 3.2.6-1.el9_0 replacing mysql-server.x86_64 8.0.36-1.el9_3 Installing dependencies: ... Transaction Summary =============================================================================================================================================Install 7 Packages Total download size: 59 M Is this ok [y/N]: y Downloading Packages: (1/7): mysql-community-client-plugins-8.4.0-1.el9.x86_64.rpm 3.4 MB/s | 1.4 MB 00:00 (2/7): mysql-community-common-8.4.0-1.el9.x86_64.rpm 1.3 MB/s | 576 kB 00:00 (3/7): mysql-community-icu-data-files-8.4.0-1.el9.x86_64.rpm 30 MB/s | 2.3 MB 00:00 (4/7): mysql-community-client-8.4.0-1.el9.x86_64.rpm 5.8 MB/s | 3.1 MB 00:00 (5/7): mysql-community-libs-8.4.0-1.el9.x86_64.rpm 6.8 MB/s | 1.5 MB 00:00 (6/7): net-tools-2.0-0.62.20160912git.el9.x86_64.rpm 1.1 MB/s | 292 kB 00:00 (7/7): mysql-community-server-8.4.0-1.el9.x86_64.rpm 48 MB/s | 50 MB 00:01 ---------------------------------------------------------------------------------------------------------------------------------------------Total 30 MB/s | 59 MB 00:01 MySQL 8.4 LTS Community Server 3.0 MB/s | 3.1 kB 00:00 Importing GPG key 0xA8D3785C: Userid : "MySQL Release Engineering " Fingerprint: BCA4 3417 C3B4 85DD 128E C6D4 B7B3 B788 A8D3 785C From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql-2023 Is this ok [y/N]: y Key imported successfully Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : ... Installed: mysql-community-server-8.4.0-1.el9.x86_64 ... Complete! ``` -------------------------------- ### Start MkDocs Serve Command Source: https://docs.rockylinux.org/guides/contribute/localdocs/mkdocs_lsyncd?q= Use this command to start the MkDocs development server. It binds to all network interfaces, making the documentation accessible from other devices on your network. ```bash mkdocs serve -a 0.0.0.0:8000 ``` -------------------------------- ### Verify Environment Setup Source: https://docs.rockylinux.org/books/learning_rsync/07_rsync_unison_use Commands to verify that inotifywait is installed and SSH access is configured between machines. ```bash [root@Rocky ~]# inotifywa inotifywait inotifywatch [root@Rocky ~]# ssh -p 22 testrsync@192.168.100.5 Last login: Thu Nov 4 13:13:42 2021 from 192.168.100.4 [testrsync@fedora ~]$ ``` ```bash [root@fedora ~]# inotifywa inotifywait inotifywatch [root@fedora ~]# ssh -p 22 testrsync@192.168.100.4 Last login: Wed Nov 3 22:07:18 2021 from 192.168.100.5 [testrsync@Rocky ~]$ ``` -------------------------------- ### Run the mkdocs server Source: https://docs.rockylinux.org/guides/contribute/localdocs/local_docs?q= Start the local mkdocs development server to view the documentation. ```bash mkdocs serve ``` -------------------------------- ### Query information for 'bash' package Source: https://docs.rockylinux.org/labs/systems_administration_I/lab7-software_management?q= A simple query to get all information about the installed 'bash' package. ```bash rpm -qi bash ```