Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

NAME: Salim Tadvi

BRANCH: COMPUTER ENGINEERING


REG NO. :201070042

OSC EXPERIMENT 3
Theory :
Apache : Apache is the most commonly used Web server on Linux systems. Web servers are used to
serve Web pages requested by client computers. Clients typically request and view Web pages using
Web browser applications such as Firefox, Opera, Chromium, or Internet Explorer.

How to install apache on ubuntu :

Before installing new software, it’s a good idea to refresh your local software package database to
make sure you are accessing the latest versions. This helps cut down on the time it takes to update
after installation, and it also helps prevent zero-day exploits against outdated Software. Open a
terminal and type:

sudo apt-get update

Step 1: Install Apache

To install the Apache package on Ubuntu, use the command:

sudo apt-get install apache2

Step 2: Verify Apache Installation To verify Apache was installed correctly, open a web browser and
type in the address bar: http://local.server.ip

Step 3: Configure Your Firewall

Although the Apache installation process is complete, there is one more additional step.

Configure the default UFW firewall to allow traffic on port 80.

Start by displaying available app profiles on UFW:

sudo ufw app list

Use the following command to allow normal web traffic on port 80:

sudo ufw allow ‘Apache’

Step 4: Verify the changes by checking UFW status:

sudo ufw status


Installation screenshots:

PHP:

PHP is a general-purpose scripting language suited for Web development. The PHP Hypertext
Preprocessor (PHP) is a programming language that allows web developers to create dynamic
content that interacts with databases. PHP scripts can be embedded into HTML.

How to Install PHP 7.2 with Apache on Ubuntu:

Update Ubuntu

Ensure you are using the latest Ubuntu updates by entering the following command into a terminal
window:

apt-get update && apt-get upgrade

Install PHP 7.2 Step 1: To install PHP 7.2, enter the following command:
sudo apt-get install php libapache2-mod-php

Confirm the installation by hitting Enter. The system will download and install PHP from the software
repositories. This command also installs dependencies and modules for use with Apache.

Step 2: Verify PHP was installed, with the command:

php -v

Step 3: Restart the Apache service to apply the changes:

sudo systemctl restart apache2

Screenshot of php installation :

Conclusion :
From this experiment, we learned and implemented the installation of apache and PHP on ubuntu.

You might also like