Posts

Showing posts from October, 2023

A Step-by-Step Guide to Setting Up a LAMP Stack on Linux

Image
Installing php with Apache&MySql in Linux Os To run a simple PHP code on a Linux system, you'll need a web server with PHP support installed. Apache is a commonly used web server, and you can install PHP alongside it. Here's a step-by-step guide: 1: Install Apache and PHP -Open a terminal write following command on terminal  sudo apt update sudo apt install apache2 Press Y to continue Downloading.. sudo ufw allow in "Apache Full" 2:Install MySql write following command on terminal sudo apt install php libapache2-mod-php php-mysql So installation is completed For Checking Enter Following command php -v Installation is Completed Succesfully..... Now move on to run php code..... 3:Run php Code Following command are use for make php file sudo gnome-text-editor /var/www/html/first.php This command make first.php file and open text-editor in which i write a php code and Save the Code... Now open Firefox Browser and search  localhost/first.php  Finally php code is succes...