So I’m hoping this will be a noob friendly guide to setting up v5.11+ on Ubuntu 22.04.
As a disclaimer - none of the information here is provided by me specifically - it’s going to be taken from all sorts of resources and (hopefully) end up with a successful install.
I’ve tried this and gotten stuck on different parts each time, so hopefully the more seasoned persons here can provide instructions and insight.
Here are two resources right off the bat.
The intention is to provide persons with easy copy/paste details to get things up and running as quickly as possible. Whether you’re running a VM, physical box or a VPS - I’m hoping the details here will help to get things done.
It’ll take a bit of time - so let’s start with that.
STEP 1
So the first thing needed is something running Ubuntu Linux. Get your ISO and install on your VM or physical box. If you’re going with a VPS then get that set up.
You can check what version of Linux/Ubuntu you’re running by using the following command.
lsb_release -a
You can see from mine that I’m running 22.04.
Now some persons may be like myself and more familiar with DOS than with Unix/Linux. The transition isn’t that hard with some commands. Instead of MD to make a directory, it’s MKDIR. It’s still CD to change directory, but you have to put a space and then the path.
“CD /var/www/” for example. Changing to the root directory would be “CD /” instead of “CD\” on a DOS system.
Also bear in mind that Linux is case-sensitive for the directory and file names. This means you could actually have two files with the same name, but one has an upper case. I created two using the “nano” editor as shown here.
Personally I find NANO to be easier than VIM. But that’s just me. So be careful with the naming. As another note - “LS” is the equivalent of “DIR”.
Moving on.
Now I saw two different lines of thought on this part. Do I create the IN directory under “/var/www/” or under “/usr/share/nginx” ?
I guess it depends on whether I’m using nginx or Apache2 right? Well - let’s try with an install script first and see how that goes. It should simplify the entire process if it works properly.
I’m going to tag @hillel just for awareness. This is a personal item that I hope will help others. The actual intent here is to move from a shared hosting to self-hosted due to resource issues.
I’ll be back later on when I scrub the system again and have a bit of time to go through the process and screenshot.
STEP 2
I think the next thing to do is set up the dependencies. The guide by TechnicallyComputers linked above seems to have the best working instructions. I’ll show why in a minute.
# apt update
# apt dist-upgrade -y
# add-apt-repository ppa:ondrej/php
# apt update
# apt install php8.3-bcmath php8.3-gmp php8.3-fileinfo \
php8.3-gd php8.3-mbstring php8.3-pdo php8.3-xml php8.3-cli \
php8.3-curl php8.3-zip php8.3-gmp php8.3-mysql php8.3-fpm
# apt install mariadb-server mariadb-client nginx vim
So the above instructions are given. Let’s do each.
apt update
runs and tells us there’s some upgrades available. So let’s run apt upgrade
right after.
We can see that some stuff will be installed. So we’ll press Y and continue.
Wait for it to finish and proceed.
Next is apt dist-upgrade -y
and let that process.
Next we’ll run add-apt-repository ppa:ondrej/php
followed by apt update
.
We get an error saying we can’t use add-apt-repository, but we can install it using apt install software-properties-common
- so let’s do that since it’s needed.
Again we’re prompted about added stuff - but we need it so we proceed.
That’s where I’m stopping for now - will be back later with more.