宝塔面板无法启动redis
宝塔内软件商店里,安装了redis后,一直无法启动。可以手动使用命令启动:
方式一:前台启动(不推荐),窗口关闭,服务即停。
1先进入到安装redis的目录下
cd /www/server/redis/src
2启动redis-server服务
./redis-server
如图:
手动启动redis成功,去软件商店查看redis服务状态
redis服务状态已显示启动。
但是关闭命令窗口后,依然显示暂停;
方式二:后台启动
Last failed login: Sun Apr 23 20:53:20 CST 2023 from 195.226.194.242 on ssh:notty
There were 2 failed login attempts since the last successful login.
Last login: Sun Apr 23 20:34:01 2023 from 127.0.0.1
[root@ecs1 ~]# find / -name "redis.conf" --找到redis.config的路径
/www/server/redis/redis.conf
[root@ecs1 ~]# cd ^C
[root@ecs1 ~]# cd /www/server/redis --进入到redis的安装路径
[root@ecs1 redis]# ls
00-RELEASENOTES CONTRIBUTING.md INSTALL README.md runtest-cluster SECURITY.md start.pl utils
BUGS COPYING Makefile redis.conf runtest-moduleapi sentinel.conf tests version_check.pl
CODE_OF_CONDUCT.md deps MANIFESTO runtest runtest-sentinel src TLS.md version.pl
[root@ecs1 redis]# cp redis.conf /etc/redis.conf ----将redis.conf文件复制一份到/etc文件夹中
[root@ecs1 redis]# cd ets
-bash: cd: ets: No such file or directory
[root@ecs1 redis]# sd etc
-bash: sd: command not found
[root@ecs1 redis]# cd etc
-bash: cd: etc: No such file or directory
[root@ecs1 redis]# cd /etc ---进入到etc文件夹
[root@ecs1 etc]# ls
adjtime default gshadow logrotate.conf pki rpc sudoers
aliases depmod.d gshadow- logrotate.d plymouth rpm sudoers.d
aliases.db dhcp gss machine-id pm rsyncd.conf sudo-ldap.conf
alternatives DIR_COLORS host.conf magic polkit-1 rsyslog.conf sysconfig
anacrontab DIR_COLORS.256color hostname makedumpfile.conf.sample popt.d rsyslog.d sysctl.conf
asound.conf DIR_COLORS.lightbgcolor hosts man_db.conf postfix rwtab sysctl.d
audisp dracut.conf hosts.allow mke2fs.conf ppp rwtab.d systemd
audit dracut.conf.d hosts.deny modprobe.d prelink.conf.d sasl2 system-release
bash_completion.d e2fsck.conf init.d modules-load.d printcap scl system-release-cpe
bashrc egl inittab motd profile securetty telegraf
binfmt.d environment inputrc mtab profile.d security terminfo
bt_lib.lock ethertypes iproute2 my.cnf protocols selinux tmpfiles.d
centos-release exports issue my.cnf.bak python services tuned
centos-release-upstream favicon.png issue.net my.cnf.d qemu-ga sestatus.conf udev
chkconfig.d filesystems kdump.conf NetworkManager rc0.d shadow vconsole.conf
cloud firewalld kernel networks rc1.d shadow- virc
cron.d fonts krb5.conf nsswitch.conf rc2.d shells wgetrc
cron.daily fstab krb5.conf.d nsswitch.conf.bak rc3.d skel wpa_supplicant
cron.deny gcrypt ld.so.cache ntp rc4.d ssh X11
cron.hourly glvnd ld.so.conf ntp.conf rc5.d ssl xdg
cron.monthly gnupg ld.so.conf.d openldap rc6.d statetab xinetd.d
crontab GREP_COLORS libaudit.conf opt rc.d statetab.d yum
cron.weekly groff libnl os-release rc.local subgid yum.conf
crypttab group libuser.conf pam.d redhat-release subgid- yum.repos.d
csh.cshrc group- locale.conf passwd redis.conf subuid
csh.login grub2.cfg localtime passwd- resolv.conf subuid-
dbus-1 grub.d login.defs pkcs11 resolv.conf.save sudo.conf
[root@ecs1 etc]# cd /usr/local/bin --进入到/usr/local/bin文件夹中
[root@ecs1 bin]# ls
jemalloc-config jeprof luajit mcrypt rar redis-check-aof redis-cli redis-server
jemalloc.sh libmcrypt-config luajit-2.0.4 mdecrypt redis-benchmark redis-check-rdb redis-sentinel unrar
[root@ecs1 bin]# redis-server /etc/redis.conf --启动redis
[root@ecs1 bin]# ps -ef|grep redis --查看redis进程
root 13233 1 0 21:01 ? 00:00:00 redis-server 127.0.0.1:6379
root 13320 12844 0 21:03 pts/0 00:00:00 grep --color=auto redis
[root@ecs1 bin]# redis-cli
127.0.0.1:6379>
本文原创,转载必追究版权。