Ir al contenido

Installatiedocumentatie: OWASP Juice Shop

Omgeving: Ubuntu Server Technologie: Node.js + Express + Angular

0lecturas

Omgeving: Ubuntu Server Technologie: Node.js + Express + Angular

OWASP Juice Shop vereist een moderne versie van Node.js (v18 of hoger). We zullen versie 22 installeren.

Ventana de terminal
sudo apt update
curl -fsSL [https://deb.nodesource.com/setup_22.x](https://deb.nodesource.com/setup_22.x) | sudo -E bash -
sudo apt install -y nodejs
# Verificar versión
node -v
# Debe ser v20+
Ventana de terminal
cd /var/www/html
sudo git clone [https://github.com/juice-shop/juice-shop.git](https://github.com/juice-shop/juice-shop.git)
cd juice-shop

Deze stap is kritiek. Als het mislukt, start de server niet op (Fout CONNECTION_REFUSED). We moeten npm install uitvoeren met schrijfrechten om de map build te genereren.

Ventana de terminal
# 1. Asignar propiedad a tu usuario actual para poder compilar
sudo chown -R $USER:$USER /var/www/html/juice-shop
# 2. Instalar dependencias y compilar la aplicación
npm install
# 3. Devolver la propiedad al usuario web (seguridad)
sudo chown -R www-data:www-data /var/www/html/juice-shop

OWASP Juice Shop is geen systeemdienst (zoals Apache), het is een Node.js-proces dat we actief moeten houden in de terminal.

Ventana de terminal
cd /var/www/html/juice-shop
sudo -u www-data npm start

We wachten tot we de melding zien: info: Server listening on port 3000

Webtoegang: http://TU_IP:3000

In de terminal waar het wordt uitgevoerd, drukken we: Ctrl + C