OS

2024.08.30 15:28

rocky linux 9 환경에서 APM 최신 버전 설치 (apache 2.4.61, php 8.3.9, maraidb 11.4.2)-3

  • 비아웹 오래 전 2024.08.30 15:28 인기
  • 141
    0

안녕하세요

호스팅 전문기업 비아웹입니다.

rocky linux 9 환경에서 최신 APM 설치에 대해 기록합니다.

이전 게시글 https://blog.naver.com/viaweb/223514692694 에 이어 php 8.3.9 버전 설치에 대한 기록 남깁니다.

 ​

1. 설치 버전

  • 테스트 OS : Rocky Linux release 9.4 (Blue Onyx)

  • apache 2.4.61

  • php 8.3.9

  • maraidb 11.4.2

2. 의존성 패키지 설치

  • 의존성 패키지 설치

  • dnf install libxml2-devel sqlite-devel bzip2-devel libcurl-devel freetype-devel libpng-devel libjpeg-devel gd-devel gmp-devel libedit-devel libtidy-devel libxslt-devel 
    dnf --enablerepo=devel install oniguruma-devel unixODBC-devel aspell-devel libzip-devel gdbm-devel
    
 
  • gdbm 관련 오류

  • # configure: error: DBA: Could not find necessary header file(s).
    
    dnf install https://download.rockylinux.org/vault/rocky/9.0/CRB/x86_64/os/Packages/g/gdbm-1.19-4.el9.x86_64.rpm
    dnf install https://download.rockylinux.org/vault/rocky/9.0/CRB/x86_64/os/Packages/g/gdbm-devel-1.19-4.el9.x86_64.rpm
    
 

3. 컴파일 옵션

./configure --prefix=/usr/local/php  \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/conf \
--with-bz2 \
--with-curl \
--with-dbm \
--with-freetype \
--with-gdbm \
--with-gettext \
--with-gmp \
--with-iconv \
--with-jpeg \
--with-libedit \
--with-mhash \
--with-zip \
--with-libxml \
--with-expat \
--with-pdo-mysql \
--with-pear \
--with-pic \
--with-pspell \
--with-readline \
--with-openssl \
--with-tidy \
--with-unixODBC=shared,/usr \
--with-xpm \
--with-xsl \
--with-zlib \
--with-zlib-dir=/usr \
--enable-bcmath \
--enable-calendar \
--enable-ctype \
--enable-dba=shared \
--enable-dom \
--enable-exif \
--enable-fpm \
--enable-gd \
--enable-gd-jis-conv \
--enable-intl \
--enable-mbstring \
--enable-mysqlnd \
--enable-opcache=no \
--enable-pcntl \
--enable-shmop \
--enable-sigchild \
--enable-soap \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-xmlreader \
--enable-xmlwriter \
--with-mysql \
--with-mysql-sock=/tmp/mysql.sock \
--with-libdir=lib64
 
  • make && make install

4. 환경 설정

  • php.ini

  • cp php.ini-production /usr/local/apache/conf/php.ini
    sed -i "s/short_open_tag = Off/short_open_tag = On/g" /usr/local/apache/conf/php.ini 
    
 
  • apache 연동

  • echo "Include conf/extra/php.conf" >> /usr/local/apache/conf/httpd.conf
    
    # vi /usr/local/apahce/conf/extra/php.conf
    <FilesMatch \.php$>
        SetHandler application/x-httpd-php
    </FilesMatch>
    
    # Allow php to handle Multiviews
    #
    AddType text/html .php
    
    # Add index.php to the list of files that will be served as directory
    # indexes.
    #
    DirectoryIndex index.php
    
    # Uncomment the following lines to allow PHP to pretty-print .phps
    # files as PHP source code:
    #
    #<FilesMatch \.phps$>
    #    SetHandler application/x-httpd-php-source
    #</FilesMatch>
    
 
 

 

5. phpinfo 확인

이상과 같이 apache 2.4.61, php 8.3.9, maraidb 11.4.2 버전에 대한 컴파일 및 systemd 등록에 대해 기록하였습니다.

단순 테스트 용도로 진행하였기에, 실 서비스에서는 추가적인 설정 수정 및 테스트가 필요함을 안내드립니다.

감사합니다.

호스팅 전문기업 비아웹

 

 

  • 공유링크 복사