Linux serverNETWORK ADMINISTRATIONS

How to Setup and Secure Centos7 Server On Vultr VPS (Vultr Tutorial)

Learn how to setup and secure Centos 7 server on Vultr Cloud VPS. In this tutorial, I will teach everything related to the fundamental of server setup using Centos 7 and Vultr cloud computer such as:

1) Create and setting user privileges
2) Secure your vps using ssh and private keys file
3) Setup basic firewall for your Centos 7 server
4) Create Swap file on Centos
5) Take snapshot of your Vultr VPS

Enjoy the tutorial!…

RECOMMENDED READING:

RECOMMEND VIDEO TUTORIALS:

How to Setup and Secure your VPS on Ubuntu server
✅ https://www.youtube.com/watch?v=G9ljxktp1XE

Vultr Vs DigitalOcean (VPS review)
✅ https://www.youtube.com/watch?v=qShmxrjsODc

How to Install WordPress on Vultr VPS server
✅ https://www.youtube.com/watch?v=JcKjMjTVuc8

HOSTING COUPONS AND FREE CREDITS

Get $50 Free Credit from Vultr Cloud VPS: http://bit.ly/2SQOQx3

Get up to %51 discount from A2 Hosting: http://bit.ly/2LKjb25

Get 60% Discount from SiteGround Hosting: http://bit.ly/2VDpCbF

Get up 50% Discount from Bluehost Hosting: http://bit.ly/2Jh3ihm

Get up to 60% discount from Hostgator Hosting: http://bit.ly/2E9gRLD

THEMES AND PLUGINS

Kleo Multi Purpose Theme http://bit.ly/30kvl4W

Easy Social Share Button Plugin for WordPress http://bit.ly/2JnJXv8

⚠️COMMANDS USED IN THE TUTORIALS

=====================================
1 Setup user privileges
=====================================

adduser kimseasok

passwd kimseasok

usermod -aG wheel kimseasok

=====================================
2 Generate & Embed SSH Keys
=====================================
mkdir .ssh
chmod .ssh 700

vi .ssh/authorized_keys

chmod 600 .ssh/authorized_keys

sudo vi /etc/ssh/sshd_config

PermitRootLogin no

PasswordAuthentication no

sudo systemctl reload sshd

=====================================
3 Firewall
=====================================

sudo systemctl start firewalld

sudo firewall-cmd –permanent –add-service=ssh

sudo firewall-cmd –permanent –add-service=http

sudo firewall-cmd –permanent –add-service=https

sudo firewall-cmd –permanent –add-service=mysql

sudo firewall-cmd –permanent –add-service=https

sudo firewall-cmd –permanent –add-port=4444/tcp (use port instead of service name)

sudo firewall-cmd –get-services

sudo firewall-cmd –reload

sudo systemctl enable firewalld

=====================================
4 Swap File
=====================================

sudo fallocate -l 8G /swapfile

sudo chmod 600 /swapfile

sudo mkswap /swapfile

sudo swapon /swapfile

sudo sh -c ‘echo “/swapfile none swap sw 0 0” ⚠️DOUBLE CLOSING ANGLE BRACKETS /etc/fstab’

source

centos 7

Leave a Reply

Your email address will not be published. Required fields are marked *