The easiest way to do this would be to use the VNC Console tab in your control panel, but it would be smarter to use SSH, with a client such as Putty, available here.
The first thing you'll want to do is make sure that everything is updated on the operating system. Go ahead and enter this command:
Code: Select all
sudo apt-get update
Apache2
Once that's done its business, you can start installing Apache2 with this command:
Code: Select all
sudo apt-get install apache2
When this finishes, Apache2 will already be running and your webserver will be active. You can go to "http://www.xxx.yyy.zzz/" - where "www.xxx.yyy.zzz" is the IP address for your VDS - in your web browser and see the Apache test page.
MariaDB
Next, we want to install MariaDB. We'll use the following command to install MariaDB, and the tools it needs to talk to Apache and PHP:
Code: Select all
sudo apt-get install mariadb-server
Now you'll want to do a bit of housekeeping for MariaDB:
Code: Select all
sudo mysql_secure_installation
It will ask for the root password, which is currently blank, so press Enter. You'll then be asked if you'd like to create a root password, press "n", then Enter. To then remove anonymous users, press "y", then Enter. To disallow root logins remotely, press "y", then Enter. To remove the test database, press "y", then enter. You'll then want to make the changes take place immediately, so press "y", then Enter. The MariaDB installation is now finished.
Next, we'll need to create an admin user account, as we don't want to to use the root user account for a passworded login or for general server management.
First, open a local MariaDB connection using:
Code: Select all
sudo mariadb
Code: Select all
GRANT ALL ON *.* TO 'admin'@'localhost' IDENTIFIED BY 'your_password_here' WITH GRANT OPTION;
Code: Select all
FLUSH PRIVILEGES;
Code: Select all
exit
To install PHP, run the following command:
Code: Select all
sudo apt-get install php libapache2-mod-php php-mysql
Now, you'll want to make sure .php files take priority over .html when not specifying, so you'll want to use this:
Code: Select all
sudo nano /etc/apache2/mods-enabled/dir.conf
Code: Select all
<IfModule mod_dir.c>
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>
Now we need to restart Apache, using this:
Code: Select all
sudo service apache2 restart
phpMyAdmin is no longer offered as a default repository as of Debian 10, and requires installation from source. Due to the extended length of this installation, we've separated this out into a another tutorial, linked here: viewtopic.php?f=46&t=15660
NOTE: The root directory of your webserver will be in /var/www/html/ and files can be uploaded there to be viewed in the browser.