[CentOS 7] PHP 컴파일

2017. 8. 22. 17:39·DEV/Linux

# 의존라이브러리 설치

yum install curl-devel openssl-devel freetype-devel libpng-devel gd-devel libxml2-devel libmcrypt-devel libXpm-devel mysql-devel bzip2-devel libicu-devel openldap-devel recode-devel libxslt1-devel db4-devel libc-client-devel libedit-devel libtidy-devel gmp-devel libxslt-devel gdbm-devel

# PHP 설치, 압축 해제

cd /usr/local/src/

wget http://kr1.php.net/get/php-7.1.8.tar.bz2/from/this/mirror -O php-7.1.8.tar.bz2

tar xvf php-7.1.8.tar.bz2


cd php-7.1.8

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-config-file-path=/usr/local/apache2/conf --with-mysql-sock=/tmp --with-mysqli --with-pdo-mysql=shared --with-openssl --with-pcre-regex --with-zlib --with-bz2 --with-curl --with-gdbm --with-db4=/usr --with-dbm --with-pcre-dir=/usr --with-openssl-dir=/usr --with-libxml-dir=/usr --with-jpeg-dir=/usr/lib64 --with-gd --with-png-dir=/usr --with-zlib-dir=/usr --with-xpm-dir=/usr --with-freetype-dir=/usr --with-gettext --with-gmp --with-mhash --with-imap=/usr/local/imap-2007f --with-imap-ssl --with-kerberos --with-icu-dir=/usr --with-ldap --with-ldap-sasl --with-libmbfl --with-onig --with-mcrypt --with-libedit --with-readline --with-tidy --with-libexpat-dir=/usr --with-xmlrpc --with-xsl --with-pear --with-pic --with-libdir=lib64 --enable-bcmath --enable-calendar --enable-exif --enable-ftp --enable-pcntl --enable-intl --enable-mbstring --enable-shmop --enable-sockets --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --enable-zip --enable-mysqlnd --enable-dba=shared --enable-dom --enable-mbregex --enable-inline-optimization --enable-sigchild --enable-soap --enable-maintainer-zts --enable-opcache=no


make

make test

make install

# ./configure 에러시

모든 오류 정리 - http://arima18.tistory.com/7


위에 없으면 아래 블로그들 참고 

https://m.blog.naver.com/PostView.nhn?blogId=noorol&logNo=221036551474&categoryNo=9&proxyReferer=&proxyReferer=https%3A%2F%2Fwww.google.co.kr%2F


# imap 관련 오류나면 ./configure에서 --with-imap을 찾아 경로를 맞춰주세요 


# configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.


# make lr5 PASSWDTYPE=std SSLTYPE=unix.nopwd EXTRACFLAGS=-fPIC IP=4 과정에서

osdep.c:89:31 에러가 날때 yum install pam pam-devel 해주시면 됩니다.

# httpd.conf 맨아래 추가

<FilesMatch “\.(php|php4|php3|htm|html)$”>

SetHandler application/x-httpd-php

</FilesMatch>





저작자표시 비영리 변경금지 (새창열림)

'DEV > Linux' 카테고리의 다른 글

[CentOS 7] Mariadb 원격접속허용  (0) 2017.08.24
[CentOS 7] Tomcat8 컴파일  (0) 2017.08.23
[CentOS 7] Apache 컴파일  (0) 2017.08.22
Linux vi편집기 줄번호 보이게 하기  (0) 2017.08.21
[CentOS 7] Mariadb 10 컴파일  (0) 2017.08.20
'DEV/Linux' 카테고리의 다른 글
  • [CentOS 7] Mariadb 원격접속허용
  • [CentOS 7] Tomcat8 컴파일
  • [CentOS 7] Apache 컴파일
  • Linux vi편집기 줄번호 보이게 하기
modric
modric
  • modric
    dev log
    modric
  • 전체
    오늘
    어제
    • 분류 전체보기 (70)
      • DEV (58)
        • Linux (12)
        • JavaScript (5)
        • PHP (4)
        • MySql (4)
        • HTML (7)
        • CSS (9)
        • Spring (13)
        • flutter (1)
        • 오류 (2)
        • devOps (1)
      • 기타 (5)
      • 트렌드 (1)
  • 블로그 메뉴

    • 홈
    • 태그
    • 미디어로그
    • 위치로그
    • 방명록
    • HTML
    • CSS
    • PHP
    • JavaScript
    • Spring
    • Linux
  • 링크

    • 공부하는 소담아빠
    • 타올이
  • 공지사항

  • 인기 글

  • 태그

    height
    Safari
    exist
    Android
    lastinsertid
    factorial
    mariadb10
    컴파일
    터치
    Destination
    100!
    linux
    build
    mariadb 10
    iframe
    centos 7
    제거
    update
    클릭
    js
    MYSQL
    팩토리얼
    넘침
    ios
    파란색
    테두리
    centos7
    php
    메타버스
    크롬
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.5
modric
[CentOS 7] PHP 컴파일
상단으로

티스토리툴바