Notice
Recent Posts
Recent Comments
Link
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
Archives
Today
Total
관리 메뉴

컴터만드신분 앞으로 나오세여

CentOS7 APM PHP7.4 source 설치 본문

CentOS7

CentOS7 APM PHP7.4 source 설치

hyohyomin 2020. 5. 10. 19:05

apache또는 MariaDB 설치를 안했으면 먼저 설치하고오길 바란다.

https://chocoemon.tistory.com/4

https://chocoemon.tistory.com/3

 

1. 필요한 패키지 설치

 # yum y install libxml2-devel libpng-devel libjpeg-devel openssl-devel sqlite-devel 

 

2. php7.4 다운로드

 # wget https://www.php.net/distributions/php-7.4.5.tar.gz 

 # tar xvfz php-7.4.5.tar.gz 

 

3. php설치 구성

 # cd php-7.4.5 

 ./configure --prefix=/usr/local/php \  - 설치 디렉토리 경로 지정 

 --with-mysqli --with-pdo-mysql \  - MariaDB 연동 

 --with-apxs2=/usr/local/apache/bin/apxs \  - Apache 연동 

 --with-zlib \ - gzip압축파일 읽기 쓰기 기능 

 --with-iconv \ - 인코딩 변환하는 기능 

 --with-openssl \ - 암호화 기능 

 --enable-shmop \ - 공유메모리 접근 기능 활성화 

 --enable-pcntl \ - Process Control 기능 활성화 

 --enable-calendar \ - 달력 전환 기능 활성화 

 --enable-exif  - 이미지 파일 포맷 기능 활성화 

 

3. php설치

 # make -j 8 && make install -j 8 

 - 위와같은 사진처럼 출력되면 설치완료

 

4. apache설정

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

 /index.html 

 DirectoryIndex index.php index.html 

 - index.php 입력

 

 /AddType application 

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

 - AddType application/x-gzip .gz .tgz 밑에

   AddType application/x-httpd-php .php .html 입력 후 저장

 

5. php설정

 # cp -arp /root/php-7.4.5/php.ini-development /usr/local/php/lib/php.ini 

 # vi /usr/local/php/lib/php.ini 

 /timezone 

 ;date.timezone = -> date.timezone = Asia/seoul 변경 후 저장 

 

6. 확인

 # vi /usr/local/apache/htdocs/index.php 

 <?php 

  phpinfo(); 

 ?> 

 - 입력후 저장

'CentOS7' 카테고리의 다른 글

CentOS7 APM Apache2.4 source 설치  (0) 2020.05.10
CentOS7 APM MariaDB10.4 설치  (0) 2020.05.10
CentOS7 OpenSSL 설치  (0) 2020.05.10
Comments