can any one tell how to install LAMP server in terminal in
ubuntu.....and also tell please how to run php files in
ubunut and how to save and compile in ubuntu..i already
installed ubuntu ..but i dont installed lamp server so i
want to install lamp server in terminal is it possible
please reply

Answer Posted / sindhu

here i provide the installation commands for minimum
required packages for LAMP.

For MYSQL : sudo apt-get install mysql-client mysql-server

For Apache : sudo apt-get install apache2 apache2.2-common
apache2-utils

For PHP : php5 php5-mysql

To Restart the all Services of LAMP

For Mysql : sudo /etc/init.d/mysql restart

For Apache : sudo /etc/init.d/apache2 restart

For PHP : it's not need.


create the PHP file in ubuntu :
>>> Open texteditor Application->accessories-> text editor


save the php file in apache path
>>> press ctrl + s and save the file in the path of
/var/www/xxxx.php(put any file in xxxx)
/var/www/yy/xx.php ( save file within folder
yy -that may any folder name
xx -any file name with .php)

Run the PHP file:
>>> Open the firefox browser and type url like

http://localhost/xxxx.php (file name)
http://localhost/yy/xx.php (file within folder)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why does php need server?

504


What is difference between static and constant?

516


What are the differences between GET and POST methods in form submitting?

545


Does mysql need php?

438


How to get the position of the character in a string in php?

595






How to check your php installation?

481


How to convert numbers to strings in php?

498


When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?

491


Will a comparison of an integer 12 and a string "13" work in php?

520


How to find the length of a string?

531


Does php use html?

454


Explain the difference between isset() and empty()?

513


Can we extend final class in php?

494


Why do we use session?

516


What is strlen function in php?

501