LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Newbie question about recompiling PHP from source (https://www.linuxquestions.org/questions/linux-newbie-8/newbie-question-about-recompiling-php-from-source-768818/)

TheYanster 11-12-2009 10:20 PM

Newbie question about recompiling PHP from source
 
I upgraded PHP on my server recently and had to recompile it several times because I kept forgetting to include some packages.

I always keep my source files in /src/[package-name] and so far, I have run "make clean" before running "./configure" every time. Is this necessary?

Also, let's say in a month, I want to add just one package and don't want to load it dynamically. What's the best way to do it? Can I just do a "./configure" using the same options I used before plus the new one, and then "make && make install" over the installed version?

trist007 11-12-2009 10:26 PM

I like how you save the source for all ur programs to /src. I'm gonna start doing that.

evo2 11-12-2009 10:48 PM

Quote:

Originally Posted by trist007 (Post 3755090)
I like how you save the source for all ur programs to /src. I'm gonna start doing that.

That is what /usr/local/src is for.

Evo2.

evo2 11-12-2009 10:51 PM

Quote:

Originally Posted by TheYanster (Post 3755086)
I upgraded PHP on my server recently and had to recompile it several times because I kept forgetting to include some packages.

I always keep my source files in /src/[package-name] and so far, I have run "make clean" before running "./configure" every time. Is this necessary?

It depends on how well the build system is set up. I usually assume the worst and do a make clean. However for some software, even that is not enough and it's safest to start with a pristine tarball.

Quote:

Also, let's say in a month, I want to add just one package and don't want to load it dynamically. What's the best way to do it? Can I just do a "./configure" using the same options I used before plus the new one, and then "make && make install" over the installed version?
Again depends on how good the build system is. Try and see!

Evo2.

trist007 11-12-2009 10:52 PM

What's a good place to put all the READMEs, INSTALL notes and documentation?

evo2 11-12-2009 11:01 PM

Quote:

Originally Posted by trist007 (Post 3755106)
What's a good place to put all the READMEs, INSTALL notes and documentation?

I have a directory called ~/doc/mydoc/ which is full of notes that I've made over the years.

For sofware I usually make a directory in /usr/local/src for each software package, and then a separate subdirectory for each version. You could put all your notes that are specific to the installation of that piece of software in there too.

Anyway, shouldn't hijack this thread.

Cheers,

Evo2.

TheYanster 11-12-2009 11:11 PM

I have moved my sources to /usr/local/src as suggested. I didn't know about that directory.

Thanks for all the info, it's been really helpful!

One more question: I've noticed that config.log sometimes didn't log the configure options you used for your compile. Is this normal or should I always echo the config options to a file somewhere as a best practice?


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