PHP7이 칼럼에서는 Php7.3을 효과적으로 설치하는 방법을 소개합니다
권장(무료): PHP7
첫 번째 설치(설치 후 설치하지 않아도 됨) 설치됨):
mysql: https://blog.csdn.net/qq_40200087/article/details/89479137
nginx: https://blog.csdn.net/qq_40200087/article/details/89504980
다운로드: https ://www.php.net/downloads.php#v7.3.4
개발 도구:
yum groupinstall "Development Tools" -y
설치 종속성:
yum install libxml2-devel -y yum install bzip2 bzip2-devel -y yum install curl-devel -y yum install libjpeg-devel -y yum install libpng libpng-devel -y yum install freetype-devel -y yum install libxslt-devel -y yum install libzip-devel -y 或者合到一起安装 yum install libxml2-devel bzip2 bzip2-devel curl-devel libjpeg-devel libpng libpng-devel freetype-devel libxslt-devel libzip-devel -y
압축 해제:
tar -zxvf php-xxx.tar.gz -C /usr/local/
/usr/local로 이동하여 이름을 변경하세요
cd /usr/local mv php-7.3.xxx php7.3
Compile
cd /usr/local/php7.3 ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-fpm-user=mysql --with-fpm-group=mysql --with-curl --with-freetype-dir --with-gd --with-gettext --with-iconv-dir --with-kerberos --with-libdir=lib64 --with-libxml-dir --with-mysqli=mysqlnd --with-openssl --with-pcre-regex --with-pdo-mysql=mysqlnd --with-mysql=mysqlnd --with-pdo-sqlite --with-pear --with-png-dir --with-jpeg-dir --with-xmlrpc --with-xsl --with-zlib --with-bz2 --with-mhash --enable-fpm --enable-bcmath --enable-libxml --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-sysvshm --enable-xml --enable-fpm
编译完成后是以下样子 +--------------------------------------------------------------------+ | License: | | This software is subject to the PHP License, available in this | | distribution in the file LICENSE. By continuing this installation | | process, you are bound by the terms of this license agreement. | | If you do not agree with the terms of this license, you must abort | | the installation process at this point. | +--------------------------------------------------------------------+ Thank you for using PHP. config.status: creating php7.spec config.status: creating main/build-defs.h config.status: creating scripts/phpize config.status: creating scripts/man1/phpize.1 config.status: creating scripts/php-config config.status: creating scripts/man1/php-config.1 config.status: creating sapi/cli/php.1 config.status: creating sapi/fpm/php-fpm.conf config.status: creating sapi/fpm/www.conf config.status: creating sapi/fpm/init.d.php-fpm config.status: creating sapi/fpm/php-fpm.service config.status: creating sapi/fpm/php-fpm.8 config.status: creating sapi/fpm/status.html config.status: creating sapi/phpdbg/phpdbg.1 config.status: creating sapi/cgi/php-cgi.1 config.status: creating ext/phar/phar.1 config.status: creating ext/phar/phar.phar.1 config.status: creating main/php_config.h config.status: executing default commands configure: WARNING: unrecognized options: --with-mysql
설치:
make && make install
다음 세 가지 구성 파일을 복사합니다
cp php.ini-production /usr/local/php/etc/php.ini cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf cp /usr/local/php/etc/php-fpm.d/www.conf.default /usr/local/php/etc/php-fpm.d/www.conf
php.ini 설정
#注意:php的注释为 ; 如果设置前面有 ; ,请记得删除 ; vim /usr/local/php/etc/php.ini max_execution_time = 300 max_input_time = 300 memory_limit = 128M post_max_size = 16M upload_max_filesize = 2M date.timezone = Asia/Shanghai
php가 성공적으로 설치되었는지 테스트합니다
/usr/local/php/sbin/php-fpm -t
시작 파일을 복사합니다
cp /usr/local/php7.3/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
실행 권한 부여
chmod 755 /etc/init.d/php-fpm
Start
service php-fpm start
Query 시작 성공 여부
ps -ef |grep php-fpm root 27332 1 0 08:51 ? 00:00:00 php-fpm: master process (/usr/local/php/etc/php-fpm.conf) mysql 27333 27332 0 08:51 ? 00:00:00 php-fpm: pool www mysql 27334 27332 0 08:51 ? 00:00:00 php-fpm: pool www root 27336 7898 0 08:51 pts/1 00:00:00 grep --color=auto php-fpm
.php 파일을 구문 분석하도록 nginx 구성
注意:fastcgi_pass 127.0.0.1:9000; 端口与/usr/local/php/etc/php-fpm.d/www.conf 里面的listen = 127.0.0.1:9000 配置要一样,不然无法解析 vim /usr/local/nginx/conf/nginx.conf 修改server{} 这个里面的数据为: listen 80; server_name localhost; access_log /usr/local/nginx/logs/host.access.log; root /usr/local/nginx/html; index index.html index.htm index.php; location / { try_files $uri $uri/ /index.php?$args; } error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } location ~ \.php$ { expires -1s; try_files $uri =404; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi.conf; }
구문 분석 성공 여부 테스트:
在/usr/local/nginx/html中创建test.php,里面内容如下 <?php phpinfo(); ?> 执行 /usr/local/nginx/sbin/nginx 浏览去输入 http://本机ip/test.php 如果打开网页了则解析成功,如果是下载,则解析失败
오류 발생:
执行测试的时候遇到 [root@jenkins-master etc]# /usr/local/php/sbin/php-fpm -t PHP: syntax error, unexpected '=' in Unknown on line 1 [25-Apr-2019 08:36:28] ERROR: Unable to include /usr/local/php/etc/php-fpm.d/www.conf from /usr/local/php/etc/php-fpm.conf at line 23 [25-Apr-2019 08:36:28] ERROR: failed to load configuration file '/usr/local/php/etc/php-fpm.conf' [25-Apr-2019 08:36:28] ERROR: FPM initialization failed 最后发现是我执行./configue 的时候后面配置文件有一个少了个空格,我已修改上面的配置 原因呢是因为 www.conf 里面的user配置错误
위 내용은 Php7.3 설치에 대한 자세한 설명의 상세 내용입니다. 자세한 내용은 PHP 중국어 웹사이트의 기타 관련 기사를 참조하세요!

이 기사는 PHP 7의 새로운 운영자 인 Null Coalescing (??), 우주선 (& lt; = & gt;) 및 Null Coalescing 할당 (?? =) 운영자에 대해 자세히 설명합니다. 이들은 NULL 점검 및 비교를 단순화하여 코드 가독성 및 성능을 향상시킵니다.

PHP 7의 사소한 버전 차이는 미묘한 메모리 소비 변동을 산출합니다. 최신 버전은 일반적으로 Zend 엔진 및 쓰레기 수집 최적화를 통해 성능 및 메모리 효율성을 향상 시키지만 그 영향은 응용 프로그램에 따라 다릅니다. 단호합니다

이 기사에서는 성능을위한 PHP7 코드 최적화를 검토합니다. 비효율적 인 데이터베이스 쿼리, I/O 작업 및 메모리 누출과 같은 일반적인 병목 현상을 다룹니다. 솔루션에는 효율적인 코딩 관행, 데이터베이스 및 캐싱 전략, 비 동기력이 포함됩니다.

이 기사는 Session_start (), $ _session, session_destroy () 및 보안 쿠키 처리와 같은 핵심 기능을 다루는 효과적인 PHP 7 세션 관리에 대해 자세히 설명합니다. HTTPS, 세션 ID 재생, S를 포함한 보안 모범 사례를 강조합니다.

PHP 7은 수많은 버그를 해결하고 성능 향상 및 보안 강화로 이전 버전에서 크게 향상되었습니다. 주요 개선 사항에는 다시 작성된 Zend 엔진 3, 최적화 된 메모리 관리 및 정제 된 오류 처리가 포함되었습니다. 유전자가있는 동안

이 기사에서는 New Relic을 사용하여 PHP 7 응용 프로그램 성능을 모니터링하는 방법을 설명합니다. APDEX 점수 및 응답 시간과 같은 KPIS (Kep Relic의 설정, KPI), 트랜잭션 트레이스 및 오류 트랙을 통한 병목 현상 식별에 대해 자세히 설명합니다.

이 기사에서는 PHP 5.6을 PHP 7으로 업그레이드하고 백업, 서버 호환성 확인 및 업그레이드 방법 (패키지 관리자, 컴파일, 제어판 또는 웹 서버 구성)과 같은 중요한 단계를 강조합니다. 그것은 Potentia를 다룹니다

이 기사에서는 PHP7의 세션 처리를 검토하여 향상된 Zend 엔진에서 비롯된 성능 향상을 강조합니다. 업그레이드로 인한 잠재적 호환성 문제에 대해 설명하고 보안 및 확장 성을위한 최적화 전략에 대해 설명합니다.


핫 AI 도구

Undresser.AI Undress
사실적인 누드 사진을 만들기 위한 AI 기반 앱

AI Clothes Remover
사진에서 옷을 제거하는 온라인 AI 도구입니다.

Undress AI Tool
무료로 이미지를 벗다

Clothoff.io
AI 옷 제거제

AI Hentai Generator
AI Hentai를 무료로 생성하십시오.

인기 기사

뜨거운 도구

DVWA
DVWA(Damn Vulnerable Web App)는 매우 취약한 PHP/MySQL 웹 애플리케이션입니다. 주요 목표는 보안 전문가가 법적 환경에서 자신의 기술과 도구를 테스트하고, 웹 개발자가 웹 응용 프로그램 보안 프로세스를 더 잘 이해할 수 있도록 돕고, 교사/학생이 교실 환경 웹 응용 프로그램에서 가르치고 배울 수 있도록 돕는 것입니다. 보안. DVWA의 목표는 다양한 난이도의 간단하고 간단한 인터페이스를 통해 가장 일반적인 웹 취약점 중 일부를 연습하는 것입니다. 이 소프트웨어는

PhpStorm 맥 버전
최신(2018.2.1) 전문 PHP 통합 개발 도구

SublimeText3 Mac 버전
신 수준의 코드 편집 소프트웨어(SublimeText3)

MinGW - Windows용 미니멀리스트 GNU
이 프로젝트는 osdn.net/projects/mingw로 마이그레이션되는 중입니다. 계속해서 그곳에서 우리를 팔로우할 수 있습니다. MinGW: GCC(GNU Compiler Collection)의 기본 Windows 포트로, 기본 Windows 애플리케이션을 구축하기 위한 무료 배포 가능 가져오기 라이브러리 및 헤더 파일로 C99 기능을 지원하는 MSVC 런타임에 대한 확장이 포함되어 있습니다. 모든 MinGW 소프트웨어는 64비트 Windows 플랫폼에서 실행될 수 있습니다.

ZendStudio 13.5.1 맥
강력한 PHP 통합 개발 환경
