VMware上redis的安装

本人小白一个,刚参加工作,由于工作需要,研究了一下redis的安装和使用,如果写的不对的地方,还望前辈多多指正。
运行环境和所需要软件:window7 32位,虚拟机VMware10.0.4,虚拟机linux使用centos6.5,
   redis3.0版本,SecureCRT.
安装的前提条件:安装gcc:yum install gcc-c++
下面开始安装:
一、安装
1、下载redis的源码包。
2、把源码包上传到linux服务器
使用put指令,或者使用SecureCRT把redis-3.0.0.tar.gz安装包上传到linux。具体操作,在SecureCRT窗口,同时摁住alt和p打开
一个上传文件的窗口,直接把要上传的文件拖拽进来即可上传。我的上传到/home/xiaojie
3、解压源码包
进入/home/xiaojie解压刚才上传的文件。指令如下:
tar -zxvf redis-3.0.0.tar.gz 
4、解压安成后进行编译。查看指令[[email protected] xiaojie]# ll 多了一个redis-3.0.0的文件,
进入该目录
[[email protected] xiaojie]# cd redis-3.0.0
指令 make 进行编译。
5、编译完成后进行安装 make install
[[email protected] redis-3.0.0]# make install PREFIX=/usr/local/redis(指定安装目录)
二、启动
启动redis
1、前端启动模式
/usr/local/redis/bin/redis-server
VMware上redis的安装

默认是前端启动模式,端口是6379,出现此界面,表示redis安装成功。
2、后端启动
1)从redis的源码目录中复制redis.conf到redis的安装目录。指令如下:
[[email protected] redis-3.0.0]# cp redis.conf /usr/local/redis/bin/
2)修改配置文件
[[email protected] bin]# vim redis.conf 
VMware上redis的安装

3)启动:[[email protected] bin]# ./redis-server redis.conf
执行这个指令查看是否启动成功:如果出现下面的代码,则代表启动成功
[[email protected] bin]# ps aux |grep redis
root      5793  0.1  0.1  33936  1724 ?        Ssl  21:42   0:00 ./redis-server *:6379    
root      5801  0.0  0.0   4356   724 pts/0    S+   21:43   0:00 grep redis
[[email protected] bin]# 
4)关闭
首先进入redis客户端
[[email protected] bin]# ./redis-cli 
执行如下指令:
127.0.0.1:6379> SHUTDOWN
not connected> quit
[[email protected] bin]# 
执行如下命令查看是否关闭,如下表示已关闭:
[[email protected] bin]# ps aux |grep redis
root      5823  0.0  0.0   4356   728 pts/0    S+   21:47   0:00 grep redis
[[email protected] bin]# 

单机版的redis,到这就安装完成了,下次有时间,再写一下,redis集群的安装过程,写的不对的地方,希望大家多多指正。

最后谢谢网上的那些大神们,没有参考你们的文章,我也搞不定这个安装,再次谢谢那些大神们。