LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   lamp set up (http://www.linuxquestions.org/questions/linux-server-73/lamp-set-up-563690/)

shankarLe 06-22-2007 07:20 AM

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

Dria 06-22-2007 11:10 AM

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.

shankarLe 06-26-2007 11:21 PM

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....

Dria 06-28-2007 01:39 AM

This line:
Code:

AddType text/html .php
should be removed, as you're already defining the .php extension in the last AddType directive.

shankarLe 06-28-2007 02:22 AM

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..

Peter_APIIT 06-28-2007 03:26 AM

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.

farslayer 06-28-2007 08:59 AM

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.

farslayer 06-28-2007 09:02 AM

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 ? :confused:

http://en.wikipedia.org/wiki/LAMP_%28software_bundle%29

shankarLe 06-29-2007 01:37 AM

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.

:)

Peter_APIIT 06-30-2007 12:48 AM

Thanks for everybody helps. When i needed, i will post a topic here.

Thanks you very much.


All times are GMT -5. The time now is 05:17 AM.