Skip to content

Instantly share code, notes, and snippets.

@watson
Forked from FeodorFitsner/install-redis.ps1
Last active January 23, 2018 09:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save watson/67442d8f53eefdac1dca0b41ed7563d0 to your computer and use it in GitHub Desktop.
Save watson/67442d8f53eefdac1dca0b41ed7563d0 to your computer and use it in GitHub Desktop.
Install Redis
Write-Host "Downloading Redis..." -ForegroundColor Cyan
$redisRoot = "$env:SYSTEMDRIVE\Redis"
$zipPath = "$($env:USERPROFILE)\redis-2.8.19.zip"
(New-Object Net.WebClient).DownloadFile('https://github.com/MSOpenTech/redis/releases/download/win-2.8.19/redis-2.8.19.zip', $zipPath)
7z x $zipPath -y -o"$redisRoot" | Out-Null
del $zipPath
Write-Host "Installing Redis as a Windows service..."
& "$redisRoot\redis-server.exe" --service-install
Write-Host "Starting Redis service..."
& "$redisRoot\redis-server.exe" --service-start
Write-Host "Redis installed" -ForegroundColor Green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment