码迷,mamicode.com
首页 > Web开发 > 详细

PHP install

时间:2017-09-10 17:48:28      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:开机   open   zip   fpm   socket   config   local   rpc   bre   

PHP7 整合了 Fastcgi 

启动项变成了 php-fpm

首先要安装php所需要的依赖库

yum -y install libjpeg libjpeg-devel libpng libpng-devel freetype freetype-defel libxml2 libxml2-devel pcre-devel curl-devel libxslt-devel

 

 

// 下载php

 wget http://php.net/distributions/php-7.0.23.tar.xz   

 

 

//解压

 xz -d php-7.0.23.tar.xz

 

//拆包

tar xvf php-7.0.23.tar

cd php-7.0.23

 

 

//编译-具体配置选项 google  百度查询 都有解释

# ./configure --prefix=/usr/local/php 
 --sbin-path=/usr/sbin/php 
 --bin-path=/usr/bin/php 
 --with-curl 
 --with-freetype-dir 
 --with-gd 
 --with-gettext 
 --with-iconv-dir 
 --with-kerberos 
 --with-libdir=lib64 
 --with-libxml-dir 
 --with-mysqli 
 --with-openssl 
 --with-pcre-regex 
 --with-pdo-mysql 
 --with-pdo-sqlite 
 --with-pear 
 --with-png-dir 
 --with-xmlrpc 
 --with-xsl 
 --with-zlib 
 --enable-fpm 
 --enable-bcmath 
 --enable-libxml 
 --enable-inline-optimization 
 --enable-gd-native-ttf 
 --enable-mbregex 
 --enable-mbstring 
 --enable-opcache 
 --enable-pcntl 
 --enable-shmop 
 --enable-soap 
 --enable-sockets 
 --enable-sysvsem 
 --enable-xml 
 --enable-zip

 

 

note:"在配置中 注意 是否有错误和缺少依赖包的提示,如果有就自行添加"

 

编译安装

make&&make install

 

 

 

 

配置文件cp

//php-fpm的引用文件

 cp /usr/local/php/etc/php-fpm.conf.default    /usr/local/php/etc/php-fpm.conf

 

//将php-fpm启动 移动到init.d 开机启动

cp -R ./sapi/fpm/php-fpm   /etc/init.d/php-fpm    

 

 

# php -v   出现下面的提示就ok了

技术分享

PHP install

标签:开机   open   zip   fpm   socket   config   local   rpc   bre   

原文地址:http://www.cnblogs.com/hnshi/p/7501423.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!