Centos安装php7.2
2018-02-06 14:59
405 查看
服务器配置
2核 Intel(R) Xeon(R) CPU E5-2640 0 @ 2.50GHz 内存 4G 系统 Centos 6.2 gcc 4.4.7
安装
# http://hk1.php.net/get/php-7.1.10.tar.gz/from/this/mirror $ ./configure --prefix=/data/local/php71 --with-config-file-path=/data/local/php71/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir=/usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-xsl
# https://downloads.php.net/~remi/php-7.2.0RC3.tar.gz $ ./configure --prefix=/data/local/php72 --with-config-file-path=/data/local/php72/etc --enable-fpm --with-fpm-user=www --with-fpm-group=www --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-iconv-dir --with-freetype-dir= f528 /usr/local/freetype --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --enable-intl --enable-pcntl --enable-ftp --with-gd --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --with-gettext --disable-fileinfo --enable-opcache --with-xsl
$ /data/local/php71/bin/php -v PHP 7.1.10 (cli) (built: Oct 8 2017 16:08:01) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies $ /data/local/php72/bin/php -v PHP 7.2.0RC3 (cli) (built: Oct 8 2017 18:11:35) ( NTS ) Copyright (c) 1997-2017 The PHP Group Zend Engine v3.2.0-dev, Copyright (c) 1998-2017 Zend Technologies
php.ini 配置
仅供测试,非生产环境使用,摘录自 http://www.laruence.com/2016/...engine = On short_open_tag = Off realpath_cache_size = 2M max_execution_time = 86400 memory_limit = 1024M error_reporting = 0 display_errors = 0 display_startup_errors = 0 log_errors = 0 default_charset = "UTF-8" [opcache] zend_extension=opcache.so opcache.enable=1 opcache.enable_cli=1 opcache.optimization_level=-1 opcache.fast_shutdown=1 opcache.validate_timestamps=1 opcache.revalidate_freq=60 opcache.use_cwd=1 opcache.max_accelerated_files=100000 opcache.max_wasted_percentage=5 opcache.memory_consumption=128 opcache.consistency_checks=0 opcache.huge_code_pages=1
转自: https://segmentfault.com/a/1190000012260569#articleHeader2
相关文章推荐
- centos7.2安装redis及phpredis
- Centos7.2 编译安装PHP7.0.2的步骤
- CentOS 7.2 下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1的方法详解(mini版本)
- centos7.2安装php7.1.3
- centos7.2 lnmp安装zeromq、php-zmq扩展和使用
- centos7.2 lamp环境安装搭建mysql5.7.14+php7.0.9
- centos7.2 安装php7
- CentOS7.2 安装php 7.1+workerman+MariaDB
- CentOS7.3(1611) 安装 nginx+php7.2+mysql5.7
- CentOS7源码包编译安装php7.2完整版
- CentOS 7.2 yum安装配置lnmp服务器(Nginx+PHP+MySQL)
- CentOS 7.2 下编译安装PHP7.0.10+MySQL5.7.14+Nginx1.10.1的方法详解(mini版本)
- CentOS7.2安装PHP7.2
- centos7.4搭建lnmp ###编译安装 nginx1.12 php7.2 ###
- centos7.2安装php
- CentOS 7.2 64位安装LNMP php7+Mysql 5.7
- CentOS7下PHP7.2安装redis扩展
- Centos 7.2 PHP 7.0 安装
- centos7.2 yum 安装php nginx
- CentOS 7.3+PHP7.2+mysql5.7+Workerman3安装