Step 1: Register VPS
You can either register Virtual Private Server (VPS) from Hetzner and SSH into the machine.
Step 2: Install Apache
To install Apache you can run the command below. The first one is to update and get the latest packages on Ubuntu and the 2nd one is to install apache2.
sudo apt-get update sudo apt-get install apache2
sudo nano /etc/apache2/apache2.conf
ServerName server_domain_or_IP
sudo apache2ctl configtest sudo systemctl restart apache2
sudo ufw allow in "Apache Full"
Step 3: Install MySQL
The next step is to install the MySQL database and you can install it easily using the command below.
sudo apt-get install mysql-server
mysql_secure_installation
Step 4: Install PHP
Next, you will have to install PHP by running the following command. Do note that the other packages / library such as "php-mcrypt" is necessary for PHP so it's a must to install all.
sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql
sudo nano /etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c> DirectoryIndex index.php index.html index.cgi index.pl index.xhtml index.htm </IfModule>
sudo systemctl restart apache2
Leave a reply