php 7.4.32 컴파일 설치# Script/PHP2022. 10. 12. 16:38
Table of Contents
728x90
반응형
configure
[darksharavim.tistory.com]./configure --prefix=/apps/php7 \
--disable-debug \
--enable-sockets \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-ftp \
--enable-gd \
--enable-inline-optimization \
--enable-bcmath \
--enable-exif \
--enable-sigchild \
--enable-mbstring \
--enable-fpm \
--enable-mysqlnd \
--enable-soap \
--with-curl \
--with-zlib \
--with-gettext \
--with-jpeg \
--with-freetype \
--with-libxml \
--with-mysqli \
--with-apxs2=/apps/apache/bin/apxs \
--with-config-file-path=/apps/php7/etc \
--with-openssl
에러1
configure: error: Package requirements (sqlite3 > 3.7.4) were not met:
해결
[darksharavim.tistory.com]yum -y install sqlite-devel
에러2
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
해결
[darksharavim.tistory.com]yum -y install libicu-devel
에러3
configure: error: Package requirements (oniguruma) were not met:
해결
[darksharavim.tistory.com]yum -y install oniguruma-devel
에러4
configure: error: Could not find net-snmp-config binary. Please check your net-snmp installation.
해결
[darksharavim.tistory.com]yum -y install net-snmp-devel
에러5
configure: error: Package requirements (libzip >= 0.11 libzip != 1.3.1 libzip != 1.7.0) were not met:
해결
libzip버전이 낮아서 진행이 되지 않음.
libzip 컴파일 설치
다운로드
[darksharavim.tistory.com]wget https://libzip.org/download/libzip-1.9.2.tar.gz
[darksharavim.tistory.com]tar -xvzf libzip-1.9.2.tar.gz
[darksharavim.tistory.com]cd libzip-1.9.2
[darksharavim.tistory.com]cmake -DCMAKE_INSTALL_PREFIX=/apps/libzip-1.9.2
CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
CMake 3.0.2 or higher is required. You are running version 2.8.12.2
-- Configuring incomplete, errors occurred!
cmake버전이 낮아서 실패 cmake버전 올려야함. 컴파일 설치
[darksharavim.tistory.com]wget https://github.com/Kitware/CMake/releases/download/v3.19.0-rc1/cmake-3.19.0-rc1.tar.gz
[darksharavim.tistory.com]tar -xvzf cmake-3.19.0-rc1.tar.gz
[darksharavim.tistory.com]cd cmake-3.19.0-rc1
[darksharavim.tistory.com]./configure --prefix=/apps/cmake-3.19.0-rc1
[darksharavim.tistory.com]make && make install
libzip설치 재진행
[darksharavim.tistory.com]/apps/cmake-3.19.0-rc1/bin/cmake -DCMAKE_INSTALL_PREFIX=/apps/libzip-1.9.2
[darksharavim.tistory.com]make && make install
libgd 컴파일 설치
[darksharavim.tistory.com] wget https://github.com/libgd/libgd/releases/download/gd-2.3.0/libgd-2.3.0.tar.gz
[darksharavim.tistory.com] tar zxvf libgd-2.3.0.tar.gz
[darksharavim.tistory.com] cd libgd-2.3.0
[darksharavim.tistory.com] ./configure --prefix=/usr/local/libgd-2.3.0
[darksharavim.tistory.com] make ; make install
PKG_CONFIG_PATH 환경변수에 libzip 및 libgb추가
[darksharavim.tistory.com]export PKG_CONFIG_PATH=/apps/libzip-1.9.2/lib64/pkgconfig:/apps/libgd-2.3.0/lib/pkgconfig
[darksharavim.tistory.com]set | grep PKG
PKG_CONFIG_PATH=/apps/libzip-1.9.2/lib64/pkgconfig:/apps/libgd-2.3.0/lib/pkgconfig
php 설치진행
+--------------------------------------------------------------------+
| License: |
| This software is subject to the PHP License, available in this |
| distribution in the file LICENSE. By continuing this installation |
| process, you are bound by the terms of this license agreement. |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point. |
+--------------------------------------------------------------------+
Thank you for using PHP.
make
Build complete.
Don't forget to run 'make test'.
make install
Installing PHP SAPI module: apache2handler
/apps/apache-2.4.54/build/instdso.sh SH_LIBTOOL='/apps/apr/build-1/libtool' libphp7.la /apps/apache-2.4.54/modules
/apps/apr/build-1/libtool --mode=install install libphp7.la /apps/apache-2.4.54/modules/
libtool: install: install .libs/libphp7.so /apps/apache-2.4.54/modules/libphp7.so
libtool: install: install .libs/libphp7.lai /apps/apache-2.4.54/modules/libphp7.la
libtool: warning: remember to run 'libtool --finish /apps/setups/php-7.4.32/libs'
chmod 755 /apps/apache-2.4.54/modules/libphp7.so
[activating module `php7' in /apps/apache-2.4.54/conf/httpd.conf]
Installing shared extensions: /apps/php7/lib/php/extensions/no-debug-zts-20190902/
Installing PHP CLI binary: /apps/php7/bin/
Installing PHP CLI man page: /apps/php7/php/man/man1/
Installing PHP FPM binary: /apps/php7/sbin/
Installing PHP FPM defconfig: /apps/php7/etc/
Installing PHP FPM man page: /apps/php7/php/man/man8/
Installing PHP FPM status page: /apps/php7/php/php/fpm/
Installing phpdbg binary: /apps/php7/bin/
Installing phpdbg man page: /apps/php7/php/man/man1/
Installing PHP CGI binary: /apps/php7/bin/
Installing PHP CGI man page: /apps/php7/php/man/man1/
Installing build environment: /apps/php7/lib/php/build/
Installing header files: /apps/php7/include/php/
Installing helper programs: /apps/php7/bin/
program: phpize
program: php-config
Installing man pages: /apps/php7/php/man/man1/
page: phpize.1
page: php-config.1
/apps/setups/php-7.4.32/build/shtool install -c ext/phar/phar.phar /apps/php7/bin/phar.phar
ln -s -f phar.phar /apps/php7/bin/phar
Installing PDO headers: /apps/php7/include/php/ext/pdo/
설치완료
[darksharavim.tistory.com]/apps/php7/bin/php -v
PHP 7.4.32 (cli) (built: Oct 13 2022 13:56:31) ( ZTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
설정파일 복사
[darksharavim.tistory.com]cp -arp php.ini-production /apps/php7/etc/php.ini
[darksharavim.tistory.com]cp /apps/php7/etc/php-fpm.conf.default /apps/php7/etc/php-fpm.conf
fpm구동파일 복사 및 권한
[darksharavim.tistory.com]cp sapi/fpm/init.d.php-fpm /etc/init.d/php7-fpm
[darksharavim.tistory.com]chmod 700 /etc/init.d/php7-fpm
아파치연동
httpd.conf에 아래 같이 수정
<IfModule dir_module>
DirectoryIndex index.html index.htm index.php index.php3 default.htm default.html main.htm
</IfModule>
<IfModule mime_module>
AddType application/x-httpd-php .html .php
AddHandler application/x-httpd-php .php
</IfModule>
LoadModule php7_module modules/libphp7.so
mysql모듈추가
https://darksharavim.tistory.com/643?category=524863
zend모듈추가
https://darksharavim.tistory.com/644?category=524863
728x90
반응형
'# Script > PHP' 카테고리의 다른 글
centos7x php7.3x 패키지 설치 (0) | 2022.05.31 |
---|---|
php-7x zend 설정 (0) | 2021.07.26 |
php-7x phpize를 이용한 mysql 모듈 설치 (0) | 2021.07.26 |
php 변수값 인코딩확인 mb_detect_encoding (0) | 2020.03.27 |
PHP Fatal error: Call to undefined function mb_strlen() in (0) | 2019.12.13 |
@다크쉐라빔 :: 다크쉐라빔의 주절주절
안녕하세요. 이곳은 IT위주의 잡다한 정보를 올려두는 개인 블로그입니다.
포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!