This workshop aims to understand the concepts of Virtualization, offering hands-on projects on Virtualization, both locally and on the cloud.
For this project, we need to install and configure the following dependencies:
Apache2 (HTTP Server)
OpenSSH Server
Git
- Download the files
sudo apt install apache2- Start the server
sudo systemctl start apache2- Enable the server
sudo systemctl enable apache2- Check the status for the service
sudo systemctl status apache2If the installation is successful it should give the following output:-
Now we need to try to access the webpage
For this we need the IP Address
To get the IP Address we need to first install the Net-Tools (Network Tools)
- Install Net-tools
sudo apt install net-tools- Run the command
ifconfig- Enter the IP Address in any browser
- It should give this output
- Download the server
sudo apt install openssh-server- Start the service
sudo systemctl start ssh- Enable the service
sudo systemctl enable ssh- Check the status
sudo systemctl status sshIf the installation is successful it should give the following output:-
Now we need to check the SSH server, by doing a remote login
On a different machine
ssh Username@IP_Address- Install git
sudo apt install gitWe need to configure the firewell so that only the connection to our HTTP Server(port:80) and SSH server (port:22) are allowed
- Enable the Firewall
sudo ufw enable- Allow TCP connection for the HTTP server on Port 80
sudo ufw allow http- Allow TCP connection for the SSH remote logins on Port 22
sudo ufw allow ssh4.Check the status
sudo ufw statusOn Cloud
We will study about the deployment of website on EC2 instance using Apache and SSL configurations. This workshop aims to understand the concepts of Virtualization on cloud, running instances on cloud, knowledge about Elastic IP, SSL configurations.
For this project, we need to install and configure the following dependencies:
Git
Apache2 (HTTP Server)
CertBot apache
- Install Git using the command below
sudo yum install git- Download the files
sudo yum install httpd- Start the server
sudo systemctl start httpd- Enable the server
sudo systemctl enable httpd- Check the status for the service
sudo systemctl status httpd- Go to your web browser and type the public IP address and the port.
-
From the EC2 side dashboard, go to Elastic IP address and create a new Elastic IP.
-
Allocate this IP address to the created EC2 instance.
-
Visit the website- "https://www.getfreedomain.name/" to get a free domain name service.
-
Use the Elastic IP address created before to route the domain name to the address.
- Create a virtual host configuration file:
sudo nano /etc/httpd/conf.d/<DNS>.conf- Add the Virtual Host Configuration:Add the following configuration to the file:
<VirtualHost *:80>
ServerName virtualization.mooo.com
DocumentRoot /var/www/html
ErrorLog /var/log/httpd/virtualization.mooo.com-error.log
CustomLog /var/log/httpd/virtualization.mooo.com-access.log combined
</VirtualHost>
- Install Certbot with Apache plugin:
sudo yum install certbot-apache- Run CertBot with Apache Plugin
sudo certbot --apache
