본문 바로가기

728x90

php-fpm

[draft] 우분투에서 PHP-FPM의 real-time status 페이지 기능을 활성화하는 방법 우분투에서 PHP-FPM 8.3의 real-time status 페이지 기능을 활성화하는 방법테스트 환경$ lsb_release -dDescription: Ubuntu 22.04.2 LTS$ php --versionPHP 8.3.12 (cli) (built: Sep 27 2024 03:53:05) (NTS)Copyright (c) The PHP GroupZend Engine v4.3.12, Copyright (c) Zend Technologies with Zend OPcache v8.3.12, Copyright (c), by Zend Technologies1. PHP-FPM 설정 변경php-fpm.confvim /etc/php/8.3/fpm/php-fpm.confinclude = /etc/php/8.. 더보기
[draft] 우분투에서 Apache와 PHP-FPM을 설치하고 연동하는 방법 우분투에서 Apache와 PHP-FPM을 설치하고 연동하는 방법테스트 환경$ lsb_release -dDescription: Ubuntu 22.04.2 LTS1. Apache 설치Apache 웹 서버를 설치합니다.sudo apt updatesudo apt install -y apache2apache2 -vServerName 지시어 편집ServerName localhost 추가sudo sed -i '$ a ServerName localhost' /etc/apache2/apache2.confServerName 지시어가 이미 존재할 경우 수정sudo sed -i 's/^ServerName.*/ServerName localhost/' /etc/apache2/apache2.confApache 모듈 확인활성화된 모.. 더보기
[draft] PHP 메모리 사용량 확인 PHP 메모리 사용량 확인1. CPU 개수 출력nproc42. 모든 PHP-FPM 프로세스 정보 출력(php-fpm8.3)ps -ylC php-fpm8.3S UID PID PPID C PRI NI RSS SZ WCHAN TTY TIME CMDS 0 667 1 0 80 0 20540 51058 ep_pol ? 00:00:00 php-fpm8.3S 33 830 667 0 80 0 7748 51170 skb_wa ? 00:00:00 php-fpm8.3S 33 831 667 0 80 0 7748 51171 skb_wa ? 00:00:00 p.. 더보기
[draft] 우분투에서 NGINX와 PHP-FPM을 설치하고 연동하는 방법 우분투에서 NGINX와 PHP-FPM을 설치하고 연동하는 방법테스트 환경구분호스트 이름아이피 주소비고NGINXjnode1192.168.0.122 PHP-FPMjnode2192.168.0.112 NGINX 서버 설정NGINX 설치sudo apt-get updatesudo apt-get install -y curl gnupg2 ca-certificates lsb-release ubuntu-keyring apt-transport-httpscurl -fsSL https://nginx.org/keys/nginx_signing.key \ | gpg --dearmor | sudo tee /etc/apt/keyrings/nginx_signing.asc >/dev/nullecho "deb [signed-by=/etc/.. 더보기
[draft] 우분투에 Nginx와 PHP 8.3을 소스에서 컴파일하여 설치하는 방법 우분투에 Nginx와 PHP 8.3(php-fpm)을 소스에서 컴파일하여 설치하는 방법1. 필수 패키지 및 의존성 설치sudo apt-get updatesudo apt-get install -y \build-essential pkg-config autoconf make \wget vim2. Nginx 소스에서 컴파일 및 설치Nginx를 소스에서 설치합니다.sudo apt-get install -y zlib1g-dev libssl-dev libpcre3-dev libzip-devNginx 소스를 다운로드합니다.cd /usr/local/srcwget https://nginx.org/download/nginx-1.26.1.tar.gztar -zxvf nginx-1.26.1.tar.gzcd nginx-1.26... 더보기
[draft] NGINX와 PHP 환경에서 파일 업로드 크기를 늘리는 방법 NGINX와 PHP(PHP-FPM) 환경에서 파일 업로드 크기를 늘리는 방법NGINX 설정 변경NGINX에서 클라이언트가 업로드하는 파일 크기를 제한하는 것은 client_max_body_size 디렉티브를 사용합니다. 원하는 파일 크기로 설정해야 합니다. 기본값은 1MB입니다.vim /etc/nginx/nginx.confhttp { ... client_max_body_size 100M; ...}이 설정은 NGINX의 설정 파일에 위치하며 업로드한 파일의 최대 크기를 100MB로 제한합니다. NGINX 재시작변경된 NGINX 설정이 적용되려면 NGINX 서비스를 다시 시작해야 합니다.sudo systemctl restart nginxPHP-FPM 설정 변경기본 설정(Default Valu.. 더보기
Amazon EC2 t4g.small 인스턴스에서 Nginx와 PHP-FPM을 연동하여 테스트 페이지를 설정하는 방법 Amazon EC2 t4g.small 인스턴스에서 Nginx와 PHP-FPM을 연동하여 테스트 페이지를 설정하는 방법 1. Nginx 및 PHP-FPM 설치 2. PHP-FPM 구성 파일 수정 sudo mkdir /var/log/php-fpm php-fpm.conf 파일 설정 sudo vim /etc/php/8.1/fpm/php-fpm.conf [global] pid = /var/run/php/php-fpm.pid error_log = /var/log/php-fpm/error.log include = /etc/php/8.1/fpm/pool.d/*.conf www.conf 파일 설정 sudo vim /etc/php/8.1/fpm/pool.d/www.conf [www] user = www-data group.. 더보기
Amazon EC2 t4g.small 인스턴스에서 PHP-FPM을 설치하는 방법 Amazon EC2 t4g.small 인스턴스에서 PHP-FPM을 설치하는 방법 테스트 환경 운영 체제 버전 정보 확인 $ lsb_release -d Description:Ubuntu 22.04.3 LTS 운영 체제의 아키텍처 확인(Arm 기반 AWS Graviton 프로세서 사용) $ uname -m aarch64 운영 체제의 비트 수 $ getconf LONG_BIT 64 PHP-FPM 설치 필수 구성 요소 설치 sudo apt-get install -y zlib1g-dev software-properties-common sudo apt-get update PPA(Personal Package Archive) 추가 sudo add-apt-repository -y ppa:ondrej/php ATP 패키.. 더보기

728x90