In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
# chkconfig: 2345 90 10
# description: Redis is a persistent key-value database
PATH=$PATH:/usr/local/redis/bin:/sbin:/usr/bin:/bin
REDISPORT=6379
EXEC=/usr/local/redis/bin/redis-server
REDIS_CLI=/usr/local/redis/bin/redis-cli
PASS=chbin123
PIDFILE=/var/run/redis_6379.pid
CONF= "/ usr/local/redis/etc/redis.conf"
Case "$1" in
Start)
If [- f $PIDFILE]
Then
Echo "$PIDFILE exists, process is already running or crashed"
Else
Echo "Starting Redis server..."
$EXEC $CONF
Fi
If ["$?" = "0"]
Then
Echo "Redis is running..."
Fi
Stop)
If [!-f $PIDFILE]
Then
Echo "$PIDFILE does not exist, process is not running"
Else
PID=$ (cat $PIDFILE)
Echo "Stopping..."
$REDIS_CLI-a $PASS-p $REDISPORT SHUTDOWN
While [- x ${PIDFILE}]
Do
Echo "Waiting for Redis to shutdown..."
Sleep 1
Done
Echo "Redis stopped"
Fi
Restart | force-reload)
${0} stop
${0} start
*)
Echo "Usage: / etc/init.d/redis {start | stop | restart | force-reload}" > & 2
Exit 1
Esac
-
Add redis service boot startup:
Chmod + x / etc/init.d/redis
Start the redis service:
Service redis start
Check whether the service is started
Ps-ef | grep redis
Netstat-anptu | grep 6379
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.