我已经在我的 ubuntu 机器上安装了 Redis 和 Redis 服务器,但问题是它们都没有同时处于活动状态。
命令:root@muhammad-mohsin:/#systemctl status redis.service
安装使用:数字海洋
● redis.service - Redis In-Memory Data Store
Loaded: loaded (/etc/systemd/system/redis.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-02-21 22:53:42 PKT; 5s ago
Process: 12113 ExecStop=/usr/local/bin/redis-cli shutdown (code=exited, status=0/SUCCESS)
Main PID: 12115 (redis-server)
CGroup: /system.slice/redis.service
└─12115 /usr/local/bin/redis-server 127.0.0.1:6379
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: `-._ `-._`-.__.-'_.-' _.-'
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: `-._ `-.__.-' _.-'
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: `-._ _.-'
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: `-.__.-'
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: 12115:M 21 Feb 22:53:42.620 # WARNING: The TCP backlog setting of 511 cannot be enforced bec
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: 12115:M 21 Feb 22:53:42.620 # Server initialized
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: 12115:M 21 Feb 22:53:42.620 # WARNING overcommit_memory is set to 0! Background save may fai
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: 12115:M 21 Feb 22:53:42.620 # WARNING you have Transparent Huge Pages (THP) support enabled
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: 12115:M 21 Feb 22:53:42.620 * DB loaded from disk: 0.000 seconds
Feb 21 22:53:42 muhammad-mohsin redis-server[12115]: 12115:M 21 Feb 22:53:42.620 * Ready to accept connections
命令:root@muhammad-mohsin:/#systemctl status redis-server.service
安装使用:apt-get install redis-server
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/redis-server.service.d
└─redis.override.conf
Active: inactive (dead) (Result: exit-code) since Wed 2018-02-21 22:53:12 PKT; 1min 2s ago
Docs: http://redis.io/documentation,
man:redis-server(1)
Main PID: 16461 (code=exited, status=0/SUCCESS)
Feb 21 22:53:11 muhammad-mohsin systemd[1]: Failed to start Advanced key-value store.
Feb 21 22:53:11 muhammad-mohsin systemd[1]: redis-server.service: Unit entered failed state.
Feb 21 22:53:11 muhammad-mohsin systemd[1]: redis-server.service: Failed with result 'exit-code'.
Feb 21 22:53:12 muhammad-mohsin systemd[1]: redis-server.service: Service hold-off time over, scheduling restart.
Feb 21 22:53:12 muhammad-mohsin systemd[1]: Stopped Advanced key-value store.
Feb 21 22:53:12 muhammad-mohsin systemd[1]: redis-server.service: Start request repeated too quickly.
Feb 21 22:53:12 muhammad-mohsin systemd[1]: Failed to start Advanced key-value store.
如何使它们同时激活?
另外两者有什么区别吗?
另外,每次都需要在机器上安装什么?Redis 还是 Redis 服务器?
而且,为什么我无法使用 api:port 在浏览器中访问 Redis?
请也回答我这些问题。