Performance-related data indicators
Access the redis server through the redis-cli interface, and then use the info command to obtain all information related to the redis service. This information is used to analyze some performance indicators mentioned later in the article.
The data output by the info command can be di
specified Redis will not listen on a TCP socket.port 6380
The default port of redis is 6379. Here we set the port of the master server to 6380.
2. Modify pidfile
# If a pid file is specified, Redis writes it where specified at startup# and removes it at exit.## When the server runs non daemonized, no pid file is created if none is# specified in the configuratio
Automatic Redis installation and deployment
This article consists of four parts:
Description of the directory structure of the redis automatic installation script;
Redis automatic installation script content;
Description of the redis Operating System Service script;
The URL
[Redis 1] Redis database learning and practices-installation and deployment, redis learning and practicesRedis database learning and practice-installation and deployment 1: Redis database introduction:
Redis-Remote DictionaryServer can be directly understood as a Remote dict
standard input to read configuration as startup ParameterRedis-server -- test-memory 256 detects MB memoryRedis-server-version check version number
If you want to use it for a long time, you must register it as a system service.Go to CMD and switch to the redis directory:Register the service, which can be saved as a service-install.bat file:
desired file connection, direct download, I am now the zip compressed file. (4), save the downloaded file to any directory, of course, compressed files can also be extracted to any directory, but this directory must remember. The contents of the folder are as follows:(5), Redis is divided into the server side and the client, so we must install the server side, or Redis will not be able to provide services
persistence work to the sub-process, so that no relevant I/O operations will be performed.
Compared with AOF, RDB starts faster when the data volume is large.
Disadvantages
RDB is prone to data loss. Assume that the snapshot is saved every five minutes. If Redis cannot work properly for some reason, the data from the last snapshot generation to the time when Redis encountered a problem will be lost.
RD
represents the position of php-config.4. Compiling the installationCommandmakemake install5. Configure PHP SupportEditing a configuration fileAdd the Redis extension on the last line, and then save it. Added: extension= "redis.so"6. Restart the serviceRe-launch ApacheInstructions to install successfully!Redis Restart ScriptThe red circle is circled by the absolute path of the
is interrupted if the key is changed by another command before the transaction is executed. The Redis Script Command command describes the Redis Eval command to execute the Lua script. The Redis Evalsha command executes the Lua script. Redis ScThe Ript Exists command to see if the specified script has been saved in th
(facility), which must be between USER or LOCAL0 and LOCAL7 syslog-facility local0 # number of available databases, the default value is 16. The default database is stored in Database ID 0 with no special requirements, we recommend that you set only one database databases 1 # query the database using SELECT
Redis configuration-Snapshot
# Save the database to the disk: # save
Redis configuration-synchroni
The following is a description from the great God, the personal feel very clear, the collection.Why cluster?In general, in order to improve the responsiveness of the website, the hotspot data is always kept in memory instead of being read directly from the backend database. Redis is a good cache tool. Large web site applications, the amount of hot data is often huge, dozens of g hundreds of G is very normal, in this case, how to properly structure
libc malloc. To force compiling against libc malloc, use:% make Malloc=libcto compile against Jemalloc on Mac OS X systems, use:% make Malloc=jemallocallocator (Assignment operator), this environment variable is useful if there is a malloc environment variableTo build a redis. And libc is not the default allocator, the default is jemalloc! Because Jemalloc is proven to have fewer fragmentation problems than libc. But if you don't have a jemalloc and
following begins the installation of Redis on Linux.installing Redis under LinuxDownload the Redis installation package: http://redis.io/[[Email protected] ftpuser]# tar zxvf redis-3.2.0.tar.gz[[email protected] ftpuser]# CD Redis-3.2.0[[email protected] Red is-3.2.0]# Make
configuration files to 6379 ~ 6384 under the Directory
Cp/usr/local/redis-cluster/redis. conf/usr/local/redis-cluster/6379
# Note: 6379 ~ must be modified after the copy is completed ~ In the redis. conf file under the 6384 directory, change the port parameter to the corresponding folder name.
4: Start6ItemsRedis Inst
directory here, not a file name.DIR/var/lib/redis[Root @ localhost redis-stable] # mkdir-P/var/log/redis
# Specify the log file name. Also 'stdout' can be used to force# Redis to log on the standard output. Note that if you use standard# Output for logging but daemonize, logs will be sent to/dev/nullLogfile/var/log/
configuration of TPN is not much, resulting in a view of Redis code. Redis configuration file Redis.config contains timeou this configuration item:
# Close the connection ' a client is idle for N seconds (0 to disable) Timeout 0
Checked all the configuration files on the 6 Redis of TPN and found no configuration for this option, but TPN deployed two versions of
X3320 2.5 Ghz.
The stackoverflow website uses Redis as the cache server.
Data is also written to the hard disk. Therefore, data is safe (except for sudden power outages, the restart service will be written to the dump. rdb file)
1. installation:
Tar zxvf redis-2.6.9.tar.gz
Cd redis-2.6.9
Make
Cd src make install
2.
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.