Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
CentOS 7 Basic Setup
# Keep your OS up to date
yum update -y
# Install basic CentOS packages
yum install wget curl unzip gcc-c++ pcre-devel zlib-devel
# Never use ROOT user, just create another user with ROOT privileges
adduser www-user
passwd www-user
gpasswd -a www-user wheel
# Disable ROOT access
vi /etc/ssh/sshd_config
PermitRootLogin no
# Save it and issue below command to reload sshd
systemctl reload sshd
# KEEP current terminal open. Open another one and try to access server with new account (www-user). If you can login server with new account, then now it's safe to quite ROOT's session.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment