본문 바로가기

리눅스

[리눅스] Ubuntu 22.04에서 APT 패키지 매니저로 APM 설치하기

728x90

Ubuntu 22.04에서 APT 패키지 매니저로 APM 설치하기

테스트 환경

$ cat /etc/os-release | egrep PRETTY_NAME
PRETTY_NAME="Ubuntu 22.04 LTS"

apache 설치 및 설정

apache 설치

apt install -y apache2 ssl-cert

apache 설정

echo "ServerName localhost" >> /etc/apache2/apache2.conf

apache 모듈 활성화

a2enmod rewrite
a2enmod headers
a2enmod ssl
a2dismod -f autoindex

apache 버전 확인

apache2 -version
apache2 -version
Server version: Apache/2.4.52 (Ubuntu)
Server built:   2022-03-25T00:35:40

apache 모듈 확인

apachectl -M
$ apachectl -M
Loaded Modules:
 core_module (static)
 so_module (static)
 watchdog_module (static)
 http_module (static)
 log_config_module (static)
 logio_module (static)
 version_module (static)
 unixd_module (static)
 access_compat_module (shared)
 alias_module (shared)
 auth_basic_module (shared)
 authn_core_module (shared)
 authn_file_module (shared)
 authz_core_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 deflate_module (shared)
 dir_module (shared)
 env_module (shared)
 filter_module (shared)
 headers_module (shared)
 mime_module (shared)
 mpm_event_module (shared)
 negotiation_module (shared)
 reqtimeout_module (shared)
 rewrite_module (shared)
 setenvif_module (shared)
 socache_shmcb_module (shared)
 ssl_module (shared)
 status_module (shared)

mysql 설치 및 설정

mysql 설치

apt install -y mysql-server

mysql 버전

mysql --version
$ mysql --version
mysql  Ver 8.0.28-0ubuntu4 for Linux on x86_64 ((Ubuntu))
728x90

php 설치 및 설정

apt install -y php php-cli php-common libapache2-mod-php php-mysql
apt install -y php-curl php-gd php-zip php-intl php-bcmath php-imagick php-redis php-mbstring php-apcu php-xml

php 버전

php -version
$ php -version
PHP 8.1.2 (cli) (built: Apr  7 2022 17:46:26) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2, Copyright (c), by Zend Technologies

php 모듈 확인

php -m
$ php -m
[PHP Modules]
apcu
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
igbinary
imagick
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
redis
Reflection
session
shmop
SimpleXML
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

[Zend Modules]
Zend OPcache

phpinfo 페이지 생성

echo "<?php phpinfo(); ?>" > /var/www/html/phpinfo.php

 

728x90