<\/span><\/h2>\nFirst, you need to login to your server via SSH as user root:<\/p>\n
ssh root@IP_ADDRESS -p PORT_NUMBER<\/pre>\nand replace “IP_ADDRESS” and “PORT_NUMBER” with your actual server IP address and SSH port number.<\/p>\n
Before we begin with the installation, let’s make sure that your Debian 9 server is up-to-date by running the following commands:<\/p>\n
apt-get update\r\napt-get upgrade<\/pre>\n<\/span>2. Install Apache<\/span><\/h2>\nTo install the Apache web server, run the following command:<\/p>\n
apt-get install apache2<\/pre>\nAfter the installation is completed, you can enable the service to start automatically upon system boot with:<\/p>\n
systemctl enable apache2<\/pre>\nTo verify that the Apache server is running, you can run the following command:<\/p>\n
systemctl status apache2<\/pre>\n<\/span>2. Install PHP 7.0<\/span><\/h2>\nNext, we will install PHP 7 with some additional PHP modules:<\/p>\n
apt-get install php7.0 libapache2-mod-php7.0 php7.0-mysql php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-gd php7.0-mcrypt php7.0-intl php7.0-curl php7.0-zip<\/pre>\n<\/span>3. Install MariaDB<\/span><\/h2>\nThe next step is to install the MariaDB database server. To do this, run the following command:<\/p>\n
apt-get install mariadb-server<\/pre>\nAfter the installation is completed, you can start the database server and enable it to automatically start upon boot, with:<\/p>\n
systemctl start mariadb\r\nsystemctl enable mariadb<\/pre>\nYou can also run the “mysql_secure_installation” script provided by MariaDB in order to secure your installation:<\/p>\n
mysql_secure_installation<\/pre>\nAfter you have answered all the questions you can now go ahead and login to MariaDB as root using your root password, with the following command:<\/p>\n
mysql -u root -p<\/pre>\nTo create a new database for our Joomla installation, run the following commands:<\/p>\n
CREATE DATABASE joomla_db;\r\nGRANT ALL PRIVILEGES ON joomla_db.* TO 'joomla_user'@'localhost' IDENTIFIED BY 'PASSWORD';\r\nFLUSH PRIVILEGES;\r\nexit;<\/pre>\nMake sure to replace “PASSWORD” with an actual, strong password.<\/p>\n