1 of 15

Intro to Servers

How can we make computers serve us?

acmcsuf.com/intro-server-slides-sp24#1

2 of 15

The Basics

acmcsuf.com/intro-server-slides-sp24#2

3 of 15

What is a server?

A server is a computer that performs a service for one or more users.

This can be a web/remote server, which serves content across the Internet, to local servers providing various services.

Anything that serves a purpose - even just running computations - can be a server.

acmcsuf.com/intro-server-slides-sp24#3

4 of 15

What do servers look like?

Servers can be anything! Most servers are long towers of computational equipment, but anything can be turned into a server.

Many “homelabs” - collections of servers running inside someone’s home - are made of old desktops strung together to provide services.

Laptops can even be turned into servers; some laptops, like Frameworks, are intentionally designed to be “recycled” into small servers.

You can even (with a lot of effort) make your phone into a server!

acmcsuf.com/intro-server-slides-sp24#4

5 of 15

How do I interact with a server?

While some servers have displays and are connected to monitors, most are “headless” - meaning they don’t have any form of display attached to them!

This makes it easier to deploy servers at scale, and minimizes the overhead of a full GUI.

Instead of using a GUI, servers are usually controlled by the command line - and often remotely! This used to be done with a protocol called Telnet, originally designed to work over telephone lines, but most server administration is now done with SSH.

acmcsuf.com/intro-server-slides-sp24#5

6 of 15

What can servers do?

Servers can do anything you want them to - their whole point is to serve you!

Websites are all “served” from a server, which uses code called a web server to deliver web content over the internet.

When you access Google Drive or OneDrive, you’re utilizing a file server, which runs code to send you your files.

Notice what these all have in common: code. As long as you can code it - or someone has coded it for you before - you can run it on a server.

acmcsuf.com/intro-server-slides-sp24#6

7 of 15

Proxmox Demonstration

acmcsuf.com/intro-server-slides-sp24#7

8 of 15

Services and Systemd

acmcsuf.com/intro-server-slides-sp24#8

9 of 15

What is an “init” and what is Systemd?

Once the kernel (interacts with hardware) on a computer is loaded, it launches a program called the init (process ID 1) which is the first program on the system.

The init’s job is to load everything else for your operating system - services, GUIs, login handlers, etc. The init also assumes control of any processes who have “moved out” and are running on their own, called “daemons.”

Systemd is the most popular init software; while it isn’t used everywhere, and some don’t like it, the most popular Linux distributions for servers and personal devices alike all use it.

acmcsuf.com/intro-server-slides-sp24#9

10 of 15

What can systemd do for me?

Instead of making your own complex procedures for launching your services, with 100 different ways of managing all of them, Systemd can handle it all for you!

Using service files, systemd can read a list of what should happen with a service - when to launch it, how to launch it, etc. - and do it for you. You then can manage all the services directly through systemd instead of using 100 other platforms.

If you’re making a service for other people to use and deploy, you pretty much have to write it for systemd.

acmcsuf.com/intro-server-slides-sp24#10

11 of 15

Systemd Service Files

This is the service file for Apache, a commonly�used web server. You’ve almost certainly �interacted with Apache before if you’ve ever�used the Internet.

This file goes in the directory shown above.�To run Apache, you simply execute�systemctl start apache2�To stop it:�systemctl stop apache2�To have it automatically run on startup:�systemctl enable apache2

acmcsuf.com/intro-server-slides-sp24#11

12 of 15

Other uses of systemd

Systemd can:

  • Handle your networking for you
  • Serve as your bootloader
  • Automatically run things at different intervals (timers)
  • Run things based on specific triggers (sockets)
  • Help you get hacked easier

acmcsuf.com/intro-server-slides-sp24#12

13 of 15

Even this presentation is using many servers to run.

All services come from servers.

If you want to deploy your applications, use the Internet, or even take your classes, you have to interact with servers.

acmcsuf.com/intro-server-slides-sp24#13

14 of 15

Questions?

acmcsuf.com/intro-server-slides-sp24#14

15 of 15

Thank you for attending!

Please ask questions in our #dev-chat Discord channel!

acmcsuf.com/intro-server-slides-sp24#15

❤️