Ir al contenido

OWASP Juice Shopのインストールドキュメンテーション

環境: Ubuntu Server 技術: Node.js + Express + Angular

0閲覧数

環境: Ubuntu Server 技術: Node.js + Express + Angular

OWASP Juice Shopは、Node.jsの最新バージョン(v18以上)を必要とします。バージョン22をインストールします。

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

3. インストールとビルド(Build)

Sección titulada «3. Instalación y Compilación (Build)»

このステップは重要です。失敗すると、サーバーが起動しなくなります(エラー CONNECTION_REFUSED)。書き込み権限でnpm installを実行し、buildフォルダを生成する必要があります。

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

4. サービスの管理(起動と停止)

Sección titulada «4. Gestión del Servicio (Iniciar y Parar)»

OWASP Juice Shopは、Apacheなどのシステムサービスではなく、ターミナルで常時実行する必要のあるNode.jsプロセスです。

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

info: Server listening on port 3000のメッセージが表示されるまで待ちます

Webアクセス: http://TU_IP:3000

実行中のターミナルで、次に入力します: Ctrl + C