Laravel API 프로젝트 2단계 - Composer 설치

root@94aba7ed99b7:/var/www/html# apt update && apt -y install wget && apt -y install git && apt -y install vim
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8787 kB]
Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [12.7 kB]
Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [137 kB]
...
...
Processing triggers for libc-bin (2.36-9+deb12u4) ...

 

필요한 패키지 설치

wget은 composer 설치시 필요

git은 Laravel 설치시 소스 코드 다운로드 해서 필요

vim은 Apache 설정 파일 수정할 때 필요

 

root@94aba7ed99b7:/var/www/html# git config --global user.email "email@gmail.com"
root@94aba7ed99b7:/var/www/html# git config --global user.name "username"

 

Git email, name 설정 (Laravel 설치시 등록 하라고 나와서 미리 등록함)

 

root@94aba7ed99b7:/var/www/html# wget https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer -O - -q | php -- --quiet

Deprecated: Function openssl_free_key() is deprecated in Standard input code on line 982
root@94aba7ed99b7:/var/www/html# mv composer.phar /usr/local/bin/composer

 

composer 설치

 

root@94aba7ed99b7:/var/www/html# composer
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 2.6.6 2023-12-08 18:32:26

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display help for the given command. When no command is given display help for the list command
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi|--no-ansi           Force (or disable --no-ansi) ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
      --no-scripts               Skips the execution of all scripts defined in composer.json file.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
      --no-cache                 Prevent use of the cache
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

 

composer 잘 되나 실행