reposync: Mirroring a YUM Repository Locally
When machines on an intranet can’t reach public YUM mirrors directly, the common approach is to sync the entire repository down on a machine that has internet access, then serve it as a local repo. reposync does exactly that: pulls the remote repository’s rpm packages into a local directory by repoid. This post starts from the CentOS 6-era yum-utils usage (the original environment) and tests, one item at a time, the real dnf-era differences inside a Rocky Linux 9.3 container (dnf 4.14) — with...
Installing OpenResty 1.19.3.1 from Source (Linked to a Self-Built OpenSSL): Works on RHEL 8/9, Tested on Rocky 9
OpenResty bundles Nginx and a set of Lua modules into one package, and when you need custom build options, installing from source is the standard route. This post records the complete steps for source-installing OpenResty 1.19.3.1 on the RHEL family (identical commands on CentOS 8 / Rocky 9), with the focus on pointing --with-openssl correctly — it wants the OpenSSL source directory, not the install directory; get this wrong and the build fails outright. Everything here was reproduced in...
IPMI Out-of-Band Management: Remote Power Control and Hardware Status with ipmitool
When a server’s OS crashes and even SSH is unreachable, traditional remote management is helpless. IPMI exists for exactly this scenario: it operates below the operating system, so as long as the machine room still has power, you can check hardware status remotely, power on/off, and install an OS. This post records IPMI’s basic concepts and ipmitool’s common operations; installation and the error behavior in a BMC-less environment were tested in a Rocky 9 container, while remote power op...
Cobbler Automated Provisioning: From Deployment to Batch PXE Installs (Rocky Linux 9, with CentOS 7 Differences)
A dozen new machines in the server room are waiting for an OS install, and plugging a USB stick into each one is not practical. Cobbler chains PXE boot, DHCP, and answer files into one complete pipeline: a machine that boots from the network installs itself automatically. This post walks through the whole deployment in order, from installing the service to customizing installs per MAC address. The main environment is Rocky Linux 9 + Cobbler 3.3.7 (EPEL); server-side deployment, DHCP takeover,...
Installing Elasticsearch 7.6.1: Manual tarball Deployment with a Custom JDK
To get Elasticsearch running quickly on Linux, manual deployment with the official tarball is the most direct route. This post records the complete installation of Elasticsearch 7.6.1 (the no-jdk build, which ships without a JDK): install the JDK first, create a dedicated user, then extract, point the setup at the JDK path, start, and verify. Every step carries a verification point, and the key error messages all come from real runs. What you end up with is a single-node ES listening on port ...
Running Tomcat in Daemon Mode with jsvc: Tested on Rocky Linux 9
A Tomcat started with startup.sh hangs off your current shell: closing the terminal or dropping the session can take the process down with it, and permission management is all-or-nothing through the starting user. Daemon mode uses jsvc to turn Tomcat into a proper service process: a root-side controller handles startup and signal handling, while the JVM runs under a dedicated non-login user, with start/stop managed through the companion daemon.sh start/stop. This post walks the whole pro...
Reading Subprocess Output in Real Time with Python: the -u Flag and flush=True
When you call an external Python script through subprocess, you often hit a strange phenomenon: the child process is clearly printing line by line, yet the parent process gets all the output only in one lump after the child finishes. The reason is that once the child’s stdout is connected to a pipe, it is no longer a terminal, and Python degrades from line buffering to block buffering — output is actually written out only when a batch accumulates (usually 4KB/8KB) or the process exits. T...