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

源码安装php

时间:2016-08-16 23:49:09      阅读:255      评论:0      收藏:0      [点我收藏+]

标签:

php
安装扩展源
yum install epel-release
yum update
yum install libmcrypt libmcrypt-devel mcrypt mhash -y
yum install -y gcc gcc-c++ autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libpng libpng-devel libxml2 libxml2-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel bzip2 bzip2-devel ncurses curl openssl-devel gdbm-devel db4-devel libXpm-devel libX11-devel gd-devel gmp-devel readline-devel libxslt-devel expat-devel xmlrpc-c xmlrpc-c-devel

编译安装
tar zxvf php-5.6.24.tar.gz
cd php-5.6.24
./configure --prefix=/usr/local/lnmp/php-5.6.24 \
--enable-fpm --with-mcrypt --enable-mbstring \
--disable-pdo --with-curl --disable-debug \
--disable-rpath --enable-inline-optimization \
--with-bz2 --with-zlib --enable-sockets \
--enable-sysvsem --enable-sysvshm --enable-pcntl \
--enable-mbregex --with-mhash --enable-zip \
--with-pcre-regex --with-mysql --with-mysqli \
--with-gd --with-jpeg-dir --with-openssl
make &&make install

创建配置文件
cp php-fpm.conf.default php-fpm.conf
vim /usr/local/lnmp/php-5.6.24/etc/php-fpm.conf
更改
user = www
group = www

创建www用户和组
groupadd www
useradd -g www www

cp /var/opt/lnmp/php-5.6.24/php.ini-production /usr/local/lnmp/php-5.6.24/lib/php.ini
vim /usr/local/lnmp/php-5.6.24etc/php-fpm.conf
打开pid = run/php-fpm.pid注释

vim /usr/local/lnmp/nginx-1.10.1/conf/nginx.conf
打开解读php主页

启动php和nginx
/usr/local/lnmp/php-5.6.24/sbin/php-fpm
/usr/local/lnmp/nginx-1.10.1/sbin/nginx

源码安装php

标签:

原文地址:http://www.cnblogs.com/hygs/p/5778225.html

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