2012-02-09 14:03:19 +0000 2012-02-09 14:03:19 +0000

Antwoorden (6)

Oplossing gevonden!

Score 43
2012-02-09 14:23:34 +0000

Ik zou

dpkg --get-selections | grep apache

aanraden. Het geeft een lijst van alle geïnstalleerde pakketten die “apache” in hun naam bevatten. Bijvoorbeeld:

apache2 install
apache2-doc install
apache2-mpm-prefork install
apache2-utils install
apache2.2-bin install
apache2.2-common install
libapache2-mod-php5 install
libapache2-svn install

Het geeft aan dat het pakket apache2 geïnstalleerd is op het systeem.

Een andere aanpak, om elke draaiende HTTP daemon op de standaard poort te vinden, zou zijn:

sudo lsof -nPi | grep ":80 (LISTEN)"

Dat geeft iets aan als:

apache2 1026 root 4u IPv6 3739 0t0 TCP *:80 (LISTEN)
apache2 3966 www-data 4u IPv6 3739 0t0 TCP *:80 (LISTEN)
apache2 4014 www-data 4u IPv6 3739 0t0 TCP *:80 (LISTEN)
apache2 4015 www-data 4u IPv6 3739 0t0 TCP *:80 (LISTEN)
apache2 4016 www-data 4u IPv6 3739 0t0 TCP *:80 (LISTEN)
Advertisement
Score 12
2012-02-09 14:09:05 +0000

Probeer het which commando:

# which apache2

Mijn ervaring is dat de binary van Apache zich op de meeste installaties in /usr/sbin bevindt.

Advertisement
Score 4
2015-08-24 05:32:51 +0000
Advertisement

Om te controleren of apache draait of niet (de status), type:

sudo service apache2 status

op de opdrachtregel.

Score 3
2012-02-09 14:09:10 +0000

Zoals ik me herinner, is Mint gebaseerd op Ubuntu, dus zou je in staat moeten zijn om apt-cache policy apache2 te controleren:

$ apt-cache policy apache2
apache2:
  Installed: (none)
  Candidate: 2.2.20-1ubuntu1.1
  Version table:
     2.2.20-1ubuntu1.1 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu/ oneiric-security/main amd64 Packages
     2.2.20-1ubuntu1 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages

In dit geval, kunt u zien dat het niet geïnstalleerd is op mijn systeem. Als je niet gevraagd hebt om het te installeren, is het waarschijnlijk niet geïnstalleerd – ik betwijfel of het deel uitmaakt van de standaard distributie.

Advertisement
Score 0
2015-04-24 16:59:15 +0000
Advertisement

Als root kun je testen of apache draait onder de procesnaam httpd, apache, of apache2, met

ps -A | grep 'apache\|httpd'

Maar nogmaals, dit zal apache alleen vinden als het proces draait.

Score 0
2019-12-27 11:26:10 +0000

Probeer dit bash commando:

if [[-z $(apache2 -v 2>/dev/null)]] && [[-z $(httpd -v 2>/dev/null)]]; then echo "Apache not found"; fi