# 의존라이브러리 설치
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
위에 없으면 아래 블로그들 참고
# 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 |