[Linux] apache 2.4 php 7.2.5 mysql 5.6.40 compile ¼³Ä¡(apache,

   Á¶È¸ 5435   Ãßõ 1    

http://ehostidc.co.kr/center/EH050402.php?no=141481&choose=title&keyw¡¦ (358)
https://blog.naver.com/goethe1/221642889788 (376)

A apache 2.4.33 설치


1. apache 컴파일시 필요한 apr/ pcre 다운로드
https://apr.apache.org/download.cgi

[root@EhostIDC opt]# wget http://apache.tt.co.kr//httpd/httpd-2.4.33.tar.gz

[root@EhostIDC opt]# wget http://mirror.navercorp.com/apache//apr/apr-1.6.3....
[root@EhostIDC opt]# wget http://mirror.navercorp.com/apache//apr/apr-util-1...
[root@EhostIDC opt]# wget http://downloads.sourceforge.net/project/pcre/pcre...

2. 압축해제 및 이동
[root@EhostIDC opt]# tar -zxvpf httpd-2.4.33.tar.gz
[root@EhostIDC opt]# tar -zxvpf apr-1.6.3.tar.gz
[root@EhostIDC opt]# tar -zxvpf apr-util-1.6.1.tar.gz
[root@EhostIDC opt]# tar -jxvpf pcre-8.33.tar.bz2
[root@EhostIDC opt]# mv apr-1.6.3 httpd-2.4.33/srclib/apr
[root@EhostIDC opt]# mv apr-util-1.6.1 httpd-2.4.33/srclib/apr-util

3. pcre 설치

[root@EhostIDC pcre-8.33]# ./configure
[root@EhostIDC pcre-8.33]# make && make install

4. apache 설치

[root@EhostIDC httpd-2.4.33]# ./configure --prefix=/usr/local/apache --enable-mods-shared=most --enable-ssl --enable-modules=ssl
--enable-rewrite --with-included-apr --with-included-apr-util --enable-deflate --enable-expires --enable-headers --enable-proxy --enable-mpms-shared=all --with-mpm=event

[root@EhostIDC httpd-2.4.33]# make && make install

5. apache 서비스 등록

[root@EhostIDC httpd-2.4.33]# cp /usr/local/apache/bin/apachectl /etc/init.d/httpd


[root@EhostIDC httpd-2.4.33]# vi /etc/init.d/httpd

## 상단에 라인 추가
# chkconfig: 2345 90 90
# description: init file for Apache server daemon
# processname: /usr/local/apache/bin/apachectl
# config: /usr/local/apache/conf/httpd.conf
# pidfile: /usr/local/apache/logs/httpd.pid



[root@EhostIDC httpd-2.4.33]# systemctl enable httpd
[root@EhostIDC httpd-2.4.33]# systemctl start httpd

B. php 7.2.5 설치

1. php 다운로드
http://php.net/downloads.php

[root@EhostIDC opt]# wget http://jp2.php.net/get/php-7.2.5.tar.gz/from/this/... -O php-7.2.5.tar.gz

2. configure 및 설치
[root@EhostIDC php-7.2.5]# ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/lib --with-apxs2=/usr/local/apache/bin/apxs --with-gd --with-freetype-dir --with-zlib --enable-sockets --enable-gd-native-ttf --with-png-dir --with-jpeg-dir --enable-sigchild --with-gettext --enable-mbstring --enable-inline-optimization --enable-bcmath --enable-shmop --enable-calendar --enable-ftp --with-gdbm --with-iconv

--enable-mbregex --with-openssl --with-curl=/usr/local/curl/ --enable-soap --disable-debug --with-mcrypt --with-kerberos --enable-zip

--with-zlib-dir --enable-exif --enable-fpm --with-fpm-user=nobody --with-fpm-group=nobody --with-mysql=/usr/local/mysql

--with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=shared,/usr/local/mysql


[root@EhostIDC php-7.2.5]#make && make install

3. 설정 파일 수정

[root@EhostIDC opt]# cp /opt/php-7.2.5/php.ini-development /usr/local/php/lib/php.ini

short_open_tag = On

4. apache httpd.conf

AddType application/x-httpd-php .php .html

5. 확인

phpinfo 페이지 확인 해보기

비고. 위의 php compile 명령어는 php-fpm 으로도 서비스 가능한 설정이며, 다음 주제는 현 구성에서 apache php-fpm 운영하는 방법에 대해 설명 예정.



https://www.aiocp.co.kr/ ( 딥러닝,머신러닝 서버 판매 ,컨설팅) https://bigbangcloud.co.kr/ ( GPU 클라우드 서비스) ::: AI 서버의 모든것 ::: 인공지능의 시작~ (주)이호스트ICT
ªÀº±Û Àϼö·Ï ½ÅÁßÇÏ°Ô.


PDS
Á¦¸ñPage 22/77
2014-05   4972804   Á¤ÀºÁØ1
2015-12   1509138   ¹é¸Þ°¡
2018-06   9356   ±è¹Î¼®salsal
2018-08   9359   ³²±Ã¿ø
2022-09   9363   sbg2005
2021-07   9366   ±èȲÁß
2020-04   9425   ¹ÎÁöÆÄÆÄ
2015-12   9436   ¼Ò¸Á»ç¶û71
2017-07   9451   ¹Ú¼öÈ«84Æ÷Ç×
2017-07   9461   ¹Ú¼öÈ«84Æ÷Ç×
2018-07   9468   ȸ¿øK
2016-04   9487   °£Àå°ÔÀå
2017-06   9501   ±èȲÁß
2017-05   9511   õ»óõÇÏ
2018-08   9525   »õÇϾᱸ¸§
2015-12   9537   ¼Ò¸Á»ç¶û71
2018-07   9564   Àεð°í
2016-03   9598   ĵÀ§µå
2019-02   9604   À¸¶óÂ÷Â÷Â÷
2015-12   9625   ¼Ò¸Á»ç¶û71
2018-08   9636   ¿¥ºê¸®¿À
2020-10   9659   ÀÌõdz