Tonight is just a quick one, not my usual essay. I was just curious to see what other people though. Being a PHP Developer I primarily work within LAMP environments. Occasionally having swapped out Apache for Nginx, but I am by far a specialist.
Until recently I was able to jump around through the Linux command line and do whatever I needed to without much issue, but nothing heavy.
I decided, as I often do, that I wanted to expand my skill set and start looking at pure OS, doing everything from scratch, how hard could it be, right? Previously I had used control panels like cPanel and Plesk to make management easy, as I’ve been offloading mail management to the likes of Office 365 and Google Suite, because they’re awesome at it and provide drive solutions, I figured there wasn’t that much really left for my server to manage.
So I put on my big boy pants and launched a Droplet with Digital Ocean and got learning how to set up and manage my own LAMP stack environments. I’ve spent a bit of time learning a few bits, and realised a few things, which I thought I would share. I’m by no means an expert, but these are just some soundbites I’ve picked up
- Setting up LAMP stack isn’t difficult
- Neither is setting up SFTP and Mail (though I’m dubious on mail and will leave it to the pros!)
- Neither is setting up SSL (seriously, look up LetsEncrypt!)
- Control panels are heavy!
- You really don’t need much on your server to do basic website stuff
- If you keep it lean, tiny servers can do amazing things
If you’re a developer, and have never tried to build and manage your own servers, seriously give it a go.
On a side note, some other useful tips and guides – please take heed – this isn’t new knowledge to me by any means, but thought it might be useful if you stumble across this article.
- Disable root login access!
- Chroot your FTP users
- Only install what you NEED. If you’re not doing anything with SFTP (because you’re only using git, for example), don’t install it
- Research what you’re installing, only install it if you need it and trust it
- If this is the first time you’ve tried to manage your own DNS, most panels create aa bunch of stuff for you; at the very least you need to create a CNAME record for ‘www’ and point it to ‘@’ (so that www.website.com also works as well as just website.com)
I think that’s everything for now. If I think of anything else I’ll pop it in a little soundbite.
Oh, just for reference. I started with Ubuntu 16.04 (Xenial)
While this is a good start and I’m very proud to see a developer learning about systems, developers are best at developing. Something like Docker and Docker Compose can really work wonders for you and speed up your movement through stages.
I agree, though as I’ve gone more into server side development I’ve had necessity to get better with managing servers. I’m far further along now than I was when I initially wrote this. Admittedly I now wonder why I ever used control panels etc to do relatively simple tasks.
I’m actually just about to embark upon learning nginx as I’ve read into the benefits of this on page loads etc.