Quick Setup with Standalone Script (Recommended)
Download and run the standalone initialization script - no need to clone the repository first:
- Download and run initialization script in one command
Run this from any directory
curl -sSL https://raw.githubusercontent.com/AxiosLeo/ubuntu-ops-template/main/scripts/init_workspace.sh | bashuse this command in china
curl -sSL https://ghfast.top/https://raw.githubusercontent.com/AxiosLeo/ubuntu-ops-template/main/scripts/init_workspace.sh | bash- Or download first, then run
curl -sSL https://raw.githubusercontent.com/AxiosLeo/ubuntu-ops-template/main/scripts/init_workspace.sh -o init_workspace.sh
chmod +x init_workspace.sh
./init_workspace.shWhat init-workspace does:
- ✅ Sets up proper file permissions
- ✅ Updates system packages
- ✅ Installs Git with configuration
- ✅ Prepares development environment
Next Steps:
# Install specific software
make install-docker # Docker & Docker Compose
make install-nginx # Nginx web server
make install-nodejs # Node.js via NVM
make install-python # Python via Miniconda
# Or install everything at once
make install-all
# Setup complete environments
make setup-dev # Development environment
make setup-web # Web server environmentClone this repository to your system root directory and name it workspace:
# Clone to system root directory
sudo git clone https://github.com/axiosleo/ubuntu-ops-template.git /workspace
# Change ownership to current user
sudo chown -R $USER:$USER /workspace
# Navigate to workspace
cd /workspace
# Make scripts executable
chmod +x scripts/*.sh
# Or use Makefile
make make-executableIf you prefer to clone to your user directory:
# Clone to user home directory
git clone https://github.com/axiosleo/ubuntu-ops-template.git ~/workspace
# Navigate to workspace
cd ~/workspace
# Make scripts executable
chmod +x scripts/*.sh📍 Important: Make sure you are in the
/workspacedirectory before running any commands below.
# Show all available commands
make help
# Check system status
make status
# Install all software at once
make install-all
# Install specific software
make install-docker
make install-git
make install-nginx
make install-nodejs
make install-python
# Setup environment profiles
make setup-dev # Complete development environment
make setup-web # Web server environment
make setup-basic # Basic server essentials
# Utility commands
make update # Update system packages
make test # Test installed software
make clean # Clean up caches
make backup-config # Backup configurations# Interactive installation menu
./scripts/install_all.sh
# Individual installations
./scripts/install_docker.sh
./scripts/install_git.sh
./scripts/install_nginx.sh
./scripts/install_nodejs.sh
./scripts/install_python.sh| Command | Description |
|---|---|
make help |
Show all available commands |
make status |
Show installation status |
make install-all |
Install all available software |
make install-git |
Install and configure Git |
make install-docker |
Install Docker CE and Docker Compose |
make install-nginx |
Install and configure Nginx |
make install-nodejs |
Install Node.js using NVM |
make install-python |
Install Python using Miniconda |
make setup-dev |
Setup complete development environment |
make setup-web |
Setup web server environment |
make setup-basic |
Setup basic server essentials |
make update |
Update system packages |
make test |
Test if installed software works |
make clean |
Clean up temporary files and caches |
make backup-config |
Backup important configuration files |
make interactive |
Run interactive installation menu |
make clone-workspace |
Clone project to /workspace directory |
make init-workspace |
Initialize workspace and install essentials |
- Git
- Node.js
- Nginx
- Docker
- Python (Miniconda)
- SSH Configuration
vi /etc/ssh/sshd_config
PasswordAuthentication no
PubkeyAuthentication yes
PermitEmptyPasswords no| Directory | Description |
|---|---|
| assets | Static resource files, installation packages, etc. |
| bin | Startup scripts |
| infrastructure | Infrastructure configuration related |
| scripts | Server operation related scripts |
| nginx-config | Nginx related configuration |
| temp | Temporary directory for pulling third-party project source code (GitHub/Gitee) for testing |
| projects | Self-developed project source code, stored on coding platform |
| dist | Compiled and packaged artifact storage path |
All installation scripts now include:
- ✅ Error Handling: Automatic error detection and graceful failure
- ✅ Pre-installation Checks: Verify if software is already installed
- ✅ Interactive Prompts: User-friendly configuration options
- ✅ Colored Output: Clear visual feedback with color-coded messages
- ✅ Logging: Detailed installation progress and status
- ✅ Post-installation Verification: Automatic testing of installations
- Installs Docker CE and Docker Compose
- Adds current user to docker group
- Enables Docker service
- Provides usage instructions
- Installs Git with interactive configuration
- SSH key generation for GitHub/GitLab
- Sets up useful Git defaults
- Credential caching options
- Installs and configures Nginx
- Sets up firewall rules (if ufw available)
- Creates configuration backups
- Provides management commands
- Installs NVM (Node Version Manager)
- Installs Node.js v22
- Configures npm registry options
- Installs useful global packages (yarn, pnpm, pm2)
- Downloads and installs Miniconda
- Creates Python 3.13 environment
- Installs essential packages
- Configures pip mirror options
- Interactive menu system
- Selective installation options
- System requirements checking
- Progress tracking
- Ubuntu Linux (18.04+)
- Git (for cloning the repository)
- sudo privileges
- Internet connection
- Basic command line knowledge
# Navigate to workspace directory
cd /workspace
# Quick development setup
make setup-dev
# Or step by step
make install-git
make install-docker
make install-nodejs
make install-python# Navigate to workspace directory
cd /workspace
# Quick web server setup
make setup-web
# Or step by step
make install-nginx
make install-nodejs
make install-docker# Navigate to workspace directory
cd /workspace
# Update system
make update
# Check what's installed
make status
# Test installations
make test
# Clean up
make clean
# Backup configs
make backup-config