0%

mac取消redis开机自启

2018年3月9日 上午10:07

参考文章:

Linux kill和kill-9区别
linux命令ps aux|grep xxx详解 - 人生设计师 - 博客园
每天一个linux命令(35):ln 命令 - peida - 博客园

关闭我已经自启的redis

mac下redis安装、设置、启动停止 - 漫夭 - 博客园

1
2
ps axu|grep redis  ## 查找redis-server的PID
kill -9 PID
1
2
3
4
5
6
7
8
9
10
11
## 启动redis-server,后台线程
AT8775:redis shoren$ redis-server /usr/local/redis/etc/redis.conf
## 启动成功
AT8775:redis shoren$ ps axu|grep redis
shoren 14948 0.0 0.0 2434840 760 s000 S+ 10:18上午 0:00.00 grep redis
shoren 14946 0.0 0.0 2452968 1492 ?? Ss 10:18上午 0:00.01 redis-server *:6379
## 关闭服务器
AT8775:redis shoren$ redis-cli shutdown
##关闭成功
AT8775:redis shoren$ ps axu|grep redis
shoren 14952 0.0 0.0 2435864 772 s000 S+ 10:19上午 0:00.01 grep redis

取消redis的开机自启

Mac 取消软件开机启动_百度经验
我先前通过brew安装了一个redis:Redis安装,并且我设置成了开机自启,所以我必须把开机自启关闭:

1
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.redis.plist