install-nginx.ps1 950 B

123456789101112131415161718192021222324252627
  1. Function Install-Nginx() {
  2. . .\resources\get-file.ps1
  3. . .\resources\get-link.ps1
  4. . .\resources\install-7zip.ps1
  5. Write-Host "Going to install NGINX"
  6. Get-File http://nginx.org/download/nginx-1.12.1.zip
  7. $filename = "nginx-1.12.1.zip"
  8. ."C:\Program Files\7-Zip\7z.exe" "-e $filename"
  9. # needed for php7.0
  10. $filename = Get-File https://download.microsoft.com/download/9/3/F/93FCF1E7-E6A4-478B-96E7-D4B285925B00/vc_redist.x64.exe
  11. Start-Process vc_redist.x64.exe /quiet -Wait
  12. Write-Host Going to install PHP 7.2
  13. $url = "http://windows.php.net/downloads/releases/php-7.2.0-Win32-VC15-x64.zip"
  14. #$url = "http://windows.php.net/downloads/releases"
  15. #php-7.2.0-Win32-VC15-x64.zip
  16. #$link = Get-Link $url "*php-7.2*x64*"
  17. #Write-Host Download PHP from $link -ForegroundColor Cyan
  18. $filename = Get-File $url
  19. Start-Process "C:\Program Files\7-Zip\7z.exe" "-e $filename" -Wait
  20. #Set-Location "C:/nginx"
  21. }
  22. Install-Nginx