I have 2 variations of apache working on Ubuntu, just how can I remove one?

I mounted apache on ubuntu by doing the adhering to :

sudo -i
cd /usr/local/src
wget http://apache.mirrors.tds.net/httpd/httpd-2.2.11.tar.gz
tar -xvf httpd-2.2.11.tar.gz
cd httpd-2.11.9
./configure --enable-layout=Debian --enable-deflate --enable-proxy --enable-proxy-html --enable-proxy-http --enable-proxy-balancer --enable-rewrite --enable-cache --enable-mem-cache --enable-ssl --enable-headers --enable-mods-shared=most
make install

Then I mounted php5 by doing the adhering to :

sudo apt-get install php5

Now I have 2 variations of apache :

[email protected]/etc/apache2 $ apachectl -v       
Server version: Apache/2.2.11 (Unix)
Server built:   May 26 2009 21:57:13
  [email protected]/etc/apache2 $ apache2ctl -v
Server version: Apache/2.2.8 (Ubuntu)
Server built:   Mar 10 2009 18:09:51

I attempted proper - get remove, proper - get autoremove, etc They all still leave traces of apache. I clearly just desire one variation of apache running ...yet I am additionally not exactly sure which ...would certainly it be ideal to run Apache/2.2.8 (Ubuntu)? No matter, just how can I remove the various other variation?

It is not noticeable just how to install php5 without apache ... which I assume is insane.

Many thanks!

2019-12-02 02:54:16
Source Share
Answers: 5

Look for the httpd documents.

In several linux systems its situated below :

/ etc/rc. d/init. d/httpd

Try editing and enhancing that documents and also seeing if you are launching 2 variations of the apache http daemon. Delete the lines beginning the one you do not desire.

2019-12-03 04:24:16

When doing 'make install' you possibly mounted an apache constructed from resource in directory sites which need to be taken care of by the circulation.

If you are fortunate apache has a 'make uninstall' which needs to remove all the documents it mounted. Or else, do a make install once more and also log the result to examine which files/directories it mounted, and also remove those. After you are done, re - install the apache provided by Ubuntu (proper - get install - - reinstall) as several of its documents might have been removed.

Next time, see to it to install it someplace which isn't taken care of by the circulation :

./ set up - - prefix =/ usr/local

Or also far better "./ set up - - prefix =/ opt/apache - 2.2.11 " and also create symlinks where you require them.

It is not noticeable just how to install php5 without apache ... which I assume is insane.

The Ubuntu provided PHP has actually been assembled versus and also examined with the Ubuntu provided apache. If you install a various apache on your own, you will certainly additionally need to install php on your own.

If you intend to make use of the Ubuntu provided PHP with a apache assembled with a little various alternatives, check into constructing an Ubuntu plan from resource (proper - get resource is a beginning factor).

2019-12-03 00:41:31

warpr clarified why you have 2 apache installs. Commonly, when you are making use of a plan - centered circulation you need to seek a packaged variation prior to you install anything from resource.

I would not claim you can not make use of the packaged php5 with an assembled apache, yet unless you have an excellent well-known factor, make use of the plan. It'll conserve you energy and time.

When it comes to why apache was instantly mounted :

from " capacity show php5 " :

This package is a metapackage that, when installed, guarantees that you have at
 least one of the three server-side versions of the PHP5 interpreter installed.

Depends: libapache2-mod-php5 (>= 5.2.6.dfsg.1-3ubuntu4.1) |
         libapache2-mod-php5filter (>= 5.2.6.dfsg.1-3ubuntu4.1) | php5-cgi (>=
         5.2.6.dfsg.1-3ubuntu4.1), php5-common (>= 5.2.6.dfsg.1-3ubuntu4.1)

So what taken place is Ubuntu mounted one of the most usual PHP interpreter, libapache2 - mod - php5, which subsequently drew in apache, and more.

If you intend to install php without mounting apache, you can install php5 - cgi, which you can after that make use of with various other http web servers. One means to do this would certainly be :

sudo proper - get install php5 - cgi php5

which would certainly make use of php5 - cgi as the depends for the php5 plan.

2019-12-03 00:38:54

I do not see an excellent factor offered why you would certainly compile your very own apache. One excellent factor to refrain this is that it makes upkeep a whole lot harder. Security patching is seriously when you need to compile 5 various items of software program to spot. Which is intending you in fact find out about the security susceptability. This is why we make use of plans and also the Ubuntu provided apache in this instance.

So, remembering that you possibly should not do this, there is one method no one has actually stated. If you actually actually intend to utilize your very own assembled apache with various other Ubuntu plans, make use of the "equivs" plan. From the summary :

Another usage is to prevent dependence monitoring. If a plan P is not mounted on the system, plans that rely on P can not generally be mounted. Nonetheless, if capability matching to P is recognized to be mounted, this device can be made use of to fool the Debian plan monitoring system right into thinking that plan P is in fact mounted. KEEP IN MIND : this need to be taken into consideration an unrefined hack to function around unpleasant scenarios, not a regular remedy. If you make use of equivs to function around pests in various other Debian plans, you need to additionally submit bug records versus those plans.
2019-12-03 00:34:23

The first point to be knowledgeable about is that you really did not simply install 2 circumstances of apache, you in fact made use of 2 various installation devices - one by assembling, the various other by utilizing the resident dpkg (called using proper) device.

Neither method is extra (or much less) legitimate than the various other, and also, one can not unconditionally state you need to make use of just one method ; yet you've currently recognized the first concern with making use of 2 various devices - your plan supervisor (dpkg) does not recognize anything concerning your hand - assembled installation.

The factor you wound up with a variation of apache from the proper - get install php5, is that constructed right into the php5 plan is a variety of dependences. You can quiz the product packaging data source for the dependences with dpkg - question :

# dpkg-query -W -f='${Package} ${Version}\t${Maintainer}\n${Depends}\n' php5

php5 5.2.4-2ubuntu5.6   Ubuntu Core Developers <[email protected]>
libapache2-mod-php5 (>= 5.2.4-2ubuntu5.6) | php5-cgi (>= 5.2.4-2ubuntu5.6), 
  php5-common (>= 5.2.4-2ubuntu5.6)

You'll see a link to libapache2 - mod - php5 , which subsequently referrals the apache that was mounted.

Regarding elimination - proper - get remove apache2 will certainly remove the variation of apache2 mounted by the plan supervisor, yet it will certainly not touch (neither would certainly you desire it to) submits that have actually been by hand included - those will certainly need your mindful examination and also evaluation of the system.

If you are fortunate, the make documents that did the install when you keyed in make install

additionally has a make remove

In the instance of apache2/httpd - you do not have that deluxe, yet that is a rather tidy install, as installs go, so you need to have the ability to recognize the directory site that you mounted in, and also an

rm - rf/ usr/local/apache2 (or any place you mounted apache)

needs to remove most documents positioned onto your system.

If you do not have a tidy install - you'll require to look for the documents that were mounted on your system.

One regular means of establishing what has actually been included in your system after an installation done by hand (benefit every little thing, not simply autoconfig mounts) is to run the command :

locate/ - cmin - 2 2 >/ dev/null | egrep - v '^ (/ proc |/ sys)'

You can after that make use of the result of that command to give you with a checklist of documents that need to be taken into consideration for elimination.

I understand this isn't a soup - nuts lead to eliminating what has actually been positioned on your system, yet the obstacles you are experiencing are specifically why individuals function so awkward plan supervisors to handle their system (which, along with tidy adding/removing of documents, additionally gives a variety of various other valuable advantages, such as binary - confirmation to see if anything has actually been changed)

2019-12-03 00:32:47