So you want to set up a LAMP (Linux Apache MySQL PHP) server for your data center and you want it now. Is it difficult? Is it time consuming? No, and no. In fact, I’m going to walk you through the steps of installing a Ubuntu Server. This process will take a whopping fifteen or so minutes of your day and, in the end, you will have a fully functioning LAMP server ready to meet and exceed your needs.
Before we start the installation, we have to have the installation media. Just for kicks, I’m going to install the latest iteration, 17.04. This, of course, isn’t a Long Term Support (LTS) release, so you’ll probably want to download the 16.04 version instead. Fortunately, the installation for both are exactly the same.
Download the version you want to install and then burn it onto a CD or DVD. If your server hardware doesn’t have an optical drive, you’ll need to create a bootable USB device for the purpose of installation. This can be done with a tool like Unetbootin.
Once you have your installation media created, insert it and boot up your server.
So there are quite a few steps in the installation of the server operating system, none of which are challenging or time consuming. The installation is completely NCURSES based, (think “text”) so when you’re asked to fill in an option, you type it and then tab down to Continue, Yes, or No, and hit Enter on your keyboard. I will gloss over a few of the options (as they are either repetitive or self-explanatory).
The first screen you’ll see (Figure A), asks you what language you want to use for the installation (not the server itself). Use your arrow keys to select the correct language and hit Enter on your keyboard.
In the next screen you’ll be asked to select what you want to do with the installer, run some tests, boot from the hard disk, or rescue a broken system. Using your arrow keys, select Install Ubuntu Server and hit the Enter key on your keyboard.
The next few screens are as follows:
- Select the language to be used on the server
- Select your location
- Detect keyboard layout (Yes/No)
- Select the country of origin for your keyboard
- Select the layout matching your keyboard
Once beyond these screens, the installer will load additional components (Figure B).
In the following screen (Figure C), you must set the hostname for the server. If the server will use a Fully Qualified Domain Name (FQDN), enter that. If the server is on a LAN-only network (or will be used for testing purposes), you can make up whatever need here.
In the next five screens, you must set up a user account. The options are:
- Enter the full name for your user account
- Enter a username for the account
- Enter a password for the user
- Verify the password for the user
- Encrypt the user’s home directory (Yes/No)
Now we configure the clock. The installer (for whatever reason) almost always defaults to America/New York. If that’s not your location, tab down until No is selected and hit Enter. You can then select your proper time zone.
We finally come to the disk partitioning. Unless you have any special needs, select Guided – use entire disk (Figure D), and hit Enter.
In the next screen you’ll select the disk to be partitioned. If you have more than one disk on the server, make sure to select the correct disk (chances are it will be labeled sda – Figure E) and hit Enter.
You will now be presented with the partition information and asked if you want to write changes to the disk. Tab down to Yes and hit Enter on your keyboard.
After the partitions have been written, you’ll be presented with the option to configure a proxy server. If you don’t need to use a proxy, leave this blank and tab down to Continue (Figure F).
Next the installation will ask how you want to handle updates. You have the following options to select from:
- No automatic updates
- Install security updates automatically
- Manage system with Landscape
I recommend selecting No automatic updates. If you go this route, know that you will have to manually run regular updates.
Finally, we get to select our software. Since we’re setting up a LAMP server, you’ll want to use the arrow keys to select LAMP server (Figure G) and then hit the Spacebar on your keyboard (to select the option). I would also suggest adding OpenSSH server, so you can remote into the machine for admin purposes.
During the LAMP installation, you will be prompted to set a MySQL root user password. Do that (and then verify the password) and then the installation may seem to stall out. Wait for it as it detects where to install the GRUB bootloader. You will then be presented with the options for GRUB. If you only have one disk in the server, you can just tab down to Yes and hit Enter. If you have more than one disk, you’ll want to make sure to select the correct disk (most likely it will be labeled sda).
And that’s it. You will now be prompted to hit Enter to reboot the server. You can then log in with the user account you created during the installation and start using your new LAMP server.
- Time required – approximately fifteen minutes.
- Difficulty level – as you can see…pretty low.
One of the easiest servers to install
You’d be hard-pressed to find a server installation as easy and quick as Ubuntu Server. Give this a go and see just how quickly you can have a full LAMP stack up and running.