Port_Number<\/strong>\u201d with your server\u2019s IP address and SSH port.<\/p>\n\n\n\nYou can check whether you have the proper Ubuntu version installed on your server with the following command:<\/p>\n\n\n\n
lsb_release -a<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
No LSB modules are available.\nDistributor ID: Ubuntu\nDescription: Ubuntu 20.04.3 LTS\nRelease: 20.04\nCodename: focal<\/pre>\n\n\n\nNow, run the following command to update all installed packages to the latest available version.<\/p>\n\n\n\n
apt update && sudo apt upgrade<\/pre>\n\n\n\n<\/span>Step 2: Install Apache Webserver<\/span><\/h2>\n\n\n\nExecute the following command to install Apache webserver:<\/p>\n\n\n\n
apt install apache2<\/pre>\n\n\n\nTo start Apache and to enable it to auto-start on server boot, run these commands:<\/p>\n\n\n\n
systemctl enable apache2\nsystemctl start apache2<\/pre>\n\n\n\nTo confirm that you have properly installed Apache2, you can open your preferred web browser and type your server IP address <\/strong>and you should be able to view the Apache2 Ubuntu Default Page.<\/p>\n\n\n\n
<\/figure><\/div>\n\n\n<\/span>Step 3: Install PHP and extensions<\/span><\/h2>\n\n\n\nTo install PHP and the required PHP extensions, run the following command:<\/p>\n\n\n\n
apt install php php-cli php-common php-curl php-mbstring php-gd php-mysql php-soap php-xml php-imap php-intl php-opcache php-json php-zip<\/pre>\n\n\n\n<\/span>Step 4: Install MariaDB<\/span><\/h2>\n\n\n\nMariaDB is available in the Ubuntu 20.04 default OS repository. You can install it by running the following command:<\/p>\n\n\n\n
apt install mariadb-server<\/pre>\n\n\n\nBy default, the MariaDB service will start automatically after installing it in your system. You can verify it with the following command:<\/p>\n\n\n\n
systemctl status mariadb<\/pre>\n\n\n\nYou should get the following output:<\/p>\n\n\n\n
\u25cf mariadb.service - MariaDB 10.3.32 database server\nLoaded: loaded (\/lib\/systemd\/system\/mariadb.service; enabled; vendor preset: enabled)\nActive: active (running)\nDocs: man:mysqld(8)\nhttps:\/\/mariadb.com\/kb\/en\/library\/systemd\/\nMain PID: 968 (mysqld)\nStatus: \"Taking your SQL requests now...\"\nTasks: 30 (limit: 2240)\nMemory: 114.8M\nCGroup: \/system.slice\/mariadb.service\n\u2514\u2500968 \/usr\/sbin\/mysqld<\/pre>\n\n\n\nOnce the installation is complete, issue the following command to secure your installation. This is optional, but strongly recommended:<\/p>\n\n\n\n
mysql_secure_installation<\/pre>\n\n\n\nThis script will set the MariaDB root password, disable remote root login and remove anonymous users. We suggest answering every question with the character \u2018Y<\/strong>\u2019 for yes.<\/p>\n\n\n\n