# two comments: apache/php and ssl and backup solutions

## perryme

Hi all-

Been enjoying things quite  a bit with gentoo so I had started thinking about migrating my personal webserver over to it.  I use a few php applications for work and play (phpgroupware, gallery, etc) and I also use mysql for some stuff .  I check out emerge --pretend apache mod_ssl, php. Whew!  On a server with no X installed (why have X BTW?), these three applications require all three of the binaries for X, kde, and a bunch of other stuff.  Here is my emerge --pretend:

root@server portage # emerge --pretend net-www/apache dev-lang/php net-www/mod_ssl

These are the packages that I would merge, in order.

Calculating dependencies ...done!

[ebuild  N   ] dev-libs/mm-1.1.3-r1 to /

[ebuild  N   ] dev-libs/expat-1.95.2 to /

[ebuild  N   ] net-www/apache-1.3.24-r2 to /

[ebuild  N   ] dev-java/java-config-0.2.4 to /

[ebuild  N   ] dev-java/blackdown-jdk-1.3.1-r5 to /

[ebuild  N   ] media-libs/pdflib-4.0.1-r3 to /

[ebuild  N   ] app-crypt/mhash-0.8.9 to /

[ebuild  N   ] x11-base/xfree-4.2.0-r9 to /

[ebuild  N   ] media-libs/libungif-4.1.0-r1 to /

[ebuild  N   ] media-libs/lcms-1.08 to /

[ebuild  N   ] media-libs/giflib-4.1.0-r3 to /

[ebuild  N   ] media-libs/libmng-1.0.3 to /

[ebuild  N   ] x11-libs/qt-3.0.4.1 to /

[ebuild  N   ] dev-libs/gmp-3.1.1-r1 to /

[ebuild  N   ] media-libs/freetype-1.3.1-r3 to /

[ebuild  N   ] media-libs/libgd-1.8.3-r5 to /

[ebuild  N   ] dev-libs/libmcrypt-2.4.19-r1 to /

[ebuild  N   ] x11-libs/qt-2.3.2-r1 to /

[ebuild  N   ] dev-libs/libxml2-2.4.21 to /

[ebuild  N   ] media-libs/t1lib-1.3.1 to /

[ebuild  N   ] net-libs/libwww-5.3.2-r1 to /

[ebuild  N   ] dev-lang/php-4.2.1-r1 to /

[ebuild  N   ] net-www/mod_ssl-2.8.8-r1 to /

This seems like a lot of stuff to get apache and php working for some reason.  Why do I need X and QT?  This box is only a server.  No X.  Its also headless.  I ssh to it except for doing the gentoo install on it.

Secondarily, does anyone have any backup scripts or a reference they could point me to?  I have used amanda for a long time and really like it.  I am now using a script to backup to my ecrix VXA-1 primariily for some shared directories (samba shares) and music plus /etc, etc...

Thanks!

Mike

----------

## lamer

Well X is required by java. So try this

USE="-java" emerge --pretend apache.

That will take out X for sure.

----------

## perryme

Thanks for the information.  I can see how to get rid of X.  What about the two rather large qt libs?  Still seems like a lot when you consider that the box that apache is going on would never run a QT application or even an x-based one. 

A better scenario would seem to me to remove the deps for QT and X and allow someone to add Java as needed.  Does emerge have suggested packages as well as required ones?  Kind of like deb packages?  It would be nice to see an output which would list the packages required; then list the ones which would be "nice" to have  :Smile: .  One could then decide whether Java was really required or not or see that IF java were included that X would then be required as a secondary dependency.

----------

## lamer

do an emerge --pretend on each of the apps listed there untill you narrow down where the qt depends come from. Also add the following to your USE in /etc/make.conf

"-qt -kde -gnome"  and whatever else you don't really need. See the USE howto in the documentation section of gentoo.org for more info.

----------

## perryme

Thanks!

Here is what I ended up with:

/etc/make.conf

USE="-java -kde -qt -gnome -X"

root@server portage # emerge --pretend net-www/apache dev-lang/php net-www/mod_ssl

These are the packages that I would merge, in order.

Calculating dependencies ...done!

[ebuild  N   ] dev-libs/mm-1.1.3-r1 to /

[ebuild  N   ] dev-libs/expat-1.95.2 to /

[ebuild  N   ] net-www/apache-1.3.24-r2 to /

[ebuild  N   ] media-libs/pdflib-4.0.1-r3 to /

[ebuild  N   ] app-crypt/mhash-0.8.9 to /

[ebuild  N   ] net-libs/libwww-5.3.2-r1 to /

[ebuild  N   ] media-libs/freetype-1.3.1-r3 to /

[ebuild  N   ] dev-libs/gmp-3.1.1-r1 to /

[ebuild  N   ] dev-libs/libxml2-2.4.21 to /

[ebuild  N   ] media-libs/t1lib-1.3.1 to /

[ebuild  N   ] media-libs/libgd-1.8.3-r5 to /

[ebuild  N   ] dev-libs/libmcrypt-2.4.19-r1 to /

[ebuild  N   ] dev-lang/php-4.2.1-r1 to /

[ebuild  N   ] net-www/mod_ssl-2.8.8-r1 to /

Now the big and unneeded stuff is gone from the dependency list!

Mike

----------

## lamer

Hrm... wonder if we need to make some notes in the docs that say "If you're running a server only box, add this to your USE"

----------

## wizy

That would be a great idea.

----------

## mikulus

I agree. This should be part of documentation since not all Gentoo users run X and related apps. I searched all over on how to disable this until a found this post.

----------

## klieber

 *lamer wrote:*   

> Hrm... wonder if we need to make some notes in the docs that say "If you're running a server only box, add this to your USE"

 

It's not that simple.  PHP can be compiled with GTK support to enable things like drawing graphics, etc.  It can also use true-type font support for creating text on graphics.  Those are two examples -- there are hundreds more.  There's a lot of reasons why libraries normally used for X/GUI related stuff are required for a server.  Instructing folks new to gentoo to blindly put items in their USE settings because their box is a "server" is, IMO, doing them a disservice.

If people would read the documentation (novel concept, I know) then all (or at least most of) their questions would be answered, including how to use USE variables to tailor their system.

--kurt

----------

