下载软件,使用命令wget xxx,参数:url
例如:
wget http://download.redis.io/releases/redis-3.0.0.tar.gz
解压缩,使用命令tar,参数:zxvf z(gzip属性的)、x(解压)、v(显示过程)、f(使用档案名称),文件名
例如:
tar zxvf redis-3.0.0.tar.gz
切换到解压目录里,进行安装
cd redis-3.0.0
make
此时就安装完成了,进到目录src里面,启动redis
redis-server
打开客户端,进行测试,还是src目录,启动客户端
redis-cli
进入了redis控制面板,使用命令set get测试
set name taoshihan
get name
运行外网访问,先暂时关闭防火墙或者,或开放防火墙的6379端口
关闭防火墙:service iptables stop
修改防火墙规则:编辑/etc/sysconfig/ iptables 文件
可以复制其他端口的配置改一下,添加一行 -A INPUT -p tcp -m tcp --dport 6379 -j ACCEPT
php测试
windows系统下载php扩展文件
下载地址:http://windows.php.net/downloads/pecl/releases/redis/2.2.7/php_redis-2.2.7-5.6-ts-vc11-x64.zip
把php_redis.dll放到 ext目录下,修改一下php.ini
添加extension=php_redis.dll
<span style="color: #000000;">php </span><span style="color: #008000;">//</span><span style="color: #008000;"> 连接到redis</span> <span style="color: #800080;">$redis</span>=<span style="color: #0000ff;">new</span><span style="color: #000000;"> Redis(); </span><span style="color: #800080;">$redis</span>->connect('192.168.1.113', 6379<span style="color: #000000;">); </span><span style="color: #800080;">$redis</span>->set("name","小雪狼"<span style="color: #000000;">); </span><span style="color: #0000ff;">echo</span> <span style="color: #800080;">$redis</span>->get("name"<span style="color: #000000;">); </span>?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Dreamweaver CS6
Visual web development tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.