Home> Topics> Pagoda Panel> body text

What should I do if the server Pagoda Panel Redis cannot be started with the system?

藏色散人
Release: 2021-03-11 11:47:36
forward
3468 people have browsed it

下面由宝塔面板教程栏目给大家介绍服务器宝塔面板Redis无法随系统启动的解决办法,希望对需要的朋友有所帮助!

What should I do if the server Pagoda Panel Redis cannot be started with the system?

解决服务器宝塔面板Redis无法随系统启动

解决服务器Debian 9宝塔面版自带Redis重启后无法随系统自动启动。

补充安装

  • 宝塔面板的Redis安装路径在/www/server/redis
  • redis安装目录下src文件夹里的两个文件redis-serverredis-cli分别是redis的服务器和客户端。
  • 需要进入src目录,执行make install,这两个文件会被拷贝到/usr/local/bin目录,/usr/local/bin定义在系统的环境变量$PATH下,这样终端在任何路径都可以执行redis-serverredis-cli了。
  • 打开SSH
cd /www/server/redis/src make install
Copy after login
  • 打开/www/server/redis/utils/redis_init_script
#!/bin/sh # # Simple Redis init.d script conceived to work on Linux systems # as it does use of the /proc filesystem. ### BEGIN INIT INFO # Provides: redis_6379 # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Redis data structure server # Description: Redis data structure server. See https://redis.io ### END INIT INFO REDISPORT=6379 EXEC=/usr/local/bin/redis-server CLIEXEC=/usr/local/bin/redis-cli PIDFILE=/var/run/redis_${REDISPORT}.pid CONF="/etc/redis/${REDISPORT}.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 ;; stop) if [ ! -f $PIDFILE ] then echo "$PIDFILE does not exist, process is not running" else PID=$(cat $PIDFILE) echo "Stopping ..." $CLIEXEC -p $REDISPORT shutdown while [ -x /proc/${PID} ] do echo "Waiting for Redis to shutdown ..." sleep 1 done echo "Redis stopped" fi ;; *) echo "Please use start or stop as first argument" ;; esac
Copy after login
  • conf设定的路径是/etc/redis/,把redis安装目录下的redis.conf文件拷贝到/etc/redis/6379.conf
  • 在面板重启Redis

The above is the detailed content of What should I do if the server Pagoda Panel Redis cannot be started with the system?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!