1,gosu下载地址
3359 github.com/Tian on/gosu/releases/download/1.10/gosu-amd64
背景:
对于在root上执行的脚本,希望在执行中改变身份。 例如,希望在已经建立的用户上运行服务流程。 不使用su或sudo。 这些需要麻烦的构成,在缺少TTY的环境中经常出错。 建议使用gosu。 通过项目网站可以看到更多的信息。 https://github.com/tianon/gosu
2 .小实验
允许redis使用regis用户启动
安装redis
解压make make install就可以了
启动:
1 .默认开始
2、从gosu开始