LinuxQuestions.org
Help answer threads with 0 replies.
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 11-12-2009, 11:20 PM   #1
TheYanster
LQ Newbie
 
Registered: Oct 2009
Posts: 16

Rep: Reputation: 0
Question 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?
 
Old 11-12-2009, 11:26 PM   #2
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
I like how you save the source for all ur programs to /src. I'm gonna start doing that.
 
Old 11-12-2009, 11:48 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
Quote:
Originally Posted by trist007 View Post
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.
 
Old 11-12-2009, 11:51 PM   #4
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
Quote:
Originally Posted by TheYanster View Post
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.
 
Old 11-12-2009, 11:52 PM   #5
trist007
Senior Member
 
Registered: May 2008
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 70
What's a good place to put all the READMEs, INSTALL notes and documentation?
 
Old 11-13-2009, 12:01 AM   #6
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,726

Rep: Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706Reputation: 1706
Thumbs up

Quote:
Originally Posted by trist007 View Post
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.
 
Old 11-13-2009, 12:11 AM   #7
TheYanster
LQ Newbie
 
Registered: Oct 2009
Posts: 16

Original Poster
Rep: Reputation: 0
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?
 
  


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
PHP question (newbie) matthewchin Programming 2 12-05-2005 10:46 PM
Newbie PHP question sleepisforwimps Programming 2 08-28-2005 05:06 AM
PHP recompiling ( without source ) TheSpy Slackware 2 02-21-2005 02:43 PM
PHP newbie question jacksmash Programming 20 11-22-2003 12:52 PM
recompiling php question j-ray Linux - Software 5 07-20-2002 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration