Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2016-05-12 08:46:44
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Linux servers for dummies
I’m hoping to move into setting up and maintaining Linux LAMP servers at work (Ubuntu specifically). I have a little experience from experimenting with virtual machines and my Digital Ocean droplet; but I don’t know enough (I’m having a huge amount of fun figuring things out though).
Do any of you have any recommendations (YouTube videos, web links, books, etc.) that I can use to expand my knowledge. I’ve been trawling though the Ubuntu forums, Digital Ocean tutorials and random websites but I would quite like to find something that starts from scratch (e.g. somebody who hasn’t touched Linux before). Although I’m picking things up, I often don’t fully understand the commands I’m typing into the Terminal (or even what commands are available to me) and how the various configuration files I’m editing work, or even what the code I’m adding to the configuration files means.
Offline
Re: Linux servers for dummies
Over the last month or so of setting up my own droplet, my go-to reference (aside from the DigitalOcean tutorials, which are usually excellent) has been… Pete Cooper :-)
Seriously, he’s been an absolute star as I floundered around. He had a fledgling setup guide that led me from zero to fully-fledged server in well under an hour. That included upgrades, hardening things (setting up firewall rules), mail configuration, installing unattended installs and reboots, turning unnecessary services on and off, installing the LAMP stack, moving stuff around, and so forth.
Unfortunately, the guide he sent me really was a list of bullet points, short explanations and long commands, which I tweaked. I already knew a lot of command line stuff so it was mainly a very helpful refresher from someone who had done it more recently than I had. So if you don’t know the commands to begin with, it’s not going to help. I didn’t know them all, but I Googled those I didn’t recognise or needed to brush up on.
The key ones during setup are:
sudo apt-get update; sudo apt-get install <something>
to add packages to the systemsudo dpkg-reconfigure <something>
to tinker with settings for a package, like postfix mail.sudo ufw <rule>
to set firewall rules
Along with user management commands like useradd
, usermod
, and passwd
to set up a non-root user and add them to sudoers so they can run system commands via sudo
. Plus the permissions utilities chown
(change ownership), chgrp
(change group ownership only) and chmod
(change file permissions). And the usual suspects: ls
(list files), cd
(change directory), less
(read text files), nano
(or vi
for the hardcore!) to edit files.
Some handy resources:
- Command line introduction
- Beginner’s guide to the command line
- A Linux survival guide
- Setting up a LAMP stack
Some of those might be a bit too basic, but have helpful tips and commands anyway.
And the most useful tip not covered by those? Command searching in your command line history:
Edit the .inputrc
file in your home directory:
nano ~/.inputrc
Paste the following lines in and save, then exit nano:
"\e[A": history-search-backward
"\e[B": history-search-forward
"\e[C": forward-char
"\e[D": backward-char
When you next log in you can “search” your previous commands by typing a few letters of the command and hit up-arrow to cycle through the matches. Saves a tonne of typing/scrolling.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: Linux servers for dummies
My knowledge of Linux is evolving. The bullet point list that Stef mentioned was borne out of needing to build a secure server quickly and properly, and is a balance between the two. I started out with Linux some years ago and gradually learned what I needed to learn rather than everything. Books and videos were overwhelming to me, and as a pragmatist I found that learning by doing was much more effective.
Some recommendations:
- download VirtualBox
- download Ubuntu Server
- learn how to mount a disk image in VirtualBox
- install Ubuntu Server
- think of something you want to do with it (web server, mail server, git, database server, whatever you like)
- find out how to do that thing
- find out another way to do that same thing (maybe repeat this a few times)
- find out the differences between them
- make a note of what works best in
algaris linux infodump.txt
- go to 5.
That was how I got started. Learn some stuff, smash up and delete your VirtualBox image, then start over with the notes you’ve made. You’ll improve your confidence with each iteration, and that’ll bolster your knowledge.
I chose Ubuntu because it’s a Debian fork backed by a company who seem to know what they’re doing. Documentation is vast for it, too, as the number of people using it is high. I also have a stack of Raspberry Pi servers in the office for AMP stack builds, and they run on Raspbian – another Debian fork – so there’s a lot of commonality between them.
Google or your search engine weapon of choice is your friend for Linux stuff. That, and the man
command which shows you the documentation for a given commend. Note that man
shows stuff that the authors want to show you, whereas search engine results will give you a broader view of opinions.
Right now, I’m putting together a script to build a Textpattern inside LXD, a container system from Canonical. I know virtually nothing about LXD, but I’ve almost got my head around some of the things I need to do with it. Thats the key: I don’t need to know everything, a general gist and copious note taking is working for me, and when I know the basics I can figure out whether something is possible or not.
Offline
Re: Linux servers for dummies
One quick slightly-offtopic aside:
If you need to create a LAMP server quickly and you don’t care about the fine details, sometimes you can find a Wordpress image like this one for Digital Ocean or one of these for Vagrant or the official Docker image.
Probably not the best way to learn but not necessarily the worst way to get started if you are in a hurry.
Offline
Re: Linux servers for dummies
Sounds like you should look at Servers for Hackers. It’s an excellent guide to setting up and running your web server from scratch.
Offline
#6 2016-05-20 13:37:32
- Algaris
- Member
- From: England
- Registered: 2006-01-27
- Posts: 553
Re: Linux servers for dummies
Thank you everyone for your replies, they are very helpful. I’m busy digesting them and will reply back after further rumination.
Offline
Pages: 1