0

I have installed apache from the source with:prefix=/usr sysconfdir=/etc/httpd/ localstatedir=/var.

useradd -g apache -d /usr/apache -s /sbin/nologin apache
  • When installing things from source, generally you should use a prefix of /usr/local, to keep things separate from software provided by your OS. – jordanm Jan 13 '13 at 6:33
  • Yes, I know. This is a test, I am learning how to make distribution packages. – fdisk Jan 13 '13 at 7:21
1

If you wonder about the home directory, it should not matter that much, because it will probably not change the behavior of apache at all.

On Debian, the default homedir for the user running apache is /var/www (which is the default DocumentRoot).

Also, if you're on a Debian-based distrib, you should prefer using adduser instead of useradd which is quite low level.

  • I am pretty sure adduser is a symlink to useradd in RHEL. The upstream for adduser in Debian, is actually Debian, so I would consider it Debian-specific. – jordanm Jan 13 '13 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.