1、安装mysql请参照 centos 7 min 编译安装mysql5.6.20 笔记

2、编译安装php5.6+nginx1.7.5

2.1、安装php5.6.0

首先添加依赖应用
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

安装加密扩展库
cd /usr/local/src/
wget libmcrypt-2.5.8.tar.gz
tar zxvf libmcrypt-2.5.8.tar.gz 
cd libmcrypt-2.5.8
./configure
make
make install

cd ../

wget http://cn2.php.net/distributions/php-5.6.0.tar.gz
tar zxvf php-5.6.0.tar.gz 
cd php-5.6.0

./configure --prefix=/usr/local/php-5.6.0 --with-mysql=/usr/local/mysql --with-mysql-sock --with-mysqli=/usr/local/mysql/bin/mysql_config --enable-fpm --with-ncurses --enable-soap --with-libxml-dir --with-XMLrpc --with-openssl --with-mcrypt --with-mhash --with-pcre-regex --with-sqlite3 --with-zlib --enable-bcmath --with-iconv --with-bz2 --enable-calendar --with-curl --with-cdb --enable-dom --enable-exif --enable-fileinfo --enable-filter --with-pcre-dir --enable-ftp --with-gd --with-openssl-dir --with-jpeg-dir --with-png-dir --with-zlib-dir  --with-freetype-dir --enable-gd-native-ttf --enable-gd-jis-conv --with-gettext --with-gmp --with-mhash --enable-json --enable-mbstring --disable-mbregex --disable-mbregex-backtrack --with-libmbfl --with-onig --enable-pdo --with-pdo-mysql --with-zlib-dir --with-pdo-sqlite --with-readline --enable-session --enable-shmop --enable-simplexml --enable-sockets --enable-sqlite-utf8 --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-libxml-dir  --with-xsl --enable-zip --enable-mysqlnd-compression-support --with-pear

make && make install

Build complete.
Don't forget to run 'make test'.

cp /usr/local/php-5.6.0/etc/php-fpm.conf.default php-fpm.conf
 //复制一份并重命名

/usr/local/php-5.6.0/sbin/php-fpm 
//启动php-fpm

修改FPM 配置文件php-fpm.conf
pm.max_children = 50
pm.start_servers = 20 
pm.min_spare_servers = 5
pm.max_spare_servers = 35
pm.max_requests = 500
去掉分号

ln -s /usr/local/php-5.6.0/sbin/php-fpm /bin/php-fpm
cp /usr/local/src/php-5.6.0/php.ini-producsion /usr/local/php-5.6.0/lib/php.ini

至此php-fpm安装完成

===================================================================================
2.2、安装nginx1.7.5
wget http://nginx.org/download/nginx-1.7.5.tar.gz

useradd www   
#添加www nginx运行账户

usermod -s /sbin/nologin -g www www 
#将www加入www组并禁止www登录shell

tar zxvf nginx-1.7.5.tar.gz
cd nginx-1.7.5
./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_stub_status_module --with-http_ssl_module --with-pcre

make && make install

/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
 #启动nginx,nginx启动成功。

/usr/local/nginx/sbin/nginx -s reload
ln -s /usr/local/nginx/sbin/nginx /usr/sbin/nginx

//接下来修改nginx配置文件,根据需要修改对应文件
vim nginx.conf

user  nobody; #去掉前面

根据 include        fastcgi_params;
vim fastcgi_params

添加以下,保存
fastcgi_param  SCRIPT_FILENAME    $document_root$fastcgi_script_name; 
#否则nginx不能找到php文件进行解析

nginx -s reload
//nginx重启

nginx安装结束。

=======================================================================
CentOS 7.0默认使用的是firewall作为防火墙。
关闭firewall:
systemctl stop firewalld.service #停止firewall
systemctl disable firewalld.service #禁止firewall开机启动

centos 7 min 编译安装php5.6+nginx1.7.5 笔记的更多相关文章

  1. CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    准备篇: CentOS 7.0系统安装配置图解教程 http://www.osyunwei.com/archives/7829.html 一.配置防火墙,开启80端口.3306端口 CentOS 7. ...

  2. CentOS 6.6编译安装Nginx1.6.2+MySQL5.6.21+PHP5.6.3

    http://www.osyunwei.com/archives/8867.html 一.配置防火墙,开启80端口.3306端口 vi /etc/sysconfig/iptables #编辑防火墙配置 ...

  3. CentOS 6.2编译安装Nginx1.2.0+MySQL5.5.25+PHP5.3.13

    CentOS 6.2编译安装Nginx1.2.0+MySQL5.5.25+PHP5.3.132013-10-24 15:31:12标签:服务器 防火墙 file 配置文件 written 一.配置好I ...

  4. CentOS 6.2编译安装Nginx1.2.0+MySQL5.5.25+PHP5.3.13+博客系统WordPress3.3.2

    说明: 操作系统:CentOS 6.2 32位 系统安装教程:CentOS 6.2安装(超级详细图解教程): http://www.osyunwei.com/archives/1537.html 准备 ...

  5. CentOS 7.0编译安装Nginx1.6.0+MySQL5.6.19+PHP5.5.14方法分享

    一.配置防火墙,开启80端口.3306端口 CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop fi ...

  6. CentOS 7.x编译安装Nginx1.10.3+MySQL5.7.16+PHP5.2 5.3 5.4 5.5 5.6 7.0 7.1多版本全能环境

    准备篇 一.防火墙配置 CentOS 7.x默认使用的是firewall作为防火墙,这里改为iptables防火墙. 1.关闭firewall: systemctl stop firewalld.se ...

  7. centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14

    centos 6.5 编译安装了 Nginx1.6.0+MySQL5.6.19+PHP5.5.14--------------------------------------------------- ...

  8. Centos6.4_X64编译安装php-5.4.17、nginx-1.4.2、mysql-5.6.13

    安装参考: CentOS 6.3编译安装Nginx1.2.2+MySQL5.5.25a+PHP5.4.5 http://www.dedecms.com/knowledge/servers/linux- ...

  9. CentOS 6.8编译安装httpd2.2.31+MySQL5.6.31+PHP5.3.27

    CentOS 6.8编译安装httpd2.2.31+MySQL5.6.31+PHP5.3.27   说明:   操作系统:CentOS 6.8 32位 准备篇: 一.系统约定    软件源代码包存放位 ...

随机推荐

  1. how to Use the Tampermonkey API from the Chrome console

    1.Create the following script: // ==UserScript== // @name Exports some GM functions // @namespace Wh ...

  2. Java中timer的schedule()和schedualAtFixedRate()函数的区别

    本文主要讨论java.util.Timer的schedule(timerTask,delay,period)和scheduleAtFixedRate(timerTask,delay,period)的区 ...

  3. 富文本编辑器 CKeditor 配置使用

    作者:Tyler Ning出处:http://www.cnblogs.com/tylerdonet/本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连 ...

  4. 【struts2】Struts2的系统架构

    Struts2的官方文档里附带了Struts2的架构图,下面这张图上展示了Struts2的内部模块,以及它们的运行流程. 这张图上分了好多块,彼此之间相互联系,先浏览一下各块的名字,再留心一下运行图最 ...

  5. Mac OS下Android Studio的Java not found问题,androidfound

    Android Studio正式版已经发布一段时间了,使用Mac版的Android Studio可能与遇到Java not found:Android Studio was unable to fin ...

  6. MySQL-InnoDB Compact 行记录格式

    InnoDB存储引擎提供了compact(5.1后的默认格式)和redundant两个格式来存放行记录数据.redundant格式是为了兼容之前的版本而保留. mysql> show table ...

  7. java中的switch case default break

    package com.didispace; /** * Created by gmq on 2017/08/07. * * @version 1.0 * @since 2017/08/07 10:4 ...

  8. centos 6.3 64位下cpuminer +mining_proxy 挖掘莱特币(LTC)教程

    1.下载软件: cpuminer: http://sourceforge.net/projects/cpuminer/files/ 找到对应的版本,我的服务器是centos64的,找了个当前最高版本: ...

  9. eclipse jdk版本设置

    1 Java Build Path(项目的编写环境配置): 在项目上单击右键,properties -> Java Build Path -> Libraries,选择JRE System ...

  10. 从ext4将mysql数据目录移动至lustre出现(InnoDB: Unable to lock ./ibdata1, error: 38.)

    因为数据目录过大,因此我把目录从本地移到了共享存储中.在修改了/etc/my.cnf和/etc/init.d/mysqld之后发现数据库可以运行,但启动速度很慢 原因是原文件系统是ext4,而目标文件 ...