A robust, cross-distribution Bash script to automate the setup of Node Media Server (NMS) on Linux systems. This script handles everything from system updates to firewall configuration, SELinux contexts, and service deployment with customizable options.
- Cross-Distro Compatibility: Works on Debian, Ubuntu, Fedora, CentOS, RHEL, Arch, and more.
- Customizable: Configurable via
/etc/setup_script.conf
for Node.js version, NMS version, ports, and more. - Firewall Support: Configures
ufw
,firewalld
, oriptables
based on the distro. - SELinux Aware: Applies contexts on RHEL-based systems where enabled.
- Multi-Port Support: Supports multiple ports (e.g., RTMP, HTTP) for NMS.
- Error Handling: Detailed logging, rollback on failure (optional), and port conflict detection.
- System Optimization: Sets up ZRAM, SSD trim, journald, and automatic updates.
- User-Friendly: Progress tracking, interactive prompts, and a detailed summary.
- Root Access: Must run with
sudo
or as root. - Internet Connection: Required for package downloads and updates.
- Supported OS: Any Linux distro with
bash
(systemd recommended for full functionality).
- Clone or Download:
git clone https://github.com/yourusername/nms-setup.git cd nms-setup
- Set Permissions:
chmod 755 setup.sh
- Run the Script:
sudo ./setup.sh