This assumes you are now connected to the server via SSH.
sudo -sEnter root mode for admin accessgroupadd devgroupCreate new group to be later granted access to /var/www/html
useradd -G root,devgroup masterdevCreate new root user. Also add to the devgrouppasswd masterdevChange password for the new root user- At this point, you'll need to input your new root user's new password
Next, we'll need to set PasswordAuthentication to On. By default, passwords cannot be used on SSH (Off), so you initially need to use the pem or ppk files. However, since we now have created our new root user, we can change this and set it to "On".
vi /etc/ssh/sshd_configEdit SSH config file- Make sure this is set:
PasswordAuthentication yes service sshd restart
vi /etc/sudoersEdit the sudoers file- Add masterdev user after the root's line
root ALL=(ALL) ALL
masterdev ALL=NOPASSWD: ALL
- Since the sudoer file is read-only, you may need to save your changes using
:wq!.
Thanks for this. It seems like in step 2 (b) for nginx, the proper 3rd command for "setup service" should be:
chkconfig nginx oninstead ofchkconfig httpd on