So I Will Try to Make Series About the PHP.
PHP is an Scripting language Majorly Used for Back-end Web Development and also more than 50 % websites on internet use PHP as back-end.
One of the most common server configuration for linux is LAMP stack (Linux, Apache, MYSQL, PHP).
For Linux we will try to install apache, MySQL separately and try not to install third party applications.
You can still install XAMPP if you prefer, but remember in production you should not try third party applications.
sudo apt-get update sudo apt-get upgrade sudo apt-get dist -upgrade
sudois for superuser ( as a linux user you may already know it ).
- Here all packages and whole operating system is being updated and upgraded.
sudo apt-get install Apache2
- We Use apache server for running our site under localhost
sudo apt-get install mysql-server sudo my_sql_secure_installation.
- It will ask to create database password so Create an Secure Password.
sudo service apache2 start
You will get the below image on screen.
sudo mysql -u root
Image Given Below
sudo apt-get install PHP
This command will install PHP with it's default settings, so you will need to locate the PHP.ini file which can be located at
/etc/PHP/8.1/apache2 and also in
if you want PhpMyAdmin for setting up and making or altering your database in much more flexible way, you can use following commands.
sudo apt-get install PHPmyadmin
You Will also need to Configure apache to include phpmyadmin with following command.
sudo echo -e "\include etc/PHPmyadmin/apache.conf" >>/etc/apache2/apache2.conf
This is how you are ready to execute and run PHP programs on Linux.
If you found this useful then please share this and follow me! Also check out Buy Me A Coffee if you want to support me on a new level!
Thanks for reading give your thoughts in the comments.