Redis is a high-performance Key-value database. The emergence of redis largely compensates for the shortage of keyValue storage such as memcached, and can play a very good complementary role in relational databases. It provides python, Ruby, Erlang, and PHP clients for ease of use. The problem is that this project is still quite new and may not be stable enough, and there are no actual instances for large-s
zset (sorted set ).
Redis storage is divided into three parts: memory storage, disk storage, and log files. The configuration file contains three parameters for configuration.
Install and use Redis in Windows
First download redis online, I downloaded a redis-2.0.2, I decomp
;set ($key, $value); Setting variables and variable values$redis->get ($key); Get variable Value$redis->close (); Turn off Redis connections?>This time you may not enter anything, this is because you have not installed the Phpredis extension;Redis is an open source API that is written in ANSI C, supports the web, can b
course you can also go to the official website to download the latest version of Redis Http://pan.baidu.com/s/1pK8BMGFCopy the service program to a directory on a disk, such as:File Description:Redis-server.exe: Service ProgramRedis-check-dump.exe: Local Database checkRedis-check-aof.exe: Update log checkRedis-benchmark.exe: Performance test to simulate the simu
The following is how the Linux Open port command is used.Nc-lp (Open 23 port, Telnet)Netstat-an | grep 23 (see if 23 ports are open)When you do Redis, you want to boot from the 6379 port: (Essentially, the service you want to start the port from)1. Modify the/etc/redis.confto open the background run option:# By default, Redis does not run as a daemon. Use the '
starts from the start, to the start of the end, a total of two minutes and a half, this time for the Windows service startup, the time is very long. Based on this situation, as well as the description of the system event, it is possible that the service startup timed out.To verify this speculation, add a sleep (60000) when the database
1.download redis-2.8.9.tar.gz from the official network, the redis decompress in/usr/local, the directory is a redis-2.8.9, and then according to the official site to install redis.2. Run src/redis-server in the redis-2.8.9 direct
Daemon launcher for Redis server redis.conf redis profile redis-cli.exe REDIS command Line Operations tool. Of course, you can also use Telnet to manipulate the Redis-check-dump.exe Local database check redis
#!/bin/sh add #chkconfig:2345 80 90, (if not added, when registering the service: Service Redis does not chkconfig) 2). The Redisport configures 3 according to its own environment configuration. Exec=/usr/local/bin/redis-server changed to Exec=redis/src/
Windows Redis Installation and PHP usage
I. Installing REDIS and enabling services
1 Download Redis Client
?
Http://code.google.com/p/servicestack/wiki/RedisWindowsDownload#Download_32bit_Cygwin_builds_for_Windows
?
2 Unzip to the directory you need
?
3 Creating a redis.conf file
?
?
#
Redis-check-aof.exe # AOFRedis-check-dump.exe # DumpRedis-cli.exe # ClientRedis-server.exe # ServerREDIS.WINDOWS.CONF # configuration fileOf course, there is a Redisservice.docx file, which appears to be a description of some startup and installation services, but according to his instructions, you will die very miserable, inexplicably dead, do not know the reason."After the machine re-test has been identified, if not administrator users, there will b
the MSI installation file as well as the. zip file (and a 3.0 beta version, please drop-down to find).Download the pressure, there is nothing to say, in the post-decompression bin under the following documents:Redis-benchmark.exe #基準測試redis-check-aof.exe # aofredis-check-dump.exe # dumpredis-cli.exe # Client Redis-server.exe # server redis.windows.conf
Recently carefully checked the installation of Redis, before the general is used Memcache, Hangzhou project installed Redis also opened a DOS window, shut down the DOS window Redis service terminated, very troublesome, want to install Redis into
Have to say that. NET installation service is very troublesome, that is, to create a service, create a serviceinstall, and finally get a bunch of commands to install and uninstall.Today gives you a way to use our program directly to install/uninstall the service, and allows an EXE to run directly or install as a Windows
Building Redis (be sure to run tests on the server to make sure all commands are available)Linux Code
$ CD redis-2.8.17
$ make
$ make Test
When building, I encountered an error that prompted the "missing C + + compiler" and would prompt for an available installation package ("sudo apt-get install g++").3.2 Running a Redis serverLinux Code
native IPSet Hello HelloWorldSet a valueGet HelloRead this valueAbout 15 minutes later, we found a change in the server side.The original 15 minutes automatically writes in-memory data to the RDF file in case of loss.As for why it is 15 minutes, we can see that the configuration file is set up (a change/900 seconds, 10 changes/300 seconds, 10000 changes/60 seconds), that is, the more changes in the data to write to the file time interval shorter, so the design is quite reasonable.III.Redis Desk
:Listen: 127.0.0.1: 6379 # port used to start TwemproxyRedis: true # whether it is Redis's proxyHash: fnv1a_64 # specify a specific hash FunctionDistribution: ketama # specific hash AlgorithmAuto_eject_hosts: true # Whether to temporarily remove the node when the node cannot respondTimeout: 400 # timeout (MS)Server_retry_timeout: 2000 # retry time (MS)Server_failure_limit: 1 # The number of node failures is removed.Servers: # All Redis nodes (IP: Port
Path6progname=redis-Server7daemon=$PROGDIR/$PROGNAME8config=/usr/Local/redis/conf/6379.conf9pidfile=/var/run/redis-6379.PIDTenDesc="Redis Daemon" Onescriptname=/etc/init.d/Redis A - Start () - { the ifTest- x $DAEMON - Then -Echo-e"starting $DESC: $PROGNAME" -
: This article describes how to install the redis service and phpredis extension in linux. For more information about PHP tutorials, see. More please support: http://www.webyang.net/Html/web/article_174.html
I. redis installationDownload, extract and compile Redis:
$ wget http://download.redis.io/releases/
command "restart redis-server.exe redis. windows. conf" to start the redis service. if the following error is not displayed, skip this step ]. If you see the following errors like me, don't worry, there is always a solution!Solution:As prompted, the maxheap identity is inco
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.