# apache와 mariadb설치가 먼저 되어있어야합니다. #
palette-code.tistory.com/1
palette-code.tistory.com/5
Centos7 apache2.4 설치
1. 필요한 패키지 설치 [root@localhost ~]# yum -y install wget gcc-c++ pcre-devel expat-devel 2. apache 내려받기 및 apr파일 복사 [root@localhost ~]# wget http://archive.apache.org/dist/httpd/httpd-2...
palette-code.tistory.com
Centos7 MariaDB10.4 binary 설치
1. 필요한 패키지 설치 # yum -y install wget gcc-c++ openssl-devel ncurses-devel gnutls-devel libxml2-devel libcurl-devel bison 2. CMake 설치 [root@localhost ~]# wget https://github.com/Kitware/CMake..
palette-code.tistory.com
1. apache 정지 및 필요한 패키지 설치
[root@localhost ~]# systemctl stop httpd
[root@localhost ~]# yum -y install libxml2-devel libpng-devel libjpeg-devel openssl-devel libicu-devel libffi-devel sqlite-devel
oniguruma설치 -> https://palette-code.tistory.com/9
libzip설치 -> https://palette-code.tistory.com/10
Centos7 oniguruma 설치
oniguruma다운로드 및 설치 [root@localhost ~]# wget https://github.com/kkos/oniguruma/releases/download/v6.9.6/onig-6.9.6.tar.gz # tar zxf onig-6.9.6.tar.gz # cd onig-6.9.6.tar.gz [root@localhost oni..
palette-code.tistory.com
Centos7 libzip 설치
libzip다운로드 및 설치 [root@localhost ~]# wget wget https://libzip.org/download/libzip-1.7.3.tar.xz # tar Jxf libzip-1.7.3.tar.xz # cd libzip-1.7.3 [root@localhost libzip-1.7.3]# mkdir build # cd b..
palette-code.tistory.com
3. PHP8.0 다운로드 및 설치
[root@localhost ~]# wget https://www.php.net/distributions/php-8.0.0.tar.xz
# tar Jxf php-8.0.0.tar.xz
# cd php-8.0.0
[root@php-8.0.0]# ./configure \
--prefix=/usr/local/php \
--with-apxs2=/usr/local/apache/bin/apxs \
--enable-fpm \
--with-openssl \
--with-zlib \
--enable-bcmath \
--enable-calendar \
--with-curl \
--enable-exif \
--with-ffi \
--enable-gd \
--with-imap-ssl \
--enable-intl \
--enable-mbstring \
--with-mysqli \
--with-mysql-sock=/usr/local/mariadb/socket/ \ - 기본경로 /tmp
--with-zip
# make -j 4
# make install -j 4
--with-apxs2 |
APache eXtenSion의 약자로, http서버의 확장모듈을 컴파일하고 설치하는 기능 |
--enable-fpm |
FastCGI Process Manager의 약자로, 동적 페이지 사용시 빠른 처리를 하는기능 |
--with-openssl |
openssl 사용 |
--with-zlib |
데이터압축 라이브러리 사용 |
--enable-bcmath |
임의의 정밀도 수학 기능 사용 |
--enable-calendar |
달력포맷 기능 사용 |
--with-curl |
Client URL Library의 약자로 여러가지 통신방식을 지원해준다. ex) http, https, ftp, telnet 등등 |
--enable-exif |
Exchangeable image information의 약자로, 이미지 메타 데이터 기능 사용 |
--with-ffi |
Foreign function interface의 약자로, 외부 함수를 PHP형식으로 사용하는 기능 |
--enable-gd |
이미지 읽기 쓰기 기능 사용. 아래 Formats supported by GD 표 참고 |
--enable-mbstring |
한국어같이 2바이트 문자열을 다룰때 사용하는 함수 *origuruma 필요함 |
--with-mysqli |
mysql 함수를 개선한 기능, 다른 데이터베이스(oracle, mssql, sqlite)를 사용하면 https://www.php.net/manual/en/pdo.drivers.php 참조해서 --with-pdo-db명으로 변경 |
--with-mysql-sock |
mysql 연결하는 기능 |
--with-zip |
C 라이브러리 기반으로 압축 라이브러리 사용 |
4. php구동 설정
# cp -arp /root/php-8.0.0/php.ini-development /usr/local/php/lib/php.ini
# vi /usr/local/php/lib/php.ini
/timezone(입력 후 엔터)
;date.timezone = -> date.timezone = Asia/seoul
:wq(저장 후 종료)
# vi /usr/local/apache/conf/httpd.conf
/index.html(입력 후 엔터)
DirectoryIndex index.php(추가) index.html
/AddType application(입력 후 엔터)
AddType application/x-gzip .gz .tgz밑에
AddType application/x-httpd-php .php .html(추가)
:wq(저장 후 종료)
5. 확인
# vi /usr/local/apache/htdocs/index.php
<?php
phpinfo();
?>
:wq(저장 후 종료)
# systemctl start httpd
'리눅스 > Centos7 APM' 카테고리의 다른 글
Centos7 MariaDB10.4 binary 설치 (0) | 2020.12.20 |
---|---|
Centos7 apache2.4 binary 설치 (0) | 2020.11.28 |
Memo