0

I need help to remove httpd that I built from source ball, the instructions for installation are written from this blog

yum remove can't delete installed httpd but httpd -v command still showed that httpd still exist on my server

[root@localhost httpd-2.4.28]# httpd -v
Server version: Apache/2.4.28 (Unix)
Server built:   Aug 15 2021 09:21:05`

After doing some google search, I read I need to delete manually added folder and files

[root@linuxhelp1 httpd-2.4.28]# make install
Making install in srclib
make[1]: Entering directory `/root/httpd-2.4.28/srclib' 
Making install in apr
make[2]: Entering directory `/root/httpd-2.4.28/srclib/apr' 
make[3]: Entering directory `/root/httpd-2.4.28/srclib/apr' 
make[3]: Nothing to be done for `local-all' .
make[3]: Leaving directory `/root/httpd-2.4.28/srclib/apr' 
/root/httpd-2.4.28/srclib/apr/build/mkdir.sh /usr/local/apache2/lib /usr/local/apache2/bin /usr/local/apache2/build 
         /usr/local/apache2/lib/pkgconfig /usr/local/apache2/include
mkdir /usr/local/apache2
mkdir /usr/local/apache2/lib
mkdir /usr/local/apache2/bin
mkdir /usr/local/apache2/build
mkdir /usr/local/apache2/lib/pkgconfig
mkdir /usr/local/apache2/include
mkdir /usr/local/apache2/manual
make[1]: Leaving directory `/root/httpd-2.4.28

I did make uninstall but it doenst work, should I delete all of this folder and everything in it?

/usr/local/apache2/lib 
/usr/local/apache2/bin 
/usr/local/apache2/build 
/usr/local/apache2/lib/pkgconfig 
/usr/local/apache2/include
/usr/local/apache2
/usr/local/apache2/lib
/usr/local/apache2/bin
/usr/local/apache2/build
/usr/local/apache2/lib/pkgconfig
/usr/local/apache2/include
/usr/local/apache2/manual
2

Short answer:

It's safe to delete the directory /usr/local/apache2. This should remove the version of httpd that you installed. You can verify by checking to see if httpd is installed after you remove that directory.

Slightly longer answer:

To manually uninstall in *nix, simply remove the files from their installed location. This was set when you configured httpd with this command from the linked blogpost:

[root@linuxhelp1 httpd-2.4.28]# ./configure --enable-ssl --enable-so --with-mpm=event --with-included-apr --prefix=/usr/local/apache2

Note that yum remove won't work because the version of httpd you installed is not visible to yum which works with the local rpm database.

You can verify that the version of httpd you are seeing from the command line is the one in /usr/local/apache2 by running which httpd before removing the directory.

You may also want to see if the apache2 install is referred to anywhere in /etc by running:

egrep -R -- "/usr/local/apache2" /etc/

2
  • thank you jmw .. one more thing, is it possible to replicate the latest httpd path with this guidepost? www dir at /var/www/html , not at /usr/local/apache2 ?
    – Britt Well
    Aug 15 at 8:13
  • Hi Britt, You can set the directory for www in your httpd.conf, I would suggest looking at the docs for DocRoot.
    – jmw
    Aug 15 at 8:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.