您好,登錄后才能下訂單哦!
這篇文章給大家分享的是有關(guān)redis基本安裝判斷、啟動(dòng)使用方法示例的內(nèi)容。小編覺(jué)得挺實(shí)用的,因此分享給大家做個(gè)參考,一起跟隨小編過(guò)來(lái)看看吧。
redis基本安裝判斷、啟動(dòng)使用方法,具體如下:
1、Redis對(duì)否安裝(安裝好了會(huì)出現(xiàn)下面對(duì)應(yīng)的代碼)
[root]$ whereis redis-cli redis-cli: /usr/local/bin/redis-cli [root]$ [root]$ whereis redis-server redis-server: /usr/local/bin/redis-server
2、啟動(dòng)Redis
輸入代碼
redis-server & 30733:C 09 Dec 14:45:30.876 # Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf 30733:M 09 Dec 14:45:30.879 # You requested maxclients of 10000 requiring at least 10032 max file descriptors. 30733:M 09 Dec 14:45:30.879 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted. 30733:M 09 Dec 14:45:30.879 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'. [root]$ _._ _.-``__ ''-._ _.-`` `. `_. ''-._ Redis 3.2.0 (00000000/0) 64 bit .-`` .-```. ```\/ _.,_ ''-._ ( ' , .-` | `, ) Running in standalone mode |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379 | `-._ `._ / _.-' | PID: 30733 `-._ `-._ `-./ _.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | http://redis.io `-._ `-._`-.__.-'_.-' _.-' |`-._`-._ `-.__.-' _.-'_.-'| | `-._`-._ _.-'_.-' | `-._ `-._`-.__.-'_.-' _.-' `-._ `-.__.-' _.-' `-._ _.-' `-.__.-' 30733:M 09 Dec 14:45:30.900 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128. 30733:M 09 Dec 14:45:30.900 # Server started, Redis version 3.2.0 30733:M 09 Dec 14:45:30.901 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect. 30733:M 09 Dec 14:45:30.901 # WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled. 30733:M 09 Dec 14:45:30.902 * The server is now ready to accept connections on port 6379
3.判斷Redis是否啟動(dòng)
[root]# redis-cli -p 6379 127.0.0.1:6379> ping PONG 127.0.0.1:6379>
感謝各位的閱讀!關(guān)于“redis基本安裝判斷、啟動(dòng)使用方法示例”這篇文章就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,讓大家可以學(xué)到更多知識(shí),如果覺(jué)得文章不錯(cuò),可以把它分享出去讓更多的人看到吧!
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。