-
Notifications
You must be signed in to change notification settings - Fork 0
Installation Guide
Mikhail Deynekin edited this page Dec 22, 2025
·
1 revision
This guide provides comprehensive instructions for installing sr-search-replace across multiple platforms and environments.
- RAM: 256 MB
- Disk Space: 50 MB for application + dependencies
- .NET Framework: 4.6.1 or higher (Windows)
- Perl: 5.8+ (Unix-like systems)
- RAM: 2+ GB
- CPU: Multi-core processor
- SSD: For optimal performance with large files
- .NET Framework: 4.8+ (Windows)
- Perl: 5.20+ with additional modules
- Ubuntu: 18.04 LTS, 20.04 LTS, 22.04 LTS
- Debian: 10, 11, 12
- CentOS/RHEL: 7, 8, 9
- Fedora: 35+
- Arch Linux: Current release
- Alpine Linux: 3.13+
- Intel-based: macOS 10.13+
- Apple Silicon: macOS 11.0+ (ARM64)
- Windows Server: 2012 R2, 2016, 2019, 2022
- Windows Desktop: Windows 7 SP1, 8.1, 10, 11
- BSD: FreeBSD 11+, OpenBSD 6.5+
- WSL2: Windows Subsystem for Linux 2
# Download the latest release
$DownloadUrl = "https://github.com/paulmann/sr-search-replace/releases/download/latest/sr.exe"
$OutputPath = "$env:ProgramFiles\sr-search-replace\sr.exe"
New-Item -ItemType Directory -Path "$env:ProgramFiles\sr-search-replace" -Force
Invoke-WebRequest -Uri $DownloadUrl -OutFile $OutputPath
# Add to PATH
$env:Path += ";$env:ProgramFiles\sr-search-replace"
[Environment]::SetEnvironmentVariable(
"Path",
$env:Path,
"User"
)# Clone the repository
git clone https://github.com/paulmann/sr-search-replace.git
cd sr-search-replace
# Build from source
make build
make install
# Verify installation
sr --versionsudo add-apt-repository ppa:paulmann/sr-search-replace
sudo apt-get update
sudo apt-get install sr-search-replacesudo dnf install sr-search-replace
# or for CentOS 7
sudo yum install sr-search-replacegit clone https://aur.archlinux.org/sr-search-replace.git
cd sr-search-replace
makepkg -si# Pull Docker image
docker pull paulmann/sr-search-replace:latest
# Create container
docker run -v /path/to/files:/data \\
paulmann/sr-search-replace:latest \\
sr --helpapiVersion: v1
kind: ConfigMap
metadata:
name: sr-config
data:
sr-config.json: |
{
"enableBackup": true,
"binaryDetection": true,
"sessionTracking": true
}
---
apiVersion: batch/v1
kind: Job
metadata:
name: sr-search-replace-job
spec:
template:
spec:
containers:
- name: sr
image: paulmann/sr-search-replace:latest
volumeMounts:
- name: data
mountPath: /data
volumes:
- name: data
persistentVolumeClaim:
claimName: data-pvc
restartPolicy: Never# Check version
sr --version
# Display help information
sr --help
# Run diagnostic
sr --diagnosemkdir -p ~/.config/sr-search-replace
cd ~/.config/sr-search-replacesr --init-config# Unix-like systems
chmod 755 ~/.config/sr-search-replace
chmod 644 ~/.config/sr-search-replace/config.json# Set configuration path
export SR_CONFIG_PATH="$HOME/.config/sr-search-replace/config.json"
# Enable verbose logging
export SR_LOG_LEVEL="DEBUG"
# Set backup directory
export SR_BACKUP_DIR="$HOME/.local/share/sr-search-replace/backups"
# Make permanent (add to ~/.bashrc or ~/.zshrc)
echo 'export SR_CONFIG_PATH="$HOME/.config/sr-search-replace/config.json"' >> ~/.bashrc
source ~/.bashrc# Solution 1: Add to PATH
export PATH="$PATH:/opt/sr-search-replace/bin"
# Solution 2: Create symbolic link
sudo ln -s /opt/sr-search-replace/bin/sr /usr/local/bin/sr
# Solution 3: Verify installation
which sr# Fix permissions
sudo chown -R $(whoami) ~/.config/sr-search-replace
sudo chmod -R 755 ~/.config/sr-search-replace# Install required Perl modules
sudo cpan install Text::Xslate
sudo cpan install JSON::PP
sudo cpan install File::Find::Rule# Remove application directory
Remove-Item -Path "$env:ProgramFiles\sr-search-replace" -Recurse -Force
# Remove from PATH (if needed)# Via package manager
sudo apt-get remove sr-search-replace # Debian/Ubuntu
sudo dnf remove sr-search-replace # Fedora/CentOS
# Via manual installation
sudo rm -rf /opt/sr-search-replace
sudo rm /usr/local/bin/srrm -rf ~/.config/sr-search-replace
rm -rf ~/.local/share/sr-search-replaceAfter successful installation, proceed to: