Last active
March 11, 2017 08:43
-
-
Save hiendnguyen/663d37cd7eb8a25c217a1eb29dd14c41 to your computer and use it in GitHub Desktop.
CentOS 7 Basic Setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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