diff --git a/README.md b/README.md index e36c6dc..c0339b0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # php79 stack -> PHP 5.3 ~ 7.4 + Nginx + Let's Encrypt + MariaDB + 앱들을 자동 설치합니다. +> PHP 5.3 ~ 8.0 + Nginx + Let's Encrypt + MariaDB + 앱들을 자동 설치합니다. ## 특징 @@ -8,7 +8,7 @@ - 쉽고 빠른 설치, 운영, 업데이트까지 고려한 설계 - 쉬운 업데이트 지원. (공식+인기 저장소를 사용하여 `yum update` 만으로 완료) - 기본 설정 파일의 수정을 최소화하여 혼란 예방. (주요 설정 내용을 z-php79.ini 형태의 외부 파일로 분리) -- PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 9가지 버전을 지원하며, 하나의 서버에서 2개 이상의 PHP 사용 가능. +- PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 10가지 버전을 지원하며, 하나의 서버에서 2개 이상의 PHP 사용 가능. - Laravel 5.1~5.5, WordPress, XE, 그누보드 4/5, phpMyAdmin 자동 설치 지원. ([app-install.sh](app-install.sh)) - 시스템 계정, 디비 계정 자동 생성 지원. ([user-add.sh](user-add.sh)) - [Let's Encrypt - 무료 SSL 인증서 발급 및 갱신 지원](https://github.com/php79/stack/wiki/letsencrypt) ([ssl-install.sh](ssl-install.sh)) @@ -103,7 +103,7 @@ cd /root/stack ## 설치 내역 -### PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4 +### PHP 5.3, 5.4, 5.5, 5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0 - 단, CentOS 7 의 PHP 5.3 공식 저장소가 없어, 소스 컴파일 설치됩니다. - composer 설치 diff --git a/app-install.sh b/app-install.sh index 411cf7d..f4460c3 100755 --- a/app-install.sh +++ b/app-install.sh @@ -64,7 +64,7 @@ function show_usage echo -n " " outputInfo "--php" - echo " PHP 버전을 [ 53 54 55 56 56 70 71 72 73 74 ] 형식으로 하나만 입력하세요." + echo " PHP 버전을 [ 53 54 55 56 56 70 71 72 73 74 80 ] 형식으로 하나만 입력하세요." echo " Tip) Laravel 은 70, 그누보드4 는 53 등 프로그램에 따라 적절히 선택하세요." echo " ./status.sh 명령을 통해 현재 서버에 설치된 PHP 버전을 확인할 수 있습니다." echo @@ -166,7 +166,7 @@ if [ -z ${INPUT_PHP_VERSION} ]; then fi if [ ! -f "/usr/bin/php${INPUT_PHP_VERSION}" ]; then - input_abort "PHP ${INPUT_PHP_VERSION} 버전은 아직 설치되지 않았습니다. 입력 형식) 53 54 55 56 70 71 72 73 74" + input_abort "PHP ${INPUT_PHP_VERSION} 버전은 아직 설치되지 않았습니다. 입력 형식) 53 54 55 56 70 71 72 73 74 80" fi # nginx 중복 체크 diff --git a/includes/function.inc.sh b/includes/function.inc.sh index 1a3d7d4..ced53af 100644 --- a/includes/function.inc.sh +++ b/includes/function.inc.sh @@ -94,7 +94,7 @@ function welcome_short function welcome { welcome_short - echo " * PHP 5.3-7.4 + Nginx + Let's Encrypt + MariaDB installer" + echo " * PHP 5.3-8.0 + Nginx + Let's Encrypt + MariaDB installer" echo } @@ -102,6 +102,10 @@ function options { printf " - Install ${GREEN}EPEL repo${NO_COLOR} / http://fedoraproject.org/wiki/EPEL\n" + if [ $PHP80 = "1" ]; then + printf " - Install ${GREEN}PHP 8.0${NO_COLOR} from Remi repo / http://rpms.famillecollet.com/\n" + fi + if [ $PHP74 = "1" ]; then printf " - Install ${GREEN}PHP 7.4${NO_COLOR} from Remi repo / http://rpms.famillecollet.com/\n" fi diff --git a/install.sh b/install.sh index 9ddaf97..4f1cdae 100755 --- a/install.sh +++ b/install.sh @@ -108,6 +108,12 @@ if [ $PHP74 = "1" ]; then PHP_INSTALLED=74 fi +if [ $PHP80 = "1" ]; then + cmd_once "scripts/remi-repo-install.sh" + cmd_once "scripts/php8-remi-install.sh 80" + PHP_INSTALLED=80 +fi + ### /usr/bin/php link if [ ! $PHP_INSTALLED = "" ]; then if [ $OS = "centos7" ]; then diff --git a/nginx/1-fastcgi-php80.conf b/nginx/1-fastcgi-php80.conf new file mode 100644 index 0000000..5febce7 --- /dev/null +++ b/nginx/1-fastcgi-php80.conf @@ -0,0 +1,4 @@ +# http://nginx.org/en/docs/http/ngx_http_upstream_module.html +upstream php80_backend { + server 127.0.0.1:9080; +} diff --git a/php/80/z-php79.ini b/php/80/z-php79.ini new file mode 100644 index 0000000..d62c74e --- /dev/null +++ b/php/80/z-php79.ini @@ -0,0 +1,67 @@ +; Modern PHP 소스용 권장 설정 +; updated: 2016-04-01 + +[PHP79] +; 타임존. 미선언 상태에서 date() 등 사용시 경고 발생. +date.timezone = Asia/Seoul + +; PHP 버전 숨기기 +expose_php = Off + +; 레거시 코드에