LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-23-2010, 05:12 PM   #1
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Rep: Reputation: 0
Question Building from source (PHP and MySQL)


Hiya!

I am trying to build minimal php and mysql binaries. While doing so, I realize that there is no documentaries to state whether does compiling straight from the source without any configurations options set, ensure an optimized yet minimal build?

I am trying out for my own personal website which will be powered by Wordpress 3. The previous method I used was using the package manager: "apt-get install php-cgi php5-cgi php5-cli php5-mysql mysqld mysql-server mysql mysql-client"

I am trying out to mimic the binaries installed by the package manager through building from the sources instead. How do I know what configuration options did those repositories developers used? Is there any special configuration options used for those minimal yet optimized binaries?

Does doing the following ensure a minimal build?:
1) ./configure
2) make
3) install

I figured since I did not use any configuration options, therefore it should be a minimal build right (Meaning the bare-bones)?

Would be pleased if someone can guide me towards the correct direction. =D
 
Old 08-23-2010, 08:57 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,337
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
Quote:
Originally Posted by Greedyh4mster View Post
Does doing the following ensure a minimal build?:
1) ./configure
2) make
3) install
I used the LAMPP stack for the last three years before putting my site out on a hosting service, so it's been a while, but no.

From the dim recesses of my memory when I installed everything manually five years ago, I think that that will install apache and mysql just fine, but when you install php, you have to tell it where to find the server and the database engine, so the install string has to include that information.

I remember hunting around and finding a php install command that I could adapt to my system (mostly by verifying the path statements) that took up a line and a half on my monitor.

An alternative might be to use lampp. I used it for quite a while and never had a security problem. I also keep my firewalls, both software and hardware, screwed down tight.

If you do actually point it to the internet, be sure to run the lampp security script because, by default, it installs with no password protection. An explanation of the script is about halfway down this page.
 
Old 08-24-2010, 06:56 AM   #3
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
I dont think I will install through a lamp stack since in the very first place I dont want to be dependable on external sources for php and mysql. Thats why I chose the building from source route. If not I would use the package manager alternative. It also serve as an opportunity for me to learn how to build them from scratch.

Anyway, I found out that to build a minimal php with little extensions; I will have to use the --disable-all configure options. If not by default the php will build the standard extensions. At least thats what I think I figured it out. =S As for mysql, I do not have the a single idea about it.

Surprisingly, I find that Nginx has a more complete documentation on those standard modules that are loaded when you are installing from source without any configure options. I cant seems to find any sources on what are the default extensions that are loaded with the pure default php source build. Applies to mysql too.

Another question:

If I am to reconfigure my source build; Can I just run the following at the source directory?:

./configure
make
install

It will overwrite the existing files and configuration if there is any right?
 
Old 08-25-2010, 07:04 AM   #4
gazolinia
LQ Newbie
 
Registered: Mar 2010
Posts: 7

Rep: Reputation: 0
More or less I am in your same state. I also want to minimalize my php and mysql install but still I didnt start . I guess you need php to connect to mysql server, If that is the case simple ./configure wont be enough by default the mysql_extension is not enabled .You need to install the lib-mysql and give its path to ./configure .
 
Old 08-25-2010, 08:48 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,337
Blog Entries: 28

Rep: Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144Reputation: 6144
I found this. Hope it helps. It addresses apache, mysql, and php on Suse Linux, but it looks pretty generic.

http://laffers.net/howtos/howto-install-mysql

I also stumbled over some nice tutorials on YouTube. Search for "php" or "mysql." There's a lot of repetition and a lot of stuff that is Windows and Mac oriented, but a little patience turns up some useful stuff.
 
  


Reply



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
Building a table to display from user input: PHP, MySQL deesto Programming 11 06-11-2008 05:25 PM
Compiling Apache, PHP and MySQL from source. Phr34Ck Linux - Software 6 02-29-2008 06:05 AM
php rpm with mysql source toraghun Red Hat 3 01-06-2007 08:50 PM
Building PHP when MySQL is on a separate box Risc91 Linux - Software 3 03-15-2006 04:11 PM
building PHP 4.3.4-11 from source michaelbhahn Linux - Software 0 09-21-2004 05:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:22 PM.

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