[ Server ][ Linux ] CentOS7 php 소스 컴파일러 설치 > linux

본문 바로가기
사이트 내 전체검색

linux

[ Server ][ Linux ] CentOS7 php 소스 컴파일러 설치

페이지 정보

작성자 웹지기 댓글 0건 조회 12,167회 작성일 18-09-27 14:32

본문

php 소스컴파일 설치

1. 라이브러리 설치
// 컴파일 환경설정에 추가해준 라이브러리 들을 우선적으로 설치 해야 한다.
// os를 인스톨 할때 선택해 주었다면 설치할 필요가 없다.
// 빠진 것이 있다면 컴파일 실행시 경고메세지와 함께 컴파일이 중지된다.

--libjpeg 설치 (다운로드 하는곳
---- tar xvfz jpegsrc.v7.tar.gz
---- cd jpegsrc-v7
---- ./configure --enable-shared --enable-static
---- make
---- make install
--libpng 설치 (다운로드 하는곳)
---- tar xvfz libpng-1.2.41.tar.gz
---- cd libpng-1.2.41
---- cp scripts/makefile.linux makefile
---- make
---- make install
--freetype 설치 (다운로드 하는곳)
---- tar xvf freetype-2.3.11.tar.bz2
---- cd freetype-2.3.11
---- ./configure
---- make
---- make install

2. 소스다운로드 ( 다운로드 하는곳)

3. 압축해제 

tar xvfz php-5.2.12.tar.gz

// 현제php-5.3.1버전은 설치 성공사례를 찾지 못하였다

4. 컴파일설정
./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-mysql=/usr/local/mysql \
--with-config-file-path=/usr/local/apache/conf \
--enable-safe-mode \
--enable-sockets \
--enable-sysvsem=yes \
--enable-sysvshm=yes \
--enable-ftp \
--enable-magic-quotes \
--enable-gd-native-ttf \
--enable-inline-optimization \
--enable-bcmath \
--enable-exif \
--enable-sigchild \
--enable-mbstring \
--with-zlib \
--with-jpeg-dir=/usr \
--with-png-dir=/usr/lib \
--with-freetype-dir=/usr \
--with-libxml-dir=/usr \
--with-gd \
--with-gettext
//좀더 많은 옵션은 php configure option 게시글 을 참고하기 바랍니다.

5. 컴파일 

make


6. 설치 

make install


7. conf파일 복사 

cp php.ini-dist /usr/local/apache/conf/php.ini


8. 아파치와연동 

vi /usr/local/apache/conf/httpd.conf

  <IfModule dir_module>
    DirectoryIndex index.html index.php
  <IfModule>
  <IfModule mime_module>
    AddType application/x-httpd-php .php 

    AddType application/x-httpd-php-source .phps

  <IfModule>

9. 실행 

/etc/init.d/httpd start or /etc/init.d/httpd restart


10. 동작 테스트
** selinux를 permisive로 변경해 주지 않으면 아파치 실행에 문제가 발생할 수 있다. 

vi /etc/selinux/config

// 자세한 사항은 selinux 게시글을 참고해 주기 바랍니다

** iptables를 설정해 주지 않으면 웹에서 접속 할 수 없다.
service iptables stop
// php를 설치 확인 하는것이 목적이므로 iptable(방화벽)을 끄고 접속 테스트를 해 본다.  

[이 게시물은 웹지기님에 의해 2019-03-15 15:45:57 knowledge에서 이동 됨]
추천0 비추천0

댓글목록

등록된 댓글이 없습니다.

Total 103건 8 페이지
게시물이 없습니다.
게시물 검색

회원로그인

접속자집계

오늘
8,532
어제
7,449
최대
33,828
전체
8,405,704

그누보드5
Copyright © funyphp.com. All rights reserved.