[afnog] Apache2-PHP5 Installation Issues

Noah Sematimba sematin at mtn.co.ug
Mon Jul 31 10:22:44 EAT 2006


Uhmm

Possibly I missed a post somewhere but wouldn't it be easier to get the source 
rpms, edit the spec file and rebuild the rpm then install?

That way you get all the advantages of building from source without the 
disadvantages associated with maintaining packages installed from source on 
linux.

Noah.
On Monday 31 July 2006 01:09, Hervey Allen wrote:
> Stephane Bortzmeyer wrote:
> > On Fri, Jul 28, 2006 at 04:27:22AM -0400,
> >  Hervey Allen <hervey at nsrc.org> wrote
> >
> >  a message of 38 lines which said:
> >> I've had to compile php from source several times in order to build
> >> dynamic sites. The issue with RPM installed apache and php is that
> >> the choices made by the distribution vendor often are not what
> >> you'll need for the code you plan on writing.
>
> Stephane:
>
> 	I've responded to your comments out of order. First:
> >> Also, remember that the OP is a beginner: he is not used to Unix
> >> system administration and, even if you think that recompiling might be
> >> useful, it is typically not for the beginner.
>
> I totally agree! Alain, if you are reading this my post was
> not directed at you but the list. Actually, Alain, I noted
> that you originally installed both "httpd" (Apache I
> assume?) and PHP from source. I don't know if your box is
> live, or just being set up. But, if you are still having
> problems re-installing everything from RPM would definitely
> be a good place to start.
> 	The major issue is uninstalling Apache and PHP will be hard
> to impossible once they are installed from source. You can
> try "make uninstall" for both and see if this works, however
> I didn't see this as an option for PHP or Apache. Anyone
> else tried this?
>
> >> A last warning: installing things by hand and not by a regular package
> >> will make more work for the next upgrade. Recompiling and installing
> >> by hand may seem faster but it lays problems for yourself (or your
> >> colleagues) in the future.
>
> Again, I agree. It's _really_ painful to deal with
> source-installed software under Linux when you want to
> remove or upgrade in the future.
>
> OK, so your original question I've put below. I didn't want
> to go off on this tangent until I'd made it clear that there
> are some serious caveats to installing software outside of
> packaging systems under Linux, i.e. from source.
>
> > Can you give specific examples? Because I never had to recompile PHP
> > so I'm curious.
>
> I've installed RPMs for PHP under Fedora 2, 3 and 4. I was
> doing this for sights using LAMP configurations.
>
> I took detailed notes from one box where we needed PHP 4 and
> PHP 5 to run on the same box. The final configure looked
> like this:
>
> ./configure' '--enable-pic' '--with-bz3'
> '--with-kerberos=/usr/kerberos/' '--with-openssl'
> '--with-png' '--with-regex=system' '--with-zlib'
> '--enable-bcmath' '--enable-ftp' '--enable-magic-quotes'
> '--enable-track-vars' '--enable-trans-sid' '--enable-yp'
> '--with-pear=/usr/share/pear' '--with-mysql=shared,usr'
> '--enable-memory-limit' '--enable-calendar' '--enable-dbx'
> '--enable-dio' '--enable-mcal' '--with-mysql=/usr/lib/mysql'
> '--enable-bcmath' '--enable-force-cgi-redirect'
> '--prefix=/usr/local/php5'
>
> The differences from the RPM version were:
>
> Remove --with-apxs=DIR
> Add --enable-force-cgi=redirect
> Add --prefix=/usr/local/php5
> Add --with-mysql=/usr/lib/mysql
>
> Removing --with-apxs ensures that we did not install php5
> over php4 and that it installed as a CGI module. I did
> this so that we could test php5 alongside php4 for the
> moment.  The --prefix option makes sure that we did not
> overwrite php4 configuration files (we had a fairly
> specialized php.ini file). The --with-mysql option was
> required as php5 no longer includes(d) MySQL support unless
> you specify it explicitly.
>
> and, in the PHP Makefile itself we had to add:
>
> EXTRA_INCLUDES = -I/usr/kerberos/include/
>
> This was because OpenSSL complained that it could not find
> krb5.h header file. This was because Kerberos had placed all
> their include files in /usr/kerberos/include instead of the
> more standard (imho) /usr/include/kerberos directory.
>
> Note that some of these specific issues may have changed or
> been corrected since this was done. This is simply one example.
>
> On another box I had to add the
> "'--with-pear=/usr/share/pear'" switch for a php 4.x
> install. Other switches that can have a major impact on how
> your code interacts with your data include, but are not
> restricted to:
>
> '--with-regex=system'
> '--with-zlib'
> '--enable-bcmath'
> '--enable-ftp'
> '--enable-magic-quotes'
> '--enable-track-vars'
> '--enable-trans-sid'
>
> Some will, some won't want these enabled, etc., etc... and
> the switches change between PHP versions, vendors, distro
> versions, etc.
>
> One reason why I like FreeBSD source installs. You can
> specify stuff as needed, yet you can still uninstall
> reliably. But, MySQL plays so much nicer with Linux that if
> you need the speed, then you may feel compelled to choose
> LAMP over FAMP.
>
> Cheers,
> 	- Hervey

-- 
Noah.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
"Coffee does not make you nervous. your own inadequacies do that. 
Coffee merely increases your perception of your own inadequacies." --Rob 
Austein.



More information about the afnog mailing list