Any wise words of wisdom for a fresh new admin? All pointers appreciated!
Set up a test server and trial the hell out of things before you go further.
To be totally honest, it is near impossible to hack a server. Like mentioned above, its usually exploits in the CMS you run. Any linux server with:
- Disable password login and replace with SSH key,
- Install fail2ban so you can jail nasties,
- Firewalld is simple and effective to keep all ports closed, other than those running software and secured as such. CSF is nicer if you want to do more,
- Bad bot blocker for NGINX setup: https://github.com/mitchellkrogza/nginx-ultimate-bad-bot-blocker
- Use cloudflare (You get enterprise DDOS protection, CDN and full crypto - FREE)
I don't use centminmod, and the reasons are various:
- Bloated installation of NGINX for what defeats the purpose of NGINX' simplicity,
- Its a personal project. If George fell over dead tomorrow, decided he'd had enough or otherwise that life throws at us all, CentminMod is dead in the water with him.
- Its an increased risk compared to more stable resources.
Someone dies, quits or otherwise at NGINX, PHP or MariaDB, so forth... everything keeps going forward with security and stability.
Running on a single server, you
DO NOT want memcached installed. Provides little to no benefit when benchmarked, and with SSD RAID nowadays, is more hinderance to the process. Absolutely essential
IF running a server stack though.
NGINX, PHP and MariaDB are the least of your troubles. Email is the headache. Setting up functional email to send and receive, you will spend more time trying to achieve this than anything else. A simple way around, a piece I wrote the other week:
https://centosnoob.com/email-web-server-iredmail-nginx-mariadb-10-x-php-7-x/144/
Always tweak just one thing, measure, look for faults and weird behaviour, then tweak further settings.
DO NOT copy and paste settings from the web that you first do not fully understand what they do or the impact of the setting on your server and users.
There is a lot of learning.
I run a cluster of servers for myself and clients that I setup from scratch using either Linode, DigitalOcean and for Australian installs, BinaryLane as they run a similar setup to Linode and DigitalOcean. Learn and understand the basics, understand everything you do.
Mine run:
- Centos 7 Latest Stable
- PHP 7.x Latest Stable
- MariaDB 10.x Latest Stable
- NGINX Latest Stable, Sometimes Mainline
- NGX_Pagespeed
- Fail2Ban
- FirewallD
- iRedMail for one master mail server that everything uses, postfix at each IF software needs to mail out.
LESS IS MORE. Goodluck.