Comments on Installing Apache2 With PHP5 And MySQL Support On Ubuntu 11.04 (LAMP)
Installing Apache2 With PHP5 And MySQL Support On Ubuntu 11.04 (LAMP) LAMP is short for Linux, Apache, MySQL, PHP. This tutorial shows how you can install an Apache2 webserver on an Ubuntu 11.04 server with PHP5 support (mod_php) and MySQL support.
36 Comment(s)
Comments
If it's ubuntu server :
sudo tasksel and then choose Lamp server
or
sudo apt-get install lamp-server^ (^is needed) .
If it's a non server version:
sudo apt-get install lamp-server^
or sudo
apt-get install tasksel
sudo tasksel and choose Lamp server
I hope this is good for you
I used tasksel on the advice of another forum to uninstall and re-install apache because something I did in trying to get apache to do virtual hosts completely failed, and I wanted to get back to defaults.
I don't know why, but tasksel uninstalled not only apache, but also java, eclipse, most of my other development tools, and something else that prevented my desktop from running.
And THAT is why I'd rather use apt-get: it does what you tell it to, and asks before doing more.
Can I assume that this will work with Ubuntu 11.04 desktop? Or is this just for Ubuntu Server edition?
I just followed these instructions for a fresh LAMP install on Ubuntu 11.04 Desktop that I use for web development...
Why not just use "sudo tasksel install lamp-server" to install LAMP?
all steps was ok, but phpmyadmin I only installed when I used the synaptic package manager.
thanks!
I found this very useful, however I ran into a problem at step 3 where instead of showing me the default page, it was giving me an "ERROR 403: Forbidden." After hours (and I mean HOURS) of research (and yes, I am a complete Linux newbie), I finally found the solution: "chmod -R 0755 /var/www".
Not sure if your guide is intended for newbies or not, but if it is, letting others know of this step would be very useful. I know I could have used it.
Great guide, by the way. apart from my permissions issues, everything was right on and easy to follow. thank you.
Hi I also got the same problem, but solution didn't work for me, when I am trying this url http://192.168.0.100/ I am not getting It Works! page. Please help. Thanks in advance. I am a newbie.
Try 127.0.0.1 rather than the 192.168.0.100.
That may help
K
:)
On some systems it's 127.0.1.1
Why use XAMPP--which is crap--when you've got this guy?! Awesome job, friend; thank you very very much! Regards,
for windows?
thanks, was very helpful
This is very helpful to me but the last step on the install phpmyadmin
when I type this into my address bar
localhost/phpmyadmin
it is show the list of directory it is because phpmyadmin is in /usr/share/
I've fixed this by in the Terminal type :-
mv /usr/share/phpmyadmin /var/www/phpmyadmin
so now it come up very well now..
thanks farook..! :)
It may be better to create a link rather than moving the directory:
# ln -s /usr/share/phpmyadmin /var/www
link did the trick, thanks.
To set up under Apache all you need to do is include the following
line in /etc/apache2/apache2.conf, first type the following command to
open up this file:
gksudo gedit /etc/apache2/apache2.conf
Add the following line of code inside apache2.conf:
Include /etc/phpmyadmin/apache.conf
Now restart Apache:
sudo /etc/init.d/apache2 restart
Find this in http://www.blog.highub.com/author/admin/
use the following command for restarting apache
/etc/init.d/apache2 restart
This tutorial helps a lot! thanks dude! Also thanks for those who comments the problem on phpmyadmin! Works great!
this worked until "info.php" i cold not creat(/delete) files in var/www i tried Left click(properties->permissions) on www folder But all was gray i can not change the permissions..
I looked at chmod command but it looks like i only can change filepermissions not the folderpermissions.
Can someone give me a command to
change the permissions on var/www to write by user-root ?? Please!
sudo chmod 777 /var/www
worked for me.
Thanks for a great article, and to the follow up posts too.
I followed the original article but needed the "chmod" as above so I could save files in the /var/www directory and the "ln" to get phpMyAdmin working properly.
The IP for my server was 127.0.0.1
cotsweb wrote:
> sudo chmod 777 /var/www
No! That is a huge security hole. You just gave all users on the system (including users created to run other applications) complete access to your document root. The permissions for /var/www should be 600 unless you have a compelling reason to change them, and this isn't a compelling reason.
The most likely reason that the grandparent couldn't write a file to that directory was because he didn't do it using the sudo command:
sudo nano /var/www/info.php
hey i can't get the myadmin to work. will some one pleace help me. :D
This article made me feel like a pro, great article buddy...thnx alot
Thank you Falko for the fantastic write-up. I couldn't have done it without this. And thank you all for your comments...I still couldn't have done it without all of you either!
Thank you, thank you, thank you! This post was a great help. No errors, no misses. Just perfect!
This is old but charles is right! also what you can do is:
sudo chown -R :www-data /var/www
to change the group to the apache2 user www-data
and go with
sudo chmod -R 775 /var/www
this helps if you need apache to write to files in your web dir
thank u vary much. this is a grate job.thanx again
Thank you Adam for advising 'ln -s /usr/share/phpmyadmin /var/www'. That solved my problem. I was then able to connect to phpMyAdmin sign-in page using http://127.0.0.1/phpmyadmin. A very well written tutorial. Thank you.
The symlink worked for me too - thanks for posting this!
Thank you very much!
I followed all your steps and it worked first time for me perfectly.
Many thanks to you for taking the time to post this and sharing it.
The IP you type into your browser to load the default apache2 server webpage is NOT NECESSARILY 192.168.0.100 ! ! !
On linux, for example, use the command ifconfig to figure out your localhost IP.