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

   Á¶È¸ 5457   Ãßõ 1    

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

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 10/77
2014-05   4998207   Á¤ÀºÁØ1
2015-12   1534050   ¹é¸Þ°¡
2019-11   5373   µö·¯´×¼­¹ö
2019-08   5391   µö·¯´×¼­¹ö
2019-11   5395   FOXBI
2020-06   5395   µö·¯´×¼­¹ö
2020-07   5400   µö·¯´×¼­¹ö
2020-05   5407   µö·¯´×¼­¹ö
2019-09   5409   µö·¯´×¼­¹ö
2019-10   5435   ÇãÀα¸¸¶Æ¾
2019-07   5445   À̼±È£
2019-09   5445   À¯Á¤È£»þÄÜ´À
2019-12   5449   »ßµ¹À̽½ÇÄÀÌ
2019-09   5458   µö·¯´×¼­¹ö
2019-09   5468   ½ºÄµl¹ÎÇö±â
2019-10   5471   µö·¯´×¼­¹ö
2019-12   5472   DAP¹ÚÀÎÈ£
2019-10   5481   µö·¯´×¼­¹ö
2019-07   5484   µö·¯´×¼­¹ö
2019-09   5490   µö·¯´×¼­¹ö
2020-06   5494   ĵÀ§µå
2019-05   5503   »ßµ¹À̽½ÇÄÀÌ