当前位置:网站首页>Linux bash: redis-server: 未找到命令
Linux bash: redis-server: 未找到命令
2022-07-31 13:32:00 【小码助力助你前行】
项目场景:
当你在Linux中安装好了Redis,想启动时,输入redis-server命令,却没办法运行,报redis-server: 未找到命令。
问题描述
Linux安装好了Redis,运行时使用reids-server命令,Redis没有启动,返回了信息 redis-server: 未找到命令。
原因分析:
产生这个的原因是因为我们输入的命令系统都会去/usr/bin目录下寻找,如果这个目录下找不到命令,他就会提示未找到命令。
解决方案:
既然在bin目录中找不到该命令,我们把这个命令设置为全局命令不就可以使用了,定义全局命令不仅可以方便我们后期的操作,还可以简化命令的长度,方便记忆。
所以我们直接将redis-server命令设置为全局命令,找到我们安装redis路径下的redis-server命令将它定义为全局命令就可以用了。
ln -s /usr/local/redis/redis-6.2.6/src/redis-server /usr/bin/redis-server
当使用其他命令也报未找到该命令时,也可以使用这种方式,ln -s后面接命令路径,以上就是本篇文章的全部内容。
我是本篇小编LXL
遇到Bug需要帮助,
欢迎加wx:
xmzl1988
备注"csdn博客“
温馨提示此为有偿服务;
边栏推荐
猜你喜欢

365-day challenge LeetCode1000 questions - Day 044 Maximum element in the layer and level traversal

关于MySQL主从复制的数据同步延迟问题

ECCV 2022 | Robotic Interaction Perception and Object Manipulation

Solution for browser hijacking by hao360

Install the latest pytorch gpu version

IDEA can't find the Database solution

技能大赛dhcp服务训练题

深入浅出边缘云 | 4. 生命周期管理

pytorch gpu版本安装最新

使用CompletableFuture进行异步处理业务
随机推荐
MATLAB | 我也做了一套绘图配色可视化模板
LeetCode·每日一题·1161.最大层内元素和·层次遍历
聊聊 SAP 产品 UI 上的消息显示机制
ECCV 2022 | Robotic Interaction Perception and Object Manipulation
代码随想录笔记_哈希_454四数相加II
VU 非父子组件通信
ECCV2022:在Transformer上进行递归,不增参数,计算量还少!
The latest complete code: Incremental training using the word2vec pre-training model (two loading methods corresponding to two saving methods) applicable to various versions of gensim
Save and load numpy matrices and vectors, and use the saved vectors for similarity calculation
uniapp微信小程序引用标准版交易组件
Text similarity calculation (Chinese and English) detailed explanation of actual combat
Istio微服务治理网格的全方面可视化监控(微服务架构展示、资源监控、流量监控、链路监控)
技能大赛dhcp服务训练题
Shell脚本经典案例:文件的备份
[Niu Ke brush questions - SQL big factory interview questions] NO3. E-commerce scene (some east mall)
go使用makefile脚本编译应用
基于去噪自编码器的故障隔离与识别方法
网络协议及相关技术详解
golang中使用泛型
C#中+=的用法