| Ubuntu This forum is for the discussion of Ubuntu Linux. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
07-18-2006, 07:04 AM
|
#1
|
|
Member
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278
Rep:
|
install apache and php on ubuntu server
I have ubuntu server 6.06. I've installed apache2 with apt-get install apache2*. How can I install php on it?
|
|
|
|
07-18-2006, 11:37 PM
|
#2
|
|
LQ Newbie
Registered: Jul 2006
Location: Minnesota
Distribution: RHEL, Debian, Ubuntu
Posts: 27
Rep:
|
There's an automatic LAMP (Linux, Apache, MySQL, and PHP) installer for Ubuntu Server - I think. I can't seem to find any documentation on it. You might also check out The Perfect Setup for Ubuntu Server.
|
|
|
|
07-20-2006, 07:04 AM
|
#3
|
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,014
Rep: 
|
Hi
Another way is to use dependency checking in apt-get. If you just do a
apt-get install mysql-server phpmyadmin
You'll get mysql-server, and since phpmyadmin requires PHP on the Apache, it will install and configure it correctly. It will also install the libraries and the mysql module for PHP because its required too.
|
|
|
|
07-20-2006, 07:39 AM
|
#4
|
|
Member
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278
Original Poster
Rep:
|
I just want to install PHP4 or 5 on apache2... and it doesn't seem to work with regular apt-get install comands. I have the server up... the lamp option is during the install i guess.
Please help! I really want to get this thing up and running!
Thank you!
|
|
|
|
07-20-2006, 07:49 AM
|
#5
|
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,014
Rep: 
|
Hi again
I think you need some package to make the php work on apache2. I think it might be "libapache2-mod-php4" or "libapache2-mod-php5". Then those packages probably need some others.
But I still think the easiest way is to install phpmyadmin - after you have installed it, you can just remove it.
apt-get install phpmyadmin
apt-get remove phpmyadmin
You wont get mysql-server that way, as it's not needed (it could be on another box), but you'll get the mysql module for apache. Just take a note of all the packages you get so you can remove what you dont think you'll need.
|
|
|
|
07-20-2006, 03:27 PM
|
#6
|
|
Member
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278
Original Poster
Rep:
|
nope... that doesn't work for me... if i install phpmyadmin along with libapache2-mod-php it still prompts me to download the php file rather than interpret it.
any other ideeas ? how can i configure apache to work with php on ubuntu ?
|
|
|
|
07-21-2006, 04:21 AM
|
#7
|
|
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,014
Rep: 
|
Strange - it worked when i did it.
I dont know what could be wrong, but all the configuration files are in /etc/apache2 and /etc/apache2/README tells a bit on the files in there.
You could also try to restart Apache, and then look in /var/log/apache2/error.log - there might be some clue to what the error is.
|
|
|
|
07-21-2006, 08:25 AM
|
#8
|
|
Member
Registered: Jul 2006
Distribution: Debian, Ubuntu, W7, openSUSE, Centos
Posts: 152
Rep:
|
Ubuntu have a fantastic Wiki.
All the information you will need is here: https://help.ubuntu.com/community/ApacheMySQLPHP
Also replace apt-get with aptitude as it will remove any dependancies.
|
|
|
|
07-24-2006, 03:04 PM
|
#9
|
|
Member
Registered: Oct 2005
Location: Hannover, Germany
Distribution: Let there be Ubuntu... :o)
Posts: 573
Rep:
|
Zetec,
while your link is great (thanks), this one is wrong:
Quote:
|
Also replace apt-get with aptitude as it will remove any dependancies.
|
Correct is that Aptitude is just a viewer upon APT, and actually, doesn't add functionality. - While Synaptic and Adept are graphical interfaces to APT, Aptitude is a text-(curses-)based interface to it. - APT itself is the pure command-line interface, that will care for dependencies as well.
Anyways, cheers & have fun
Last edited by robbbert; 07-24-2006 at 03:09 PM.
|
|
|
|
07-24-2006, 04:22 PM
|
#10
|
|
Member
Registered: Jul 2006
Distribution: Debian, Ubuntu, W7, openSUSE, Centos
Posts: 152
Rep:
|
Arh thanks for putting that right robbert. Im new to the game but like to try and help out.
Regards,
Jon
|
|
|
|
07-28-2006, 09:25 AM
|
#11
|
|
Member
Registered: Nov 2003
Location: Cincinnati, Ohio
Distribution: Ubuntu 6.06 /SLED10
Posts: 45
Rep:
|
|
|
|
|
07-28-2006, 01:08 PM
|
#12
|
|
Member
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278
Original Poster
Rep:
|
i have installed as LAMP. But it still doesn't work. it prompts me to download the php files. But if i install phpmyadmin it works. i guess i have to make some adjustemnts to apache2.conf. what could those be?
thankyou!
|
|
|
|
07-28-2006, 01:27 PM
|
#13
|
|
Member
Registered: Nov 2003
Location: Cincinnati, Ohio
Distribution: Ubuntu 6.06 /SLED10
Posts: 45
Rep:
|
Quote:
|
apt-get install autoconf automake1.4 autotools-dev libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-ldap php5-mhash php5-mysql php5-mysqli php5-snmp php5-sqlite php5-xmlrpc php5-xsl php5-imap php5-mcrypt php5-pspell
|
Run that to install all the php you should need.
edit
Quote:
|
/etc/apache2/apache2.conf
|
(either gedit or vi)
find the line
add to that line.
and of course run a /etc/init.d/apache2 restart
|
|
|
|
07-28-2006, 01:32 PM
|
#14
|
|
Member
Registered: Aug 2003
Location: Romania
Distribution: Ubuntu 6.06
Posts: 278
Original Poster
Rep:
|
 i know how to make a directory index. the problem is that i want for example a http://localhost/test.php and it prompts me to download it.
|
|
|
|
07-28-2006, 01:35 PM
|
#15
|
|
Member
Registered: Nov 2003
Location: Cincinnati, Ohio
Distribution: Ubuntu 6.06 /SLED10
Posts: 45
Rep:
|
assuming its stored in /var/www/
verify its set to atleast 775 (chmod 775)
I've had that problem before ill look into how i fixed it.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:06 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|