새소식

Redis

Redis 6 Download & Install

  • -
반응형

 

redis tar download

wget https://download.redis.io/releases/redis-6.2.7.tar.gz

 

Install

[root@lee redis-6.2.7]# tar -zxvf  redis-6.2.7.tar.gz
[root@lee redis-6.2.7]# cd redis-6.2.7/
[root@lee redis-6.2.7]# make && make install

[root@lee redis-6.2.7]# /usr/local/bin/redis-cli --version
redis-cli 6.2.7

 

 

Create Redis Directory & configuration File Copy

[root@lee redis-6.2.7]# mkdir -p /data/redis/
[root@lee redis-6.2.7]# mkdir -p /log/redis/
[root@lee redis-6.2.7]# mkdir -p /etc/redis/

[root@lee redis-6.2.7]# cp /root/redis-6.2.7/redis.conf /etc/redis/redis.conf

 

 

Modify Configuration & sysctl file

##Network
bind 0.0.0.0
port 6379

##daemon
daemonize yes
pidfile /var/run/redis.pid

##File
dir /data/redis
logfile "/log/redis/redis-6381.log"

## Cache to Disk File
save 900 1
save 300 100
save 60 10000
stop-writes-onbgsave-error no
dbfilename dump.rdb

## memory Configuration
maxmemory 1G
maxmemory-policy allkeys-lru

echo "net.core.somaxconn = 65536" >> /etc/sysctl.conf
echo "echo never > /sys/kernel/mm/transparent_hugepage/enabled" >> /etc/rc.local
echo "vm.overcommit_memory = 1" >> /etc/sysctl.conf

 

Redis Start

/usr/local/bin/redis-server /etc/redis/redis.conf

 

 

Redis Info Command

127.0.0.1:6379> info
# Server
redis_version:6.2.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:1850424bbf18e220
redis_mode:standalone
os:Linux 3.10.0-1127.19.1.el7.x86_64 x86_64
arch_bits:64
monotonic_clock:POSIX clock_gettime
multiplexing_api:epoll
atomicvar_api:atomic-builtin
gcc_version:4.8.5
process_id:6531
process_supervised:no
run_id:15650b39206ffc276ba4a5162eb093785c072533
tcp_port:6379
server_time_usec:1702896798374706
uptime_in_seconds:9
uptime_in_days:0
hz:10
configured_hz:10
lru_clock:8397982
executable:/root/redis-6.2.7/redis-server
config_file:/etc/redis/redis.conf
io_threads_active:0

# Clients
connected_clients:1
cluster_connections:0
maxclients:10000
client_recent_max_input_buffer:16
client_recent_max_output_buffer:0
blocked_clients:0
tracking_clients:0
clients_in_timeout_table:0

# Memory
used_memory:875608
used_memory_human:855.09K
used_memory_rss:10108928
used_memory_rss_human:9.64M
used_memory_peak:933736
used_memory_peak_human:911.85K
used_memory_peak_perc:93.77%
used_memory_overhead:832376
used_memory_startup:811880
used_memory_dataset:43232
used_memory_dataset_perc:67.84%
allocator_allocated:1036216
allocator_active:1363968
allocator_resident:4038656
total_system_memory:3945775104
total_system_memory_human:3.67G
used_memory_lua:32768
used_memory_lua_human:32.00K
used_memory_scripts:0
used_memory_scripts_human:0B
number_of_cached_scripts:0
maxmemory:1000000000
maxmemory_human:953.67M
maxmemory_policy:allkeys-lru
allocator_frag_ratio:1.32
allocator_frag_bytes:327752
allocator_rss_ratio:2.96
allocator_rss_bytes:2674688
rss_overhead_ratio:2.50
rss_overhead_bytes:6070272
mem_fragmentation_ratio:12.14
mem_fragmentation_bytes:9276088
mem_not_counted_for_evict:0
mem_replication_backlog:0
mem_clients_slaves:0
mem_clients_normal:20496
mem_aof_buffer:0
mem_allocator:jemalloc-5.1.0
active_defrag_running:0
lazyfree_pending_objects:0
lazyfreed_objects:0

# Persistence
loading:0
current_cow_size:0
current_cow_size_age:0
current_fork_perc:0.00
current_save_keys_processed:0
current_save_keys_total:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1702896789
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
rdb_last_cow_size:0
aof_enabled:0
aof_rewrite_in_progress:0
aof_rewrite_scheduled:0
aof_last_rewrite_time_sec:-1
aof_current_rewrite_time_sec:-1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok
aof_last_cow_size:0
module_fork_in_progress:0
module_fork_last_cow_size:0

# Stats
total_connections_received:1
total_commands_processed:1
instantaneous_ops_per_sec:0
total_net_input_bytes:31
total_net_output_bytes:20324
instantaneous_input_kbps:0.01
instantaneous_output_kbps:12.28
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
expired_stale_perc:0.00
expired_time_cap_reached_count:0
expire_cycle_cpu_milliseconds:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
total_forks:0
migrate_cached_sockets:0
slave_expires_tracked_keys:0
active_defrag_hits:0
active_defrag_misses:0
active_defrag_key_hits:0
active_defrag_key_misses:0
tracking_total_keys:0
tracking_total_items:0
tracking_total_prefixes:0
unexpected_error_replies:0
total_error_replies:0
dump_payload_sanitizations:0
total_reads_processed:2
total_writes_processed:1
io_threaded_reads_processed:0
io_threaded_writes_processed:0

# Replication
role:master
connected_slaves:0
master_failover_state:no-failover
master_replid:66fa21792cd58d1f7dcd9ea199d95339977ec36f
master_replid2:0000000000000000000000000000000000000000
master_repl_offset:0
second_repl_offset:-1
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0

# CPU
used_cpu_sys:0.005291
used_cpu_user:0.008008
used_cpu_sys_children:0.000000
used_cpu_user_children:0.000000
used_cpu_sys_main_thread:0.002160
used_cpu_user_main_thread:0.010804

# Modules

# Errorstats

# Cluster
cluster_enabled:0

# Keyspace
반응형

'Redis' 카테고리의 다른 글

Redis Migration  (1) 2023.12.08
Redis - Maxmemory  (0) 2022.02.22
[Redis] Redis Cache Server 만들기!  (0) 2021.10.05
[Redis] Redis 설치  (1) 2021.09.30
Contents

포스팅 주소를 복사했습니다

이 글이 도움이 되었다면 공감 부탁드립니다.