OS
php 8.0.18 컴파일 설치
- 비아웹 오래 전 2024.06.27 17:19 인기
-
- 139
- 0
안녕하세요
서버호스팅 전문기업 비아웹입니다.
CenotOs 7 환경에서 php 8.0.18 버전에 대한 컴파일 설치 방법에 대해 정리합니다.
1. 설치 환경
- CentOS 7.9
- yum update 완료
- Selinux disable 설정
2. apache 및 mysql 설치는 yum 진행
# yum install httpd mod_ssl httpd-devel# yum install mariadb-server
3. php 설치 의존성 패키지 설치
# yum install epel-release wget# yum -y install gcc-c++ gcc autoconf bison libcurl-devel bzip2-devel gd-devel \gmp-devel libicu-devel libxslt-devel zlib-devel libwebp-devel e2fsprogs-devel \krb5-devel libidn-devel ncurses-devel gdbm-devel libxml2-devel freetype-devel \libpng* libjpeg* gd-devel enchant-devel netpbm* libxslt* gmp-devel systemd-devel \readline-devel sqlite-devel openldap-devel openssl-devel libffi-devel aspell-devel \net-snmp-devel libsodium-devel tidy-devel
4. yum 으로 설치 안되는 oniguruma 패키지 설치
rpm -Uvh http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/oniguruma-5.9.5-3.el7.art.x86_64.rpm
rpm -Uvh http://www6.atomicorp.com/channels/atomic/centos/7/x86_64/RPMS/oniguruma-devel-5.9.5-3.el7.art.x86_64.rpm
5. libzip 패키지 버전업 ( libzip >= 0.11 ) 설치
rpm -Uvh http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-0.11.2-6.el7.psychotic.x86_64.rpm
rpm -Uvh http://packages.psychotic.ninja/7/plus/x86_64/RPMS/libzip-devel-0.11.2-6.el7.psychotic.x86_64.rpm
6. 소스 다운로드
wget https://www.php.net/distributions/php-8.0.18.tar.gz
7. php 8.0.18 컴파일 옵션
./configure --prefix=/usr/local/php \--with-apxs2 \--with-config-file-path=/etc/httpd/conf \--with-config-file-scan-dir=/etc/php.d \--with-openssl \--with-mysql-sock=/tmp/mysql.sock \--with-mysqli \--with-pdo-mysql \--with-enchant \--with-gettext \--with-freetype \--with-jpeg \--with-webp \--with-xpm \--with-zlib \--with-gmp \--with-iconv \--with-gdbm \--with-bz2 \--with-curl \--with-mhash \--with-xsl \--with-ffi \--with-readline \--with-pear \--with-pspell \--with-ldap \--with-libxml \--with-pdo_sqlite \--with-sqlite3 \--with-snmp \--with-sodium \--with-tidy \--with-zip \--with-libdir=lib64 \--enable-tokenizer \--enable-fileinfo \--enable-filter \--enable-phar \--enable-gd \--enable-litespeed \--enable-mysqlnd \--enable-bcmath \--enable-sockets \--enable-pcntl \--enable-ftp \--enable-fpm \--enable-mbstring \--enable-calendar \--enable-simplexml \--enable-session \--enable-soap \--enable-xml \--enable-xmlreader \--enable-xmlwriter \--enable-opcache \--enable-intl \--enable-cli \--enable-zts \--enable-debug \--enable-mbregex \--enable-dba \--enable-shmop \--enable-sysvsem \--enable-sysvshm \--enable-sysvmsg \--enable-exif
- make 및 make install 부분은 생략하겠습니다.
8. php 모듈 확인
9. php 환경 설정
cp php.ini-production /etc/httpd/conf/php.inised -i "s/short_open_tag = Off/short_open_tag = On/g" /etc/httpd/conf/php.inised -i "s/;date.timezone =/date.timezone =Asia\/Seoul/g" /etc/httpd/conf/php.iniecho "## php configAddType application/x-httpd-php .php4 .php .html .htm .incAddType application/x-httpd-php-source .phps " >> /etc/httpd/conf/httpd.conf
10. phpinfo 확인
php 8.0 버전에 대한 컴파일 옵션에 대해 간략하게 정리하였습니다.
감사합니다.
서버호스팅 비아웹
- 이전글wget 사용시 Issued certificate has expired 해결 방법2024.06.27
- 다음글CentOS rescue 모드에서 IP 설정 및 SSH 서비스 활성화2024.06.27
댓글목록
등록된 댓글이 없습니다.