Linux centos 6 配置php环境,扩展redis
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的更多相关文章
- [ 原创 ]linux centos下配置java环境教程
一.环境 centos 7.2 二.目标 在CentOS7.2上安装jdk1.8(tar.gz安装包),并配置环境变量 jdk安装在/home/soft/jdk1.8.0-131目录下 具体步骤 1. ...
- Linux|CentOS下配置Maven环境
1.下载maven包 wget http://mirrors.tuna.tsinghua.edu.cn/apache/maven/maven-3/3.3.9/binaries/apache-maven ...
- Centos下配置php环境
Centos下配置php环境 目录[-] 环境: GD2 2 安装PHP 5.2.14(FastCGI模式) 1)编译安装PHP 5.2.14所需的支持库: 2)编译安装MySQL 5.5.3-m ...
- 阿里云服务器Linux CentOS安装配置(零)目录
阿里云服务器Linux CentOS安装配置(零)目录 阿里云服务器Linux CentOS安装配置(一)购买阿里云服务器 阿里云服务器Linux CentOS安装配置(二)yum安装svn 阿里云服 ...
- 阿里云服务器Linux CentOS安装配置(九)shell编译、打包、部署
阿里云服务器Linux CentOS安装配置(九)shell编译.打包.部署 1.查询当前目录以及子目录下所有的java文件,并显示查询结果 find . -name *.java -type f - ...
- 阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定
阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx star ...
- 阿里云服务器Linux CentOS安装配置(七)域名解析
阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域 ...
- 阿里云服务器Linux CentOS安装配置(六)resin多端口配置、安装、部署
阿里云服务器Linux CentOS安装配置(六)resin多端口配置.安装.部署 1.下载resin包 http://125.39.66.162/files/2183000003E08525/cau ...
- 阿里云服务器Linux CentOS安装配置(五)jetty配置、部署
阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty ...
随机推荐
- 蓝桥杯T37(nim博弈)
题目链接:http://lx.lanqiao.cn/problem.page?gpid=T37 题意:中文题诶- 思路:nim博弈 个人感觉这题最难的地方是将题目转换为博弈模型,如果能将之转换为博弈模 ...
- [Xcode 实际操作]七、文件与数据-(7 )使用UserDefaults检测App是否首次运行
目录:[Swift]Xcode实际操作 本文将演示UserDefaults的使用,它常被用于存储程序的配置数据. 当关闭程序之后,再次打开程序时,之前存储的数据依然可以从UserDefaults里读取 ...
- 剑指Offer的学习笔记(C#篇)-- 构建乘积数组
题目描述 给定一个数组A[0,1,...,n-1],请构建一个数组B[0,1,...,n-1],其中B中的元素B[i]=A[0]*A[1]*...*A[i-1]*A[i+1]*...*A[n-1].不 ...
- oracle rownum(转)
对于Oracle的rownum问题,很多资料都说不支持>,>=,=,between……and,只能用以上符号(<.& lt;=.!=),并非说用>,>=,=,be ...
- 从各处收集的switch语句
重构之重复代码: 1.(重复代码是)语义一致的逻辑 反例:语义一致的逻辑产生了多个实体 缺点:如果你为语义一致的逻辑产生了多个实体,那么当需要修改这个逻辑时,你必须保证同时修改所有的实体,并确保它们是 ...
- CC22:检查是否为BST
题目 请实现一个函数,检查一棵二叉树是否为二叉查找树. 给定树的根结点指针TreeNode* root,请返回一个bool,代表该树是否为二叉查找树. 解法 二叉排序树有个特点是,结点通过中序遍历出来 ...
- Python模块之 sys
# sys模块是与python解释器交互的一个接口 import sys print(sys.argv) # 命令行参数list,第一个元素是程序本身路径 # (第一个元素就是执行文件的时候,写在py ...
- TYVJ P2032 「Poetize9」升降梯上 spfa最短路
%%%暴搜出奇迹%%%@SiriusRen 其实我刚开始题读错了,才导致我写图论... spfa跑最短路,开一个node记录状态(pair当然滋磁):所在楼层和槽的位置 以层数为1,槽在0的位置 为初 ...
- Codeforces 1105D(双层广搜)
要点 题意:可以拐弯,即哈密顿距离 注意不可以直接一个一个搜,这过程中会把下一轮的标记上,导致同一轮的其它点没能正常完成应有的搜索 因此采用双层广搜,把同一轮先都出队列再的一起搜 #include & ...
- Codeforces Round 56-A. Dice Rolling(思维题)
time limit per test 1 second memory limit per test 256 megabytes input standard input output standar ...