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

   Á¶È¸ 5433   Ãßõ 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
2015-12   1508434   ¹é¸Þ°¡
2014-05   4972115   Á¤ÀºÁØ1
2022-01   18491   ½ºÄµl¹ÎÇö±â
2022-02   4253   AMDºô·±
2022-02   5127   Á¤ÀǼ®
2022-03   5133   »õÇϾᱸ¸§
2022-03   5058   FOXBI
2022-03   4729   È­Á¤Å¥»ï
2022-03   7951   FOXBI
2022-03   5553   È­Á¤Å¥»ï
2022-04   3877   Piano
2022-05   9224   È­Á¤Å¥»ï
2022-07   14429   »ßµ¹À̽½ÇÄÀÌ
2022-08   8398   ¼Ò´ÐÄí
2022-09   11684   sbg2005
2022-09   15641   ±è´ö¿µ
2022-09   14740   sbg2005
2023-02   32639   ºÐ³ëÀÇ´Ù¿îÈú
2023-04   16771   gmltj
2023-06   22447   SiCMOS
2023-07   20297   °£Àå°ÔÀå
2023-07   16349   Noobmaster69