Install and configure php on ubuntu

  1. 패키지 리포지터리 추가
    sudo add-apt-repository ppa:ondrej/php
  2. 패키지 업데이트 및 업그레이드
    sudo apt update && sudo apt upgrade -y
  3. php 패키지 설치
    sudo apt install php php-gd php-xml php-json php-sqlite3 php-mbstring -y
    sudo apt install php-{common,cli,fpm,bcmath,bz2,cgi,curl,dba,dev,enchant,gd,gmp,imap,interbase,intl,ldap,mbstring,mysql,odbc,opcache,pgsql,phpdbg,pspell,readline,snmp,soap,sqlite3,sybase,tidy,xml,xmlrpc,zip,xsl,imagick} libapache2-mod-php -y
  4. php 정보 페이지 생성
    <?php
    phpinfo()
    ?>
  5. 웹 브라우저에서 php 정보 페이지 열어 확인
  • public/computer/install_and_configure_php_on_ubuntu.txt
  • Last modified: 2025/05/19 22:34
  • by alex