# 常用Linux脚本仓库 **Repository Path**: zeruns/Linux-shell ## Basic Information - **Project Name**: 常用Linux脚本仓库 - **Description**: 用来存放一些常用的Linux脚本 - **Primary Language**: Shell - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: https://blog.zeruns.com/ - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2024-06-13 - **Last Updated**: 2026-07-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Common Linux Scripts Repository > A collection of handy Linux operations scripts: software installation, performance benchmarking, and system configuration — ready to use out of the box. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) ## Table of Contents - [Introduction](#introduction) - [Directory Structure](#directory-structure) - [Scripts](#scripts) - [Installation `install/`](#installation-install) - [Benchmark `benchmark/`](#benchmark-benchmark) - [System Configuration `system/`](#system-configuration-system) - [Requirements](#requirements) - [Installation & Usage](#installation--usage) - [Clone the Repository](#clone-the-repository) - [Download a Single Script](#download-a-single-script-no-need-to-clone-the-whole-repo) - [Usage Examples](#usage-examples) - [Contributing](#contributing) - [License](#license) - [Recommended Reading](#recommended-reading) ## Introduction This repository collects and organizes common Linux scripts, providing a convenient toolkit for Linux server management, operations, and performance evaluation. It includes installation, benchmarking, and performance-tuning scripts suitable for operators, developers, and Linux enthusiasts. Scripts are kept both at the repository root and inside categorized sub-directories. The root copies preserve compatibility with existing documentation and external links (e.g. `./LemonBench.sh`), while the sub-directories provide a usage-based entry point. When you modify a script, please update both locations to avoid divergence. ## Directory Structure ``` Linux-shell/ ├── install/ # Installation scripts │ ├── JDK21_Dragonwell21_install.sh # Alibaba Dragonwell21 JDK installer │ ├── JDK_Docker_Builder.sh # Eclipse Temurin JDK image builder │ ├── MCSManager_Docker_install.sh # MCSManager panel Docker installer │ └── Pure-FTPd_install.sh # Pure-FTPd FTP server installer ├── benchmark/ # Performance benchmark scripts │ ├── LemonBench.sh # All-in-one system benchmark tool │ └── unixbench.sh # UnixBench system benchmark tool ├── system/ # System configuration scripts │ └── setup_swap.sh # Linux Swap partition configuration ├── JDK21_Dragonwell21_install.sh # Root copy ├── LemonBench.sh # Root copy ├── Pure-FTPd_install.sh # Root copy ├── setup_swap.sh # Root copy ├── unixbench.sh # Root copy ├── README.md ├── README.en.md └── LICENSE ``` ## Scripts ### Installation `install/` | Script | Description | |--------|-------------| | `JDK21_Dragonwell21_install.sh` | One-click installer for Alibaba Dragonwell21 JDK, with automatic download and environment variable configuration | | `JDK_Docker_Builder.sh` | Eclipse Temurin JDK Docker image builder. Builds JDK 8/11/17/21/25 singly or in batch, tailored for Minecraft servers | | `MCSManager_Docker_install.sh` | One-click Docker deployer for MCSManager panel. Supports Web+Daemon combo or single-component installation, with interactive configuration | | `Pure-FTPd_install.sh` | One-click installer for the Pure-FTPd FTP server. Supports virtual user and system user authentication | ### Benchmark `benchmark/` | Script | Description | |--------|-------------| | `LemonBench.sh` | All-in-one system benchmark covering CPU, memory, disk and network tests, with streaming service unlock detection and traceroute. Supports quick mode and full mode | | `unixbench.sh` | UnixBench system performance benchmark tool for evaluating overall Linux system performance | ### System Configuration `system/` | Script | Description | |--------|-------------| | `setup_swap.sh` | Linux Swap partition configuration script. Automatically detects system environment and OpenVZ architecture, with Swap creation and optimization | ## Requirements - **OS**: Mainstream Linux distributions (CentOS / Ubuntu / Debian / Alpine, etc.) - **Shell**: Bash 4.0 or newer - **Privileges**: - Installation scripts require root. Run with `sudo` or as the root user - Benchmark scripts usually run with normal user permissions - **Network**: Installation and benchmark scripts access the internet at runtime to download required components. Ensure the server has internet connectivity - **Dependencies**: Some scripts may require additional packages (e.g. curl, fio, sysbench). The scripts will auto-detect and prompt for installation ## Installation & Usage ### Clone the Repository ```bash # Clone the full repository git clone https://gitee.com/zeruns/Linux-shell.git # Enter the directory cd Linux-shell # Make all scripts executable chmod +x *.sh install/*.sh benchmark/*.sh system/*.sh ``` ### Download a Single Script (no need to clone the whole repo) If you only need a specific script, download and execute it directly via its raw file link: ```bash # Link format # https://gitee.com/zeruns/Linux-shell/raw/master/ # Example: download the LemonBench benchmark script curl -O https://gitee.com/zeruns/Linux-shell/raw/master/benchmark/LemonBench.sh chmod +x LemonBench.sh ./LemonBench.sh --fast # Example: download an installation script curl -O https://gitee.com/zeruns/Linux-shell/raw/master/install/JDK21_Dragonwell21_install.sh chmod +x JDK21_Dragonwell21_install.sh ./JDK21_Dragonwell21_install.sh ``` ### Usage Examples #### 1. JDK21 Dragonwell Installation ```bash # Using the root copy ./JDK21_Dragonwell21_install.sh # Or using the category copy ./install/JDK21_Dragonwell21_install.sh ``` **Features:** - Automatic system architecture detection (x86_64/arm64) - Intelligent JDK version selection - Automatic environment variable configuration - Custom installation directory support #### 2. MCSManager Docker Deployment ```bash # Interactive installation wizard ./install/MCSManager_Docker_install.sh # You will be prompted to configure: # - Installation mode (combo / Web-only / Daemon-only) # - Installation directory # - Port settings # - Startup policy ``` **Features:** - Automatic Docker environment detection and installation - Multiple installation modes - Docker mirror acceleration configuration - Automatic configuration file generation - One-click uninstallation support #### 3. LemonBench System Benchmark ```bash # Quick mode (recommended for daily use) ./benchmark/LemonBench.sh --fast # Full mode (in-depth testing, longer runtime) ./benchmark/LemonBench.sh --full # Display help ./benchmark/LemonBench.sh --help ``` **Features:** - System information collection (CPU, cores, memory, disk, virtualization, OS version, kernel version) - Network information detection (IP address, ISP, bandwidth estimation) - Streaming service unlock detection (Netflix, YouTube, Bilibili, TikTok, HBO, Disney+, BBC iPlayer, etc.) - CPU performance benchmark (Sysbench) - Disk I/O performance test (FIO) - Network bandwidth test - Traceroute - Test report generation and upload #### 4. Pure-FTPd Installation ```bash # Run the installation script ./install/Pure-FTPd_install.sh ``` **Features:** - Automatic Pure-FTPd and dependency installation - Virtual user authentication configuration - Firewall rule setup - Automatic SSL/TLS certificate generation (optional) #### 5. Swap Partition Configuration ```bash # Requires root privileges sudo ./system/setup_swap.sh ``` **Features:** - Automatic system environment compatibility detection - OpenVZ architecture intelligent recognition - Swap file creation and activation - Swappiness parameter optimization - User-friendly interactive prompts #### 6. UnixBench Performance Test ```bash # Run the UnixBench test ./benchmark/unixbench.sh # Display help ./benchmark/unixbench.sh --help ``` **Features:** - Overall system performance evaluation - Multi-dimensional test items - Automatic test program compilation - Detailed test report output ## Contributing Community contributors are welcome to participate in the development and maintenance of this project: 1. **Fork the repository**: Click the Fork button in the upper-right corner 2. **Create a branch**: Create a `Feat_xxx` branch for development 3. **Commit changes**: Ensure code quality and add necessary comments 4. **Open a Pull Request**: Describe your changes and reasoning **Contribution Guidelines:** - Maintain consistent code style; use shellcheck for static analysis - Add detailed usage instructions and comments for new scripts - Ensure scripts are compatible with mainstream Linux distributions - Test thoroughly before submitting a Pull Request ## License This project is open-source under the MIT License, meaning you are free to use, modify, and distribute the code, subject to the following conditions: - Retain the original copyright notice - Include the full license text when redistributing See the [LICENSE](LICENSE) file for details. ## Recommended Reading - **Recommendations for cost-effective and cheap VPS / cloud servers:** [https://blog.zeruns.com/archives/383.html](https://blog.zeruns.com/archives/383.html) - **Recommendations and introductions to various AI model API platforms:** [https://blog.zeruns.com/archives/947.html](https://blog.zeruns.com/archives/947.html) - **Minecraft server setup tutorials:** [https://blog.zeruns.com/tag/mc/](https://blog.zeruns.com/tag/mc/) - **Hermes Agent complete deployment guide:** [https://blog.zeruns.com/archives/939.html](https://blog.zeruns.com/archives/939.html) - **Ugreen DXP4800Pro NAS unboxing review and teardown:** [https://blog.zeruns.com/archives/949.html](https://blog.zeruns.com/archives/949.html) - **Operational Amplifier (Op-Amp) beginner's guide:** [https://blog.zeruns.com/archives/938.html](https://blog.zeruns.com/archives/938.html) --- **Repository**: **Author**: zeruns **Blog**: