Home  >  Q&A  >  body text

在linux上安装nginx是不是会创建名为nginx或nobody的用户和用户组?

在linux上安装nginx是不是会创建名为nginx或nobody的用户和用户组?
我好像在哪里看到过一眼,在/etc/passwd 里面没有,但我好像又记得有这回事,记不清了,或者记错了,所以请帮确认一下。

大家讲道理大家讲道理2741 days ago689

reply all(3)I'll reply

  • 大家讲道理

    大家讲道理2017-04-17 15:03:55

    You should manually create the nginx owner and nginx owner group.

    groupadd nginx
    useradd nginx -g nginx -s /sbin/nologin -M

    When compiling, specify the execution user master and user group

    --with-user=nginx 
    --with-group=nginx

    After nginx is compiled and installed, modify nginx.conf

    user nginx nginx;

    reply
    0
  • PHPz

    PHPz2017-04-17 15:03:55

    I can’t be reasonable

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 15:03:55

    Yum installation uses the nobody user and group by default

    reply
    0
  • Cancelreply