<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>运维博客 &#187; Redis</title>
	<atom:link href="http://www.ywbk.cc/category/redis/feed" rel="self" type="application/rss+xml" />
	<link>http://www.ywbk.cc</link>
	<description>开发&#38;运维</description>
	<lastBuildDate>Thu, 28 May 2026 02:59:52 +0000</lastBuildDate>
	<language>zh-CN</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=3.7.41</generator>
	<item>
		<title>Linux CentOS7使用rpm方式安装redis</title>
		<link>http://www.ywbk.cc/1037.html</link>
		<comments>http://www.ywbk.cc/1037.html#comments</comments>
		<pubDate>Fri, 03 Dec 2021 03:10:03 +0000</pubDate>
		<dc:creator><![CDATA[sxdgy]]></dc:creator>
				<category><![CDATA[Redis]]></category>

		<guid isPermaLink="false">http://www.05bd.com/?p=1037</guid>
		<description><![CDATA[1、查询是否已经安装了redis rpm -qa&#124;grep redis #如果有安装了 ，执行rpm -e r [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2>1、查询是否已经安装了redis</h2>
<pre class="prettyprint linenums" >
rpm -qa|grep redis
#如果有安装了 ，执行rpm -e redis卸载
</pre>
<h2>2、下载redis rpm包并安装</h2>
<pre class="prettyprint linenums" >
get https://rpms.remirepo.net/enterprise/7/remi/x86_64/redis-6.2.6-1.el7.remi.x86_64.rpm
#也可去http://pkgs.org/download/redis找合适的版本
rpm -ivh redis-6.2.6-1.el7.remi.x86_64.rpm
#授权日志目录：
chown redis:redis /var/log/redis/redis.log
#根据需要编辑配置文件：
vim /etc/redis.conf
daemonize yes
bind 127.0.0.1
</pre>
<h2>3、启动、重启、停止redis</h2>
<pre class="prettyprint linenums" >
systemctl start redis
systemctl status redis
systemctl stop redis
</pre>
<h2>4、设置开机自启动</h2>
<pre class="prettyprint linenums" >
systemctl enable redis 
systemctl list-unit-files|grep redis
</pre>
<p>转载请注明：<a href="http://www.ywbk.cc">运维博客</a> &raquo; <a href="http://www.ywbk.cc/1037.html">Linux CentOS7使用rpm方式安装redis</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ywbk.cc/1037.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CentOS环境源码安装Redis3.0.7</title>
		<link>http://www.ywbk.cc/344.html</link>
		<comments>http://www.ywbk.cc/344.html#comments</comments>
		<pubDate>Mon, 21 May 2018 07:04:12 +0000</pubDate>
		<dc:creator><![CDATA[sxdgy]]></dc:creator>
				<category><![CDATA[Redis]]></category>

		<guid isPermaLink="false">http://05bk.com/?p=344</guid>
		<description><![CDATA[Redis(REmote Dictionary Server)是一种使用C语言编写、基于键值对（key-val [&#8230;]]]></description>
				<content:encoded><![CDATA[<blockquote><p>Redis(REmote Dictionary Server)是一种使用C语言编写、基于键值对（key-value）、可基于内存亦可持久化的并提供多种语言的API的NoSQL数据库，与很多键值对数据库不同的是，Redis中的值可以是由string（字符串）、hash（哈希）、list（列表）、set（集合）、zset（有序集合）、Bitmaps（位图）、HyperLogLog、GEO（地理信息定位）等多种数据结构和算法组成，因此Redis可以满足很多的应用场景，而且因为Redis会将所有数据都存放在内存中，所以它的读写性能非常惊人。不仅如此，Redis还可以将内存的数据利用快照和日志的形式保存到硬盘上，这样在发生类似断电或者机器故障的时候，内存中的数据不会“丢失”。</p></blockquote>
<h2>1.安装必要依赖</h2>
<pre class="prettyprint linenums">yum install -y gcc tcl</pre>
<h2>2.下载源码包并解压</h2>
<pre class="prettyprint linenums">wget http://download.redis.io/releases/redis-3.0.7.tar.gz
tar zxvf redis-3.0.7.tar.gz</pre>
<h2>3.编译安装</h2>
<pre class="prettyprint linenums">cd redis-3.0.7
make
make install</pre>
<p>安装完成后将Redis的相关运行文件放在/usr/local/bin/下，具体含义如下：</p>
<pre class="prettyprint linenums">redis-benchmark    #基准测试工具
redis-check-dump   #RDB持久化文件检测和修复工具
redis-check-aof    #AOF持久化文件检测和修复工具
redis-cli          #命令行客户端
redis-sentinel     #启动sentinel
redis-server       #启动Redis</pre>
<h2>4.查看Redis的版本</h2>
<pre class="prettyprint linenums">redis-cli -v 
redis-cli 3.0.7</pre>
<h2>5.启动Redis</h2>
<p>有三种方法启动Redis：默认配置启动、运行配置启动、配置文件启动，依次如下:</p>
<pre class="prettyprint linenums">redis-server                 #无法自定义配置，不会被生产环境中使用
redis-server --port 6380     #需要指定配置名和值（可以是多对），所以也不常用该方式
redis-server /etc/redis.conf #将配置写到指定文件里，更加灵活，该方式常用</pre>
<h2>6.停止Redis</h2>
<pre class="prettyprint linenums">redis-cli shutdown</pre>
<p>转载请注明：<a href="http://www.ywbk.cc">运维博客</a> &raquo; <a href="http://www.ywbk.cc/344.html">CentOS环境源码安装Redis3.0.7</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.ywbk.cc/344.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
