1.首先安装一个虚拟机(我自己版本:VM 10.0.4)

yum -y install openssl psmisc openssl-devel php-devel pcre-devel gcc gcc-c++ libxml2 libcurl.x86_64 libcurl-devel.x86_64 bzip2-devel.x86_64 libxml2-devel autoconf libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel zlib zlib-devel glibc glibc-devel glib2 glib2-devel

   1.首先把上面需要的包都安装了,不然后面很容易报错的。

     2.用ifconfig查看你的IP

2.终端连接Linux(我用的是:smarTTY)

   2.1 如果链接不上的话,试一下以下方法(1.开启ssh执行: srevice sshd start 2.关闭防火墙:service iptables stop)

3.安装软件(我是下载到/usr/local/tools目录下如下图:)

  3.1首先安装Nginx

    1.下载nginx(下载地址:wget http://nginx.org/download/nginx-1.5.9.tar.gz)

    2.解压(命令:tar -zxvf nginx-1.5.9.tar.gz)

    3.切换目录(命令:cd nginx-1.5.9)

    4.配置(命令:

./configure --prefix=/usr/local/nginx \
--with-http_ssl_module --with-http_spdy_module \
--with-http_stub_status_module --with-pcre

)

    5.编译安装(命令:make && make install)

    6.开启nginx(命令:/usr/local/nginx/sbin/nginx。nginx安装目录放到/usr/local/nginx中)

    (当你看到下面这个页面的时候说明你安装nginx成功了)

  3.2安装php环境

    1.下载php(下载地址:wget http://cn2.php.net/distributions/php-5.6.28.tar.gz)

    2.解压(命令:tar -zxvf php-5.6.28.tar.gz)

    3.切换目录(命令:cd php-5.6.28)

    4.配置(命令:

./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-gd --enable-gd-native-ttf --with-libxml-dir=/usr --enable-xml --enable-sockets --enable-fpm --with-config-file-path=/etc --with-bz2 --with-curl --with-mhash

)

    5.编译安装(命令:make && make install)

    6.复制php配置文件(cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf)

    7.开启php(命令:/usr/local/php/sbin/php-fpm。php安装目录放到/usr/local/php中)

    8.配置nginx的cgi(修改路径:/usr/local/nginx/conf/nginx.conf)

    

  3.3安装redis

    1.下载php(下载地址:wget http://cn2.php.net/distributions/php-5.6.28.tar.gz)

    2.解压(命令:tar -zxvf php-5.6.28.tar.gz)

    3.切换目录(命令:cd php-5.6.28)

    4.配置(命令:

./configure --prefix=/usr/local/php --with-mysql=mysqlnd --with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-openssl --enable-mbstring --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-gd --enable-gd-native-ttf --with-libxml-dir=/usr --enable-xml --enable-sockets --enable-fpm --with-config-file-path=/etc --with-bz2 --with-curl --with-mhash

)

    5.编译安装(命令:make && make install)

    6.复制php配置文件(cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf)

Linux centos 6 配置php环境,扩展redis的更多相关文章

  1. [ 原创 ]linux centos下配置java环境教程

    一.环境 centos 7.2 二.目标 在CentOS7.2上安装jdk1.8(tar.gz安装包),并配置环境变量 jdk安装在/home/soft/jdk1.8.0-131目录下 具体步骤 1. ...

  2. Linux|CentOS下配置Maven环境

    1.下载maven包 wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven ...

  3. Centos下配置php环境

    Centos下配置php环境   目录[-] 环境: GD2 2 安装PHP 5.2.14(FastCGI模式) 1)编译安装PHP 5.2.14所需的支持库: 2)编译安装MySQL 5.5.3-m ...

  4. 阿里云服务器Linux CentOS安装配置(零)目录

    阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...

  5. 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署

    阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...

  6. 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

    阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...

  7. 阿里云服务器Linux CentOS安装配置(七)域名解析

    阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...

  8. 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署

    阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...

  9. 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署

    阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...

随机推荐

  1. Unity3d 5.3.5使用sqlite3

    http://blog.csdn.net/glunoy/article/details/52037598 国内讲的乱七八糟,更有故作神秘提供Mono.Data.Sqlite.dll System.Da ...

  2. Unable to load EJB module

    http://stackoverflow.com/questions/12414526/unable-to-load-ejb-module

  3. Androidstudio坑

    1.intel haxm sdkmanager显示不可选中,而且boost设置好了intervt 解决:重新关闭,打开系统,然后开启.... 2.解决不了一直报错,(自己的代码,明明已经没有问题) 有 ...

  4. 如何杀死defunct进程

    原文: How to kill defunct process 译者: youngsterxyf defunct进程是指出错损坏的进程,父子进程之间不会再通信.有时,它们会演变成“僵尸进程”,存留在你 ...

  5. Netty(4-1)factorial~总结

    本节大纲: 1.Handler的执行顺序2.自定义二进制协议(每条完整数据的组成),从而解决拆包和粘包.3.通过为每个channel创建新的handler,从而解决即使handler中使用全局变量,也 ...

  6. (转)nginx利用geo模块做限速白名单以及geo实现全局负载均衡的操作记录

    nginx利用geo模块做限速白名单以及geo实现全局负载均衡的操作记录 原文:http://www.cnblogs.com/kevingrace/p/6165572.html Nginx的geo模块 ...

  7. linux网卡软中断shell脚本

    LANG=C;export LANG;  service irqbalance stop >/dev/null 2>&1;chkconfig irqbalance off; bon ...

  8. 关于C#操作Excel,复制Sheet的记录

    1.先用了NPOI,去做,HSSFWorkbook 里面有一个Copy方法,但这个只支持office2003. 对应的XSSFWorkbook没有些方法. 而且这个这个方法对devexpress导出的 ...

  9. Aspose.word直接转pdf

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  10. java获取服务器一些信息的方法

    request.getServletContext().getRealPath("/") 获取项目所在服务器的全路径,如:D:\Program Files\apache-tomca ...