How do I uninstall apache2 installed in the wrong folder on Solaris

Posted on 2009-02-24
Last Modified: 2013-12-27
I am a unix newbie and recently installed apache2 in the /etc folder on a solaris machine when I should have installed in in /opt. I installed from a binary distribution.

Now I need to uninstall it and reinstall it in the /etc folder.

Basically all I did was

where APACHE_HOME = /etc/apache2

Is it ok to just delete the apache2 folder. I didn't do anything else.

Thank you in advance.
Question by:theOctopus
    LVL 40

    Expert Comment

    how it was installed ? was it a solaris package? if yes then you may delete it wilth pkgrm command

    Author Comment

    Yes. it was a Solaris specific package: httpd-2.0.55-sparc-sun-solaris2.8.tar.gz

    How would I remove it?
    LVL 40

    Expert Comment

    this is a tar file and is not a package? can you describe installation steps?

    Author Comment

    OR is it ok for it to be installed in /etc/apache2

    It says it is online when I run svcs -l apache2

    Author Comment

    1. I downloaded the tar.gz file.
    2. Unzipped it locally.
    3. Uploaded to the server.
    4. Ran the
    5. cp /etc/apache2/httpd.conf-example /etc/apache2/httpd.conf
    6. svcadm enable apache2

    And it says it is online...
    LVL 40

    Accepted Solution

    /etc is for system files (by convention) and it is better to not install any s/w in it. You may try moving apatche2 dir to /opt and see if it is ok:

    mv /etc/apatche2 /opt

    If you really wants to delete / uninstall it then try

    cd /etc
    rm -rf apache2 (please make sure you don't have any files in apache2 dir that you need)

    You may also describe the steps you did to get it installed so I may give better procedure

    Author Comment

    I think I will just leave it inside /etc

    It should not be a problem.

    Thank you for the procedure though.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
    Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap ( Version 1.2 2.      Jpcap( Version 0.6 Prerequisite: 1.      GCC …
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now