mac方法,我用homebrew安装的redis,执行命令会当前/开机启动 brew services start redis centos方法 systemctl start redis.service mysql,nginx都是同理的