为什么redis客户端不响应命令?

时间:2018-06-03 10:55:59

标签: redis

有人可以说发生了什么错误,我该怎么办?

我在Ubuntu中通过instruction安装redis。我运行from tkinter import * class ScrolledFrame(Frame): def __init__(self, top, *args, **kwargs): Frame.__init__(self, top, *args, **kwargs) hscrollbar = Scrollbar(self, orient=HORIZONTAL) hscrollbar.grid(row=1, column=0, sticky=E+W) vscrollbar = Scrollbar(self, orient=VERTICAL) vscrollbar.grid(row=0, column=1, sticky=N+S) self.canvas = Canvas(self, xscrollcommand=hscrollbar.set, yscrollcommand=vscrollbar.set) self.canvas.grid(row=0, column=0, sticky=N+S+E+W) hscrollbar.config(command = self.canvas.xview) vscrollbar.config(command = self.canvas.yview) # Make the canvas expandable self.grid_rowconfigure(0, weight=1) self.grid_columnconfigure(0, weight=1) # Create the canvas contents self.frame = Frame(self.canvas) self.frame.rowconfigure(1, weight=1) self.frame.columnconfigure(1, weight=1) self.canvas.create_window(0, 0, window=self.frame, anchor=N+W) self.canvas.config(scrollregion=self.canvas.bbox('all')) self.frame.bind('<Configure>', self.frame_changed) def frame_changed(self, event): self.frame.update_idletasks() self.canvas.config(scrollregion=self.canvas.bbox('all')) root = Tk() frame = ScrolledFrame(root) frame.grid(row=0, column=0, sticky=N+E+W+S) root.rowconfigure(0, weight=1) root.columnconfigure(0, weight=1) for i in range(20): button = Button(frame.frame, text='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx %d' % i) button.pack(fill=BOTH, side=TOP, expand=True) root.mainloop() 并向我显示下一个屏幕。

enter image description here

之后我运行redis-server并尝试运行redis-cli命令,但没有任何反应。没有错误,没有消息。什么错了?

1 个答案:

答案 0 :(得分:0)

按照here中所述的说明解决了我的问题。必须从redis的utils目录中运行以下命令

sudo ./install_server.sh

启动和停止服务

sudo service redis_6379 start
sudo service redis_6379 stop