OWASP Juice Shopのインストールドキュメンテーション
環境: Ubuntu Server 技術: Node.js + Express + Angular
0閲覧数
環境: Ubuntu Server 技術: Node.js + Express + Angular
1. Node.jsのインストール
Sección titulada «1. Instalación de Node.js»OWASP Juice Shopは、Node.jsの最新バージョン(v18以上)を必要とします。バージョン22をインストールします。
sudo apt updatecurl -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ónnode -v# Debe ser v20+cd /var/www/htmlsudo git clone [https://github.com/juice-shop/juice-shop.git](https://github.com/juice-shop/juice-shop.git)cd juice-shop3. インストールとビルド(Build)
Sección titulada «3. Instalación y Compilación (Build)»このステップは重要です。失敗すると、サーバーが起動しなくなります(エラー CONNECTION_REFUSED)。書き込み権限でnpm installを実行し、buildフォルダを生成する必要があります。
# 1. Asignar propiedad a tu usuario actual para poder compilarsudo chown -R $USER:$USER /var/www/html/juice-shop
# 2. Instalar dependencias y compilar la aplicaciónnpm install
# 3. Devolver la propiedad al usuario web (seguridad)sudo chown -R www-data:www-data /var/www/html/juice-shop4. サービスの管理(起動と停止)
Sección titulada «4. Gestión del Servicio (Iniciar y Parar)»OWASP Juice Shopは、Apacheなどのシステムサービスではなく、ターミナルで常時実行する必要のあるNode.jsプロセスです。
OWASP Juice Shopの起動
Sección titulada «Iniciar OWASP Juice Shop»cd /var/www/html/juice-shopsudo -u www-data npm startinfo: Server listening on port 3000のメッセージが表示されるまで待ちます
Webアクセス: http://TU_IP:3000
OWASP Juice Shopの停止
Sección titulada «Detener OWASP Juice Shop»実行中のターミナルで、次に入力します:
Ctrl + C

