One-Click Linux Scripts to Install Rust, Tomcat, Docker, and Nginx
This guide provides four ready-to-use one‑click scripts for Linux that automate the installation of a Rust development environment, Tomcat 9 server, Docker engine, and Nginx web server, including supported distributions, usage steps, and post‑install considerations.
Script List
Rust installation script ( rust_install.sh) – installs the Rust compiler and Cargo package manager, detects the Linux distribution, installs required dependencies, and verifies the installation.
Tomcat installation script ( tomcat_install.sh) – installs Tomcat 9, automatically installs Java 8 if missing, configures the service, and enables it to start on boot.
Docker installation script ( docker_install.sh) – installs Docker Engine, Docker CLI, and Docker Compose, handling package‑manager differences across distributions.
Nginx installation script ( nginx_install.sh) – installs the Nginx web server, starts the service, and configures it for automatic startup.
General Usage
Download the desired script to your local machine.
Make the script executable: chmod +x script_name.sh Run the script (use sudo if root privileges are required):
./script_name.shDetailed Script Descriptions
1. Rust Installation Script (rust_install.sh)
Supported Distributions
Ubuntu/Debian
CentOS/RHEL
Fedora
Arch/Manjaro
openSUSE
Other common Linux releases
Usage Example
# Download the script
curl -O https://linux.nodcat.com/rust_install.sh
# Make it executable
chmod +x rust_install.sh
# Run the script (avoid running as root when possible)
./rust_install.shImportant Notes
The script checks for root execution and warns if not run as root.
After installation, reload the environment with source $HOME/.cargo/env or log out and back in.
Successful installation prints version information for rustc and cargo.
2. Tomcat Installation Script (tomcat_install.sh)
Supported Distributions
Debian/Ubuntu
CentOS/RHEL
Fedora
Arch/Manjaro
openSUSE
Usage Example
# Download the script
curl -O https://linux.nodcat.com/tomcat_install.sh
# Make it executable
chmod +x tomcat_install.sh
# Run with root privileges
sudo ./tomcat_install.shInstallation Details
Installation directory: /opt/tomcat Service user: tomcat Log file: /var/log/tomcat_install.log Access URL: http://localhost:8080 Service Management Commands
Start: systemctl start tomcat or /etc/init.d/tomcat start Stop: systemctl stop tomcat or /etc/init.d/tomcat stop Restart: systemctl restart tomcat or /etc/init.d/tomcat restart Status:
systemctl status tomcat3. Docker Installation Script (docker_install.sh)
Supported Distributions
Ubuntu/Debian
CentOS/RHEL
Fedora
Other common Linux releases
Usage Example
# Download the script
curl -O https://linux.nodcat.com/docker_install.sh
# Make it executable
chmod +x docker_install.sh
# Basic installation (requires root)
sudo ./docker_install.sh
# Install a specific version
sudo ./docker_install.sh --version 23.0
# Install from test channel
sudo ./docker_install.sh --channel test
# Use a mirror (e.g., Alibaba Cloud)
sudo ./docker_install.sh --mirror AliyunImportant Notes
After installation you can configure non‑root users to run Docker.
Rootless mode is supported for Docker 20.10 and newer.
The script automatically handles package‑manager differences across distributions.
4. Nginx Installation Script (nginx_install.sh)
Supported Distributions
Ubuntu/Debian
CentOS/RHEL
Fedora
Arch/Manjaro
openSUSE
Usage Example
# Download the script
curl -O https://linux.nodcat.com/nginx_install.sh
# Make it executable
chmod +x nginx_install.sh
# Run with root privileges
sudo ./nginx_install.shService Management
Start: systemctl start nginx or service nginx start Stop: systemctl stop nginx or service nginx stop Restart: systemctl restart nginx or service nginx restart Status check:
systemctl status nginxSigned-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Dunmao Tech Hub
Sharing selected technical articles synced from CSDN. Follow us on CSDN: Dunmao.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
