redis 跟 memcached 一樣,是一套存儲在記憶體中的key-value nosql 資料庫
預設的port 是 tcp : 6379
常用在網站的cache, 目的在不用過於頻繁的直接讀寫資料庫
在 FreeBSD 上面安裝很簡單
# cd /usr/ports/databases/redis
# make install clean
===> CONFIGURATION NOTE:
To setup "redis" you need to edit the configuration file:
/usr/local/etc/redis.conf
To run redis from startup, add redis_enable="YES"
in your /etc/rc.conf.
===> SECURITY REPORT:
This port has installed the following files which may act as network
servers and may therefore pose a remote security risk to the system.
/usr/local/bin/redis-sentinel
/usr/local/bin/redis-cli
/usr/local/bin/redis-server
/usr/local/bin/redis-check-rdb
/usr/local/bin/redis-benchmark
This port has installed the following startup scripts which may cause
these network services to be started at boot time.
/usr/local/etc/rc.d/sentinel
/usr/local/etc/rc.d/redis
If there are vulnerabilities in these programs there may be a security
risk to the system. FreeBSD makes no guarantee about the security of
ports included in the Ports Collection. Please type 'make deinstall'
to deinstall the port if this is a concern.
For more information, and contact details about the security
status of this software, see the following webpage:
http://redis.io/
啟動 redis
# /usr/local/etc/rc.d/redis onestart
開機時自動啟用
# vi /etc/rc.conf
redis_enable="YES"
檢查是否正常啟動
# ps uax | grep redis
redis 18947 0.2 0.1 24244 4040 - Ss 3:51PM 0:00.01 redis-server: /usr/local/bin/redis-server 127.0.0.1:6379 (redis
root 18949 0.0 0.0 18832 2052 1 R+ 3:51PM 0:00.00 grep redis
# telnet 0 6379
Trying 0.0.0.0...
Connected to 0.
Escape character is '^]'.
info
$2120
# Server
redis_version:3.2.7
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:66485aa7a7c124f8
redis_mode:standalone
os:FreeBSD 10.3-RELEASE amd64
arch_bits:64
multiplexing_api:kqueue
gcc_version:4.2.1
process_id:18947
run_id:018b4976dccd8701fac6727da769ebc8df8b2c68
tcp_port:6379
uptime_in_seconds:17
uptime_in_days:0
hz:10
lru_clock:15227282
executable:/usr/local/bin/redis-server
config_file:/usr/local/etc/redis.conf
# Clients
connected_clients:1
client_longest_output_list:0
client_biggest_input_buf:0
blocked_clients:0
# Memory
used_memory:1084112
used_memory_human:1.03M
used_memory_rss:1050368
used_memory_rss_human:1.00M
used_memory_peak:1084112
used_memory_peak_human:1.03M
total_system_memory:34389189192
total_system_memory_human:32.03G
used_memory_lua:37888
used_memory_lua_human:37.00K
maxmemory:0
maxmemory_human:0B
maxmemory_policy:noeviction
mem_fragmentation_ratio:0.97
mem_allocator:libc
# Persistence
loading:0
rdb_changes_since_last_save:0
rdb_bgsave_in_progress:0
rdb_last_save_time:1508399489
rdb_last_bgsave_status:ok
rdb_last_bgsave_time_sec:-1
rdb_current_bgsave_time_sec:-1
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
# Stats
total_connections_received:1
total_commands_processed:0
instantaneous_ops_per_sec:0
total_net_input_bytes:6
total_net_output_bytes:0
instantaneous_input_kbps:0.00
instantaneous_output_kbps:0.00
rejected_connections:0
sync_full:0
sync_partial_ok:0
sync_partial_err:0
expired_keys:0
evicted_keys:0
keyspace_hits:0
keyspace_misses:0
pubsub_channels:0
pubsub_patterns:0
latest_fork_usec:0
migrate_cached_sockets:0
# Replication
role:master
connected_slaves:0
master_repl_offset:0
repl_backlog_active:0
repl_backlog_size:1048576
repl_backlog_first_byte_offset:0
repl_backlog_histlen:0
# CPU
used_cpu_sys:0.01
used_cpu_user:0.00
used_cpu_sys_children:0.00
used_cpu_user_children:0.00
# Cluster
cluster_enabled:0
# Keyspace
奠定大數據的基石:NoSQL資料庫技術(第2版)
作者: 皮雄軍
出版社:佳魁資訊
出版日期:2016/07/29
語言:繁體中文
定價:560元
留言列表