Skip to content

Instantly share code, notes, and snippets.

@hiendnguyen
Last active March 11, 2017 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hiendnguyen/663d37cd7eb8a25c217a1eb29dd14c41 to your computer and use it in GitHub Desktop.
Save hiendnguyen/663d37cd7eb8a25c217a1eb29dd14c41 to your computer and use it in GitHub Desktop.
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