DEV Community

loading...
Cover image for "L" is for Linux

"L" is for Linux

caffiendkitten profile image DaNeil C ・5 min read

Now that we have some definitions out of the way it's time to build a server.
[❌]Linux
[❌]Apache
[❌]MySQL
[❌]PHP

As stated in the definitions for this series "L" represents Linux in LAMP software stack. LAMP (Linux, Apache, MySQL, PHP) is an open source software stack where each component contributes essential capabilities to an application. Though almost any OS, HTTP server, Database Manager, and data processing software could be used that suites your need the LAMP stack "has a classic layered architecture, with Linux at the lowest level followed by Apache, MySQL, and PHP. Although PHP is nominally at the top or presentation layer, the PHP component sits inside Apache." 5

Table Of Contents

Step 1: Picking out the Server's OS
Step 2: Setting up network access
Step 3: The Install
Step 4: Ping Test

Step 1: Picking out the Server's OS

Though there are a lot of options for the servers Operating System, I don't need any type of crazy set up and I don't want to spend any money. With this in mind that means that any Windows Server is out as it's about $100+; so I will stick with a Linux/Unix based OS.

Server OS Options

As far as free server OS options it depends a lot on your intended use.

After some research on the abilities of the server software, I decided on Ubuntu Server Edition because I need something that is widely used in production environments. Now it's time to work on installing it onto an old computer I have hanging out in my office.

{Back to the Table Of Contents}

Step 2: Setting up network access

For server OS installs there might be an extra step here, depending on your current setup, as servers don't like to use WIFI as their main connection.

Why you ask? This is because the vast majority of NICs (Network Interface Cards) that are in computers are almost all the same, or there is very little variation, so it's easier to have the drivers already as part of the server OS at install. In contrast, basically every WIFI adapter out there is different and it would be next to pointless for an OS to come with drivers for some 200 WIFI adapters when they could have maybe 10 NIC drivers.

For my setup, this means that I need a switch to split the ethernet connection coming into my office. This is easy enough as its a plug-and-play style device and just needs to be plugged in. I take my incoming ethernet cord and plug it into slot #1 and then add another ethernet cord into slot #2 for my server computer and one more into slot #3 (respectively) for my client computer.

{Back to the Table Of Contents}

Step 3: The Install

Thanks to the "Install Ubuntu Server" turotial all the steps are broken down nicely so I wont go into much detail here. Just follow the tutorial and it explains what you might need to do really well. For my, I did notice that some steps didn't quite look the same but it worked out just fine.

To follow the tutorial steps as best as able for my system and a basic configuration I did:

  1. Downloading the ISO file in the Manual install
  2. Burning it to a USB or CD (I used BalenaEtcher to burn the ISO to a USB)
  3. Install it on the desired computer following the tutorial steps.
  4. https://paginas.fe.up.pt/~acbrito/laudon/ch8/chpt8-3main.htm
  5. https://www.computerhope.com/jargon/s/server.htm
  6. https://en.wikipedia.org/wiki/Server_(computing)

install complete
Note: This server will be "headless" meaning that it will not have any type of Graphical User Interface. This is an option but I will be doing this all in the server's terminal.

{Back to the Table Of Contents}

Step 4: Ping Test

Now that the server is installed it's good to make sure that it's all working and you can interact with it from your client.

  • You can ensure it has Internet connectivity in general by running ping 8.8.8.8 (Googles DNS) or it might be evident during setup if it is connected and working as the Ubuntu Server OS I installed said it needed some updates from version 20.04 to 20.09 during the install. Alt Text
  • Next you might want to install the Ubuntu net-tools with apt install net-tools on the server computer to allow the ifconfig command to see your servers IP address.
  • Now run the "ping" command from you client computer with the IP address of your server computer to confirm that your client can see your server.
  • Next it's good to ping the server computer from your client. Being that my client is a Windows PC I ran ipconfig in my Windows terminal to find its I address and then ran "ping" from my server computer to my client and vice versa.
    • Note: you might need to restart your server and client at this point to refresh its cache. I tried refreshing the caches manually but restarting fixed an issue that wouldn't let my client PC ping my server.

{Back to the Table Of Contents}



Success! The Linux OS install is done and it's on to Apache.

[⭕]Linux
[❌]Apache
[❌]MySQL
[❌]PHP


Happy Hacking
Happy Hacking ^_^

Resources:

1. https://www.smarthomebeginner.com/best-home-server-software-os/
2. https://www.technorms.com/77526/home-server
3. https://ubuntu.com/tutorials/install-ubuntu-server#1-overview
4. http://net-tools.sourceforge.net/
5. https://www.ibm.com/cloud/learn/lamp-stack-explained

Please Note: that I am still learning and if something that I have stated is incorrect please let me know. I would love to learn more about what I may not understand fully.

Discussion (0)

pic
Editor guide