Install Lamp (Linux, Apache, Mysql, Php 7) In Ubuntu Tutorial (How to) 2017
Tutorial How to Install Lamp in Ubuntu. Lamp stand for linux, apache, mysql, php . Install latest php 7 with lamp in ubuntu .
Commands are provided in long description Click on “See more” to view Commands
Introduction
A “LAMP” stack is a group of open source software that is typically installed together to enable a server to host dynamic websites and web apps. This term is actually an acronym which represents the Linux operating system, with the Apache web server. The site data is stored in a MySQL database, and dynamic content is processed by PHP.
1. To install Apache, open terminal (Ctrl+Alt+T) and run command:
To install Apache you must install the Metapackage apache2. This can be done by searching for and installing in the Software Centre, or by running the following command.
sudo apt-get install apache2
2. To install MySQL, open terminal (Ctrl+Alt+T) and run command:
To install MySQL you must install the Metapackage mysql-server. This can be done by searching for and installing in the Software Centre, or by running the following command.
sudo apt-get install mysql-server
3. To install PHP, open terminal (Ctrl+Alt+T) and run command:
To install PHP you must install the Metapackages php7 and libapache2-mod-php7. This can be done by searching for and installing in the Software Centre, or by running the following command.
sudo apt-get -y install php7.0 libapache2-mod-php7.0
4. Restart Server
Your server should restart Apache automatically after the installation of both MySQL and PHP. If it doesn’t, execute this command.
sudo /etc/init.d/apache2 restart
5. Check Apache
Open a web browser and navigate to http://localhost/. You should see a message saying It works!
6. Check PHP
You can check your PHP by executing any PHP file from within /var/www/. Alternatively you can execute the following command, which will make PHP run the code without the need for creating a file .
php -r ‘echo “Happy to help – Tech Justice”;’
Congratulations, you have just Installed a Ubuntu LAMP Server!
———————————————————————–
Thanks for Watching
Please Like, Share, Subscribe
————————————————————————
Website : www.techjustice.net
Facebook : www.facebook.com/techjustice
Instagram : Tech_justice
Twitter : Tech_justice
————————————————————————-
by Tech Justice
linux web server