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
 
LinkBack Search this Thread
Old 08-22-2010, 01:47 PM   #1
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Rep: Reputation: 0
Build from source or Via Package Manager


Hiya!

I am very new to using Linux system. The distro that I am exposed to right now is Debian Lenny 32bits on a 256MB VPS which I intend to use it to host my personal website and php applications.

I am kinda of an optimization freak (Just love to see those low numbers on memory usages especially). Therefore I stumbled on a question in which I hope you guys could help to lead me towards the correct direction.

Right now, I am stuck on a decision whether to build the web server (Nginx) and PHP from source or installing it via the package manager in this case it would be apt-get.

From what I understand from building application from source, I will need to install the required libraries and gcc usually. Would gcc and the required libraries take up parts of the memory and performance issues (Especially in terms of memory)? As in after I have build the applications from source and rebooted, will those libraries and gcc "hinder" the memory usages or performance?

Pardon me for my weird fetish for memory numbers. =S
 
Old 08-22-2010, 02:08 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Hi there, welcome to LQ!

Whether you build a particular application from source yourself and install it, or you install it via the package manager, you ultimately end up with pretty much the same thing in the end - that is, the application will be installed. While there are *some* things you can *sometimes* optimize when compiling software on your own machine, rather than installing pre-built binaries, the software will still have the same dependencies in the end. So, you'll need those dependencies (shared libraries) on the system anyways when it comes time to fire up the software; and the dependencies (more specifically, the software application and the dependencies) will consume XXX amount of memory when running. Likewise, whether you compile, or install, your software, it will still consume about the same disk space once it's installed, assuming you remove (delete) the source code for the software after you've compiled it.

As for GCC, well, it gets used to compile the software (and consumes memory while doing so) but once your software is done being compiled & installed, GCC is out of the picture. That is to say, it's still installed, taking up disk space, but it isn't using any memory unless you're compiling something. You could remove GCC after you're done compiling, if you like, to save disk space.

Note: the above are general guidelines; I'm not too familiar with how a VPS is set up - so on a VPS, if merely having stuff installed on your VPS, whether the stuff is running or not (I'm talking disk space), is synonymous with memory consumption on the host machine, then it would seem clear that having less stuff installed, would equal less memory usage of the host machine. But to my understanding, this is not the case - whether a VPS, or a real machine, I would expect software that is not being used (like GCC), to be dormant on a disk somewhere, and not consuming memory anywhere.

I hope I've understood the question well, and that this clears things up for you.

Sasha
 
1 members found this post helpful.
Old 08-22-2010, 02:45 PM   #3
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Yup! You have cleared my question beautifully! Thanks to you, I have decided to try and install the applications I need from source. That way, I could be updated with the latest software versions without any dependencies. (One thing I hate about debian which I just realized, the softwares I installed via the package manager are pretty outdated (Especially Nginx). I will have to use other repositories like backports and others in order to keep up to date.)

Quote:
whether a VPS, or a real machine, I would expect software that is not being used (like GCC), to be dormant on a disk somewhere, and not consuming memory anywhere.
I think what you said above is quite right. An installed software that is not running, should not be consuming any memory.

An Offtopic by the way: If I have other questions, do I post a new topic or can I continue from here? Hehe. =D
 
Old 08-22-2010, 02:54 PM   #4
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Note that on binary-distributed distros, you'll need some basic stuff (not including dependencies you will require) in order to begin building stuff. For example, I don't use Ubuntu (a Debian derivative/relative) but on Ubuntu, if people want to start compiling stuff, you usually begin preparation by doing something like:
Code:
apt-get install build-essential
apt-get install devel
or something like that - which installs header files, the compiler, and things you commonly need before beginning building stuff. You may need to do something similar as preparation.

I don't quite understand this:
Quote:
I have decided to try and install the applications I need from source. That way, I could be updated with the latest software versions without any dependencies.
Sometimes, running the very latest versions of stuff, will require even more newer dependencies; and sometimes not. But whether you build older (stable) software, or newer (even bleeding edge) stuff, you still need the dependencies. Once you begin compiling something, you will discover soon enough if you're missing dependencies.

As for your next question, if it relates to this thread/topic, go ahead and ask it here. Otherwise, if this particular question is answered to your satisfaction, you can mark this thread [SOLVED] using the Thread Tools drop-down above your first post above, and open a new thread with your new question, assuming you've looked around a little and haven't found the answer you're looking for

Best regards!
Sasha
 
1 members found this post helpful.
Old 08-22-2010, 05:21 PM   #5
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Quote:
Sometimes, running the very latest versions of stuff, will require even more newer dependencies; and sometimes not. But whether you build older (stable) software, or newer (even bleeding edge) stuff, you still need the dependencies. Once you begin compiling something, you will discover soon enough if you're missing dependencies.
Ahhh! I totally forgot about that. But I guess I can live with the latest version of the softwares though it may come with a price of a heavier memory load (Hopefully the newer versions doesnt add that much load =S).

And by the means of dependencies in my above post, I meant that I need not rely or wait for the others to update the softwares on their repositories. Thus removing the dependency of that.

I guess I will open up a new thread for the other questions. They are not really related to this topic anyway.

Thank you for replying back with such awesome answers that fast!
 
Old 08-22-2010, 05:44 PM   #6
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542Reputation: 542
Quote:
Originally Posted by Greedyh4mster View Post
And by the means of dependencies in my above post, I meant that I need not rely or wait for the others to update the softwares on their repositories. Thus removing the dependency of that.
Yes, that's correct - you can for a while anyways get ahead of the repos as for certain versions of packages or other tools, dependencies, etc. However, you can also sometimes find that a version of something that is too new, will also give you problems! LOL, there's a catch either way.

I tend to try the newest versions of stuff first, and not necessarily wait for my distro to ship the new version. Most times, this works out fine, and otherwise I'd be waiting a long time for this version to ship with my distro.
But, in some cases, the newest-fangled version is too new for too many other packages that depend on it, so a slight downgrade is necessary.

Certain groups of items that are shipped with distros, are all built & tested as a group, with certain versions known to work well together; so you can introduce weirdness if you take one or more parts of the group and make them an extremely different version.

Again, this is something you will discover if/when/as it happens, so if you want to try the most newest stuff, go ahead.

Good luck with your project!

Sasha
 
1 members found this post helpful.
Old 08-22-2010, 11:36 PM   #7
Greedyh4mster
LQ Newbie
 
Registered: Aug 2010
Posts: 11

Original Poster
Rep: Reputation: 0
No doubt. Newer versions could introduce several more compatibility issues. What inspired me to start building from source is actually when I am installing the web server (Nginx). The version from the main repository was like 0.6.X whereas the stable version as listed in their website was like 0.7.67. Although they are of 2 different build like one is from the legacy stable and the other the stable build.

I was thinking like since I am hosting for a web, it is critical to have always the latest version from those stable builds. While since it is of the stable build, I can also put my mind to ease since there will be plenty who are running the same version as me; Help should be relatively easy as compared to using those of a legacy build.

And besides building from source will means I can tailor the application to my needs; Enabling or disabling those modules which I dont need. And like you said; I will be able to downgrade or upgrade as and when I like (Although I really need to learn how to downgrade). More control. =D
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 5 (After installing each package, delete its source and build directories) brayden516 Linux From Scratch 2 04-17-2008 11:50 AM
Possible to build deb package from source files? davidas Debian 9 12-09-2006 06:27 PM
Package manager/compile from source doowttam Linux - Newbie 3 07-07-2006 01:44 AM
Poll: Yast Package Manager vs. Smart Package Manager in 10.1 agentchange Suse/Novell 6 06-02-2006 08:29 AM
Package Manager stuck on source lhoff Linux - Newbie 0 12-30-2001 06:51 PM


All times are GMT -5. The time now is 12:28 PM.

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