LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-22-2007, 08:20 AM   #1
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Rep: Reputation: Disabled
Smile lamp set up


Hello All....

I have couple of questions always bothering me when I am working with linux. I am currently working on RHEL 4.0 and cent os 4.0.. my questions are.

how to install apache, php, mysql and gd library.. (all latest versions).. as per my knoweldge, we can simply install apache. mysql while installing linux, if we do so, how could we compile php with mysql... ? (but these versions are old that comes up with the disto)..

if I go to php.net and download latest php 5 and same from apache and mysql, ( i hope all these are source codes not rpms). how can we compile all these... could you please start from scratch as I am new to this....
at the end, i need to see all these in the phpinfo() file... tell me on how to install gd library for php

I hope i made my self clear.....

thanks
 
Old 06-22-2007, 12:10 PM   #2
Dria
LQ Newbie
 
Registered: Oct 2006
Distribution: Slackware, Mandriva, and Fedora when I must
Posts: 27

Rep: Reputation: 15
For installing PHP -- when you're running ./configure, you need to specify both Apache's location and MySQL's location.
Code:
--with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql
Those should be the appropriate options to add to PHP's ./configure, but I'm not certain. If you don't have Apache or MySQL installed under /usr/local/apache2 and /usr/local/mysql you should replace those paths with the actual paths. (I don't know what these paths are in Red Hat.) You should also run ./configure --help to verify those options are correct.

You'll have to change httpd.conf (for Apache) to recognize PHP -- http://httpd.apache.org will have a link to documentation that will tell you how to do this.

For the gd library, that might be something that also has to be specified as an option to ./configure when you're compiling PHP. I've never done that before, so check the gd library docs -- but it may be as simple as installing the library and adding something like --with-gd to ./configure.

Last edited by Dria; 06-22-2007 at 12:16 PM.
 
Old 06-27-2007, 12:21 AM   #3
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
PHP isn't working.

Thank you for your reply.

I have now compiled php with apache and mysql. The versions are.
php-5.2
apache-2.2.4
mysql-5.0.41
It looks like apachectl service was able to start and stop without any trouble /usr/local/apache/bin/httpd -t gives syntax ok.

Now the problem is, I was able to run html files just fine now, but not .php files. When I execute, http://localhost/phpinfo.php it gives blank page. I can not run .php files on my fedora 6.

I added these directives are in /usr/local/apache/conf/httpd.conf file,


[HTML]AddType text/html .php
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php .php4 .php3

and

LoadModule php5_module modules/libphp5.so
AddHandler php5-script php[/HTML]

Resume normal operations is the message i found in error_log file of apache.. can you please tell me how to fix this problem or guide me how to get rid of this.

Thanks in advance....
 
Old 06-28-2007, 02:39 AM   #4
Dria
LQ Newbie
 
Registered: Oct 2006
Distribution: Slackware, Mandriva, and Fedora when I must
Posts: 27

Rep: Reputation: 15
This line:
Code:
AddType text/html .php
should be removed, as you're already defining the .php extension in the last AddType directive.
 
Old 06-28-2007, 03:22 AM   #5
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
Talking fixed....

Quote:
Originally Posted by Dria
This line:
Code:
AddType text/html .php
should be removed, as you're already defining the .php extension in the last AddType directive.
Look like the issue is fixed, what I found the problem is,

<?
phpinfo();
?>

above code does not worked, so I added,
<?php
phpinfo();
?>
now it works and all php files are working as it should...

Thanks for the support..
 
Old 06-28-2007, 04:26 AM   #6
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 551

Rep: Reputation: 30
How to set up LAMP ? What is the purpose of doing this ? Sorry for stupid questions because i am a IT student who want to learn to set up LAMP. I have Fedora 7 install in my hard disk.


Thanks for your help. I really need your help. Your help is greatly appreciated by me and others.
 
Old 06-28-2007, 09:59 AM   #7
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Another method of installing apache and the other LAMP components all the latest versions, Compiled, repeatable and upgradeable is to use the Apache-toolbox

run the script, check the boxes for what you want, it will download all the sources, and compile everything.. very nice.

Last edited by farslayer; 06-28-2007 at 10:02 AM.
 
Old 06-28-2007, 10:02 AM   #8
farslayer
Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 189Reputation: 189
Quote:
Originally Posted by Peter_APIIT
How to set up LAMP ? What is the purpose of doing this ? i am a IT student who want to learn to set up LAMP.

You lost me... you want to know how to setup LAMP on your Linux box, but you don't know what the purpose of LAMP is ? Why would you bother setting something up if you don't even know what it's for ?

http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29
 
Old 06-29-2007, 02:37 AM   #9
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by Peter_APIIT
How to set up LAMP ? What is the purpose of doing this ? Sorry for stupid questions because i am a IT student who want to learn to set up LAMP. I have Fedora 7 install in my hard disk.


Thanks for your help. I really need your help. Your help is greatly appreciated by me and others.
Hello Peter,

LAMP - extension is Linux Apache Mysql and PHP and it is best suited for those who want to run web applications and it's totally free. please have a look at the following thread which already discussed by our members

http://www.linuxquestions.org/questi...d.php?t=429228

Should you need help in this regard, please let us know so we could help you.

 
Old 06-30-2007, 01:48 AM   #10
Peter_APIIT
Member
 
Registered: Dec 2006
Posts: 551

Rep: Reputation: 30
Thanks for everybody helps. When i needed, i will post a topic here.

Thanks you very much.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: LAMP vs. LAMP Rematch LXer Syndicated Linux News 0 11-08-2006 04:03 AM
LXer: LAMP vs. LAMP LXer Syndicated Linux News 0 08-23-2006 12:33 AM
Lamp depam Linux - Software 3 08-09-2006 07:53 AM
Why should use LAMP ? LinuxLover Linux - General 8 03-29-2006 11:55 PM
Lamp mikage14 LinuxQuestions.org Member Success Stories 2 05-08-2004 04:20 AM


All times are GMT -5. The time now is 02:38 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration