Translations of this page:
  • en

Menu

This is an old revision of the document!


Installing Tools

sudo apt install zip unzip software-properties-common

PHP installation

Installing PHP's versions and libraries are pretty easy with the Ondrej Sury's personal package archive (PPA). I will install PHP 8.4 for this guide, but you can check which PHP version you want to install from the following page: https://launchpad.net/~ondrej/+archive/ubuntu/php

Adding Repository

sudo add-apt-repository ppa:ondrej/php

After adding the repository successfully, we can update the system.

sudo apt update

Installing PHP

sudo apt install -y php8.4 php8.4-gd php8.4-mbstring php8.4-xml php8.4-zip php8.4-intl

MySQL or MariaDB

sudo apt install mariadb-server

Then we can start the installation by:

sudo mysql_secure_installation

Installation script will ask some questions: 1- Enter current password for root (enter for none): JUST PRESS ENTER RESPONSE: OK, successfully used password, moving on…

2- You already have your root account protected, so you can safely answer 'n'. Switch to unix_socket authentication [Y/n] n Type 'n' RESPONSE: … skipping.

3- You already have your root account protected, so you can safely answer 'n'.

Change the root password? [Y/n] Y TYPE 'Y' AND CHANGE THE ROOT ACCOUNT PASSWORD RESPONSE 1: New password: <ENTER YOU PASS> Re-enter new password: <REENTER YOU PASS> RESPONSE 2: Password updated successfully! Reloading privilege tables.. … Success!

4- Remove anonymous users? [Y/n] y … Success!

5- Disallow root login remotely? [Y/n] n THIS IS TOTALLY PERSONAL DECISION RESPOSNE: … skipping.

6 - Remove test database and access to it? [Y/n] Y

RESPONSE: - Dropping test database… … Success! - Removing privileges on test database… … Success!

7 - Reload privilege tables now? [Y/n] Y … Success! RESPONSE: Cleaning up…

Edit this page
Back to top