I want to develop web applications with PHP, for that reason I need to install a LAMP system, I heard that it's good idea to use latest versions of PHP, MySQL and Apache ... so if it's possible please help me ...
-
1JFTR "I heard that it's good idea to use latest versions of PHP, MySQL and Apache ... so if it's possible please help me ..." - you heard it wrong. It's probably safest to use the packaged versions in Ubuntu. You will need the latest&greatest only in edge cases.– oerdnjAug 6, 2013 at 11:51
2 Answers
You can install lamp server by just running,
sudo apt-get install lamp-server^
(Please see this answer for an explanation.)
Then you can copy your files into /var/www folder and view through browser in localhost. Since copying files into /var/www folder needs privileges and annoying you can change that directory to your own one.
you can replace "/var/www" string in following files into your own directory path and then you can use new directory as your www folder.
/etc/apache2/sites-available/default
/etc/apache2/sites-available/default-ssl
After changing contents of the above files, run
sudo /etc/init.d/apache2 restart
to restart webserver. Then you will be able to use new directory as the web folder.
Hope this helps.
Start by installing tasksel
, then install the lamp-server
. As per the Ubuntu help documentation.
sudo apt-get install tasksel
sudo tasksel install lamp-server
And you are off. Just place your files in /var/www/
go to localhost
in a browser and view your files.