LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-13-2009, 12:10 PM   #1
gbarnes
LQ Newbie
 
Registered: Oct 2009
Location: Junction City, KS
Distribution: CentOS 5.3
Posts: 4

Rep: Reputation: 0
Question installation/configuration of Apache and PHP


Hello.
I'm new to this forum and needing assistance with a peculiar issue of our Apache and PHP installations on CentOS 5.3. We are setting this up as a virtual machine and had a few questions that we can't find answers for elsewhere.

1. We are using the default CentOS configuration of Apache and PHP. How can we use ./configure to properly configure PHP? So far if we run the command we get the error that the file or directory doesn't exist.

2. Should we yum erase php, yum erase apache, then download the source files and install with our on configuration?

I'll be happy to attempt answers to questions in helping us out.

(BTW - I'm a sys admin with little programming experience. This post is to assist our web programmer coordinator in creating a base CentOS installation with Apache and php and to determine the correct way to configure it.)

Thanks for any assistance.
gbarnes
 
Old 10-13-2009, 04:13 PM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
Hi and welcome to the forum.

Are you trying to use the apache 2 packages from CentOS and your own php compiled from source? Can you post the exact commands you entered and the exact error messages you got.
 
Old 10-13-2009, 04:24 PM   #3
gbarnes
LQ Newbie
 
Registered: Oct 2009
Location: Junction City, KS
Distribution: CentOS 5.3
Posts: 4

Original Poster
Rep: Reputation: 0
Smile apache and php

It's not that it is in error...

Let me try to explain. We've installed a "default" CentOS 5.3 onto a VM. We found php isn't installed, so used yum and pulled down 5.2.1. As we noticed differences with the installed configuration, we tried to use the ./configure script to set the VM the same as one of our production servers (we are creating the VM to be a template for future VMs).

Anyway, we found that ./configure won't work. When trying to find a php folder, there isn't one, nor is there an apache2 or apxs folder. What we are guessing is that since we haven't downloaded, installed, and configured our own php, that the default doesn't configure right either.

So I guess it would be better to say, we want to know what would be the best solution for us to install apache, php, etc.?

Thanks,
gbarnes
 
Old 10-13-2009, 06:08 PM   #4
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
The mostr solid soln is to stick to yum. It'll put things in the right places, install dependencies ( and updates when the time comes).
Don't mix hand-built with a pkg mgr system if you can help it.
Different distros/versions may install slightly differently, so you want to decide which 'std' you want to go with.
If yu have a specific problem tell us what it is and we'll help.
You may need to install more modules, or just adjust a cfg file (not the same as install ./configure; that's just for src/hand built installs).
 
Old 10-14-2009, 09:37 AM   #5
gbarnes
LQ Newbie
 
Registered: Oct 2009
Location: Junction City, KS
Distribution: CentOS 5.3
Posts: 4

Original Poster
Rep: Reputation: 0
I think that is where we stand right now, defining our standard. I'm still new at working with Linux, however I do find that yum was easy to learn and use. Our issue is that it seems to load a log of stuff in the config that we don't want to have in our standard.

So, seems like we need help on how to properly remove php and reinstall it with the source so we can use our own configurations. (I found yum erase php, but will it completely remove php?)

With humble thanks...
 
Old 10-14-2009, 09:39 AM   #6
gbarnes
LQ Newbie
 
Registered: Oct 2009
Location: Junction City, KS
Distribution: CentOS 5.3
Posts: 4

Original Poster
Rep: Reputation: 0
From another forum, we received this bit of "advice" as well...

"It's not exactly the same thing. Yum is simply a quick way to install RPMs, which are pre-made packages. There are some pre-made PHP plug-ins that you can install with yum like php-gd, which is SORT OF like configuring PHP. If there are any plugins that you need that are not available via yum, then you're a little out of luck (if you're just relying on yum).

In my opinion, it's far better to go through the hassle of compiling source instead of installing via yum or another package manager. That way, you end up with the latest, most secure version of PHP and you have all the flexibility you want, and usually better performance. I know that the default Yum install of PHP on CentOS systems, for example, is several versions behind."

Like I said, still learning things, so I depend on those of you with greater knowledge to assist us.

Again, humble thanks...
 
Old 10-14-2009, 07:00 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,289

Rep: Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034Reputation: 2034
That comment is not the whole story.

1. hand built means handling all dependencies yourself AND forever after manually keeping an eye on the src site and rebuilding whenever they announce a new version & watch out for dependencies each time.
2. Actually, RH (therefore centos) backport critical updates, but don't update the major version number; you have to look at the patch nums/release notes if you want to check for a specific 'fix', or just try something that will expose it.

Most things you'll want to do are available by just amending the the relevant cfg files; but you'll get better help if you

a) decide what features you need
b) if you get a problem, show us the specific issues/cmds/msgs involved. General advice is pretty useless when it comes to computers.

HTH
 
  


Reply

Tags
apache2, centos5, php5 apache


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
Problem in configuration of php and apache jetro2k5 Linux - Newbie 2 04-11-2007 01:21 AM
Apache and PHP configuration problem mrzack Linux - Software 2 10-13-2006 07:00 PM
Apache PHP Configuration Problem Br. Nicholas Suse/Novell 3 09-20-2006 03:59 PM
Apache PHP configuration varunbihani Linux - Newbie 2 01-18-2005 02:49 AM
Apache MySQL PHP configuration Gilion Linux - Software 1 02-02-2004 10:58 AM


All times are GMT -5. The time now is 04:39 AM.

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