Last active
November 29, 2023 11:52
-
-
Save nodomw/d879234883acc61c2a6405873fd4a851 to your computer and use it in GitHub Desktop.
xampp telepítő
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -- HASZNÁLAT -- | |
# 1. Nyiss meg egy PowerShell-t (rendes felhasználóként, nem admin-ként) | |
# 2. Futtasd le a következőt: Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser | |
# 3. Futtasd le a következőt: irm 'https://gist.githubusercontent.com/nodomw/d879234883acc61c2a6405873fd4a851/raw/xampp.ps1' | iex | |
# Ha 'mysqli' hibát kapsz akkor a php.ini-ben keresd meg a 'extension=php_mysqli.dll' sort és vedd ki a ';' karaktert a sor elejéről | |
function WriteToLine ([int]$lineNumber, [string]$filePath, [string]$replacementText) { | |
$lines = Get-Content $filePath | |
$lines[$lineNumber - 1] = $replacementText | |
$lines | Set-Content $filePath | |
} | |
if (!(Test-Path "$env:USERPROFILE\scoop")) { | |
Invoke-RestMethod get.scoop.sh | Invoke-Expression | |
} | |
scoop install git aria2 | |
scoop config aria2-warning-enabled $false | |
scoop bucket add extras | |
scoop install xampp | |
WriteToLine 60 "$env:USERPROFILE\scoop\apps\xampp\current\apache\conf\httpd.conf" "Listen 8080" | |
WriteToLine 36 "$env:USERPROFILE\scoop\apps\xampp\current\apache\conf\extra\httpd-ssl.conf" "Listen 8443" | |
WriteToLine 20 "$env:USERPROFILE\scoop\apps\xampp\current\mysql\bin\my.ini" "port = 8887" | |
WriteToLine 28 "$env:USERPROFILE\scoop\apps\xampp\current\mysql\bin\my.ini" "port = 8888" | |
WriteToLine 27 "$env:USERPROFILE\scoop\apps\xampp\current\phpMyAdmin\config.inc.php" '$cfg[''Servers''][$i][''host''] = ''127.0.0.1:8888''; ' | |
Write-Host "kész! indítsd el a xampp-ot a megfelelő modulokkal (Apache + MySQL)" -ForegroundColor Green | |
Write-Host "azután, menj a 'localhost:8080\phpmyadmin' címre a böngészőben" -ForegroundColor Green | |
Write-Host "figyelem! a XAMPP nem fogja kiírni a portokat és a PID-eket sem. ennek ellenére el fog indulni a webszerver." -ForegroundColor Yellow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment