In Part 3 of the tutorial we'll update and upgrade the Ubuntu installation, install apache2 and php.
It's recommended that you have read the previous steps of this course. You'll find the overview at the end of this blogpost.
4. Update and upgrade Ubuntu installation and install apache2
Update and Upgrade Ubuntu
Setting up the Hetzner Cloud Server installs an initial version of Ubuntu 20.04.
First you want to update the system by downloading the package lists from the repositories.
Log into your terminal and type:
sudo apt update
After updating you want to upgrade your installation by fetching known new versions of packages via apt. APT is short for Advanced Packaging Tool. It handles the installation of software on Ubuntu and other Linux distributions.
sudo apt upgrade
Answer Yes when prompted. Alternatively you can run sudo apt upgrade -y which will answer automatically.
Install Apache Web Server
Apache is an open source web server which enables your Ubuntu installation to serve content like a website on the internet via http.
sudo apt install apache2
Then call your server from the browser. Fill in your server IP. You’ll see the start page of apache server.
5. Install PHP
PHP is a scripting language for web development. Run on a web server it generates a response to http requests. Many Content Management Systems and Frameworks are using PHP. Besides the web server context PHP can also be used for many other programming tasks.
sudo apt install php7.4-cli
Answer Yes when prompted.
Check your PHP version:
The Course Syllable:
22.05.2021 – Part 1
- Introduction & reasoning
29.05.2021 – Part 2
- Create Hetzner Cloud Server
- Connect to Server
05.06.2021 – Part 3
- Update and upgrade Ubuntu installation and install apache2
- Install PHP
12.06.2021 – Part 4
- Establish ssh keys
- Add new sudo user
- Deactivate root user
- Make new sudo user owner of ssh service
19.06.2021 – Part 5
- Buy Domain and point it to Hetzner Server
- Create Virtual Host for domain
26.06.2021 – Part 6
- Get free Let's Encrypt SSL certificates
- Request certificate, active https and force SSL
03.07.2021 – Part 7
- Install Git on Remote Server
- Create CI/CD user and ssh keys for Gitlab on Remote Server
10.07.2021 – Part 8
- Create Gitlab Repository
- Establish ssh keys and configure CI/CD
17.07.2021 – Part 9
- Install MySQL
- Install phpMyAdmin
24.07.2021 – Part 10
- Summary of project development workflow
- I'll be back – The course update log
See you next week for more