Return-Path: X-Original-To: apmail-httpd-users-archive@www.apache.org Delivered-To: apmail-httpd-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 247CE17427 for ; Wed, 1 Apr 2015 15:36:05 +0000 (UTC) Received: (qmail 9115 invoked by uid 500); 1 Apr 2015 15:35:50 -0000 Delivered-To: apmail-httpd-users-archive@httpd.apache.org Received: (qmail 9085 invoked by uid 500); 1 Apr 2015 15:35:50 -0000 Mailing-List: contact users-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: users@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@httpd.apache.org Received: (qmail 9030 invoked by uid 99); 1 Apr 2015 15:35:50 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 15:35:50 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mike.rumph@oracle.com designates 141.146.126.69 as permitted sender) Received: from [141.146.126.69] (HELO aserp1040.oracle.com) (141.146.126.69) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Apr 2015 15:35:44 +0000 Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t31FYMfS005637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 Apr 2015 15:34:23 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.13.8/8.13.8) with ESMTP id t31FYMxD006563 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 1 Apr 2015 15:34:22 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.13.8/8.13.8) with ESMTP id t31FYLSR015009 for ; Wed, 1 Apr 2015 15:34:21 GMT Received: from [10.132.185.88] (/10.132.185.88) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 01 Apr 2015 08:34:21 -0700 Message-ID: <551C0FF5.3040906@oracle.com> Date: Wed, 01 Apr 2015 08:34:13 -0700 From: Mike Rumph Organization: Oracle Corporation User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: users@httpd.apache.org References: <551ACE54.5010800@oracle.com> <551B37FC.3040507@oracle.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------070509000206000509060707" X-Source-IP: aserv0022.oracle.com [141.146.126.234] X-Virus-Checked: Checked by ClamAV on apache.org Subject: Re: [users@httpd] sudo: apachectl: command not found --------------070509000206000509060707 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Hello Padmahas, For Apache httpd there is no make uninstall, but there is a make clean, make distclean and make extraclean. You could try setting up a separate Apache httpd installation inside your home directory with the following instructions: - cd to your Apache httpd source directory - $ make clean - $ ./configure --prefix=/home/(your userid)/apache2 - $ make - $ make install - $ cd /home/(your userid)/apache2 - $ bin/apachectl -V - $ bin/apachectl start - $ ps -ef | grep -i httpd For more complete instructions see http://httpd.apache.org/docs/2.4/install.html#configure . Take care, Mike Rumph On 3/31/2015 8:56 PM, Padmahas Bn wrote: > Hello mike, > > I would like to clarify one thing. Whatever the apache related command > I execute inside /usr/local/apache2/bin, it all affecting the apache > inside /usr. The exact reason may be because I installed apache inside > /usr at first and only later I installed in "usr/local...." > > Hence if you want exact result of the *sudo > /usr/local/apache2/bin/apachectl -V, *please tell me how to explicitly > specify the path as you suggested me in the last command using -f > option(*sudo /usr/local/apache2/bin/apachectl -k start > -f**/usr/local/apache2/conf/httpd.conf )*. > > So tell me if apache configures any environment variables and it may > not overwriting the path when I install second time inside /usr/local.... > > The steps I used to install apache2 > To install apr and apr-util I followed this link > (http://www.linuxfromscratch.org/blfs/view/svn/general/apr.html). This > is where I came to know about --prefix option and I used "/usr" from > this tutorial. But irrespective of using /usr as --prefix, apr > installed inside /usr/local. > > Hence I used the same option for apache2 like this. ./configure > --prefix=/usr > Unfortunately apache2 was installed in the exact location inside /usr, > by merging its files inside bin. > > > Later I read in apache documentation, if --prefix not specified it > will install inside /usr/local... so I thought it would be easy if all > apache files is available inside one directory (apache2) which will be > created by server. This time I just ran ./configure. And you know the > later part. > > Two installations are conflicting with each other. Only the first > installation is valid and the second is not even executing server > start command. > > So is there any way I can completely uninstall apache? something > similar to "make uninstall". "make uninstall" is not working I don't > know why. > > On Wed, Apr 1, 2015 at 5:42 AM, Mike Rumph > wrote: > > Hello Padmahas, > > Okay. This tells us a few things. > One problem is that the HTTPD_ROOT is set to /usr instead of > /usr/local/apache2. > Other relative paths will be based from here. > Since the SERVER_CONFIG_FILE is set to conf/httpd.conf, > the default config file will be /usr/conf/httpd.conf instead of > /usr/local/apache2/conf/httpd.conf. > The -f switch allowed you to override this. > > What steps did you use to install and configure httpd into > /usr/local/apache2? > In your httpd source directory, what are the contents of the > config.nice file? > > You could review the following links: > - http://httpd.apache.org/docs/2.4/install.html#configure > - http://httpd.apache.org/docs/2.4/programs/configure.html > > Take care, > > Mike > > > On 3/31/2015 4:19 PM, Padmahas Bn wrote: >> Hello mike, >> >> Yes you are write I installed server first inside /usr and then >> inside /usr/local/apache2 (installed by default when I used >> ./configure without --prefix option). Even you are right about my >> manual un installation. >> >> About the command you suggested with -V option, this is the result. >> >> Server version: Apache/2.4.12 (Unix) >> Server built: Mar 31 2015 16:20:21 >> Server's Module Magic Number: 20120211:41 >> Server loaded: APR 1.5.1, APR-UTIL 1.5.4 >> Compiled using: APR 1.5.1, APR-UTIL 1.5.4 >> Architecture: 64-bit >> Server MPM: event >> threaded: yes (fixed thread count) >> forked: yes (variable process count) >> Server compiled with.... >> -D APR_HAS_SENDFILE >> -D APR_HAS_MMAP >> -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) >> -D APR_USE_SYSVSEM_SERIALIZE >> -D APR_USE_PTHREAD_SERIALIZE >> -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT >> -D APR_HAS_OTHER_CHILD >> -D AP_HAVE_RELIABLE_PIPED_LOGS >> -D DYNAMIC_MODULE_LIMIT=256 >> -D HTTPD_ROOT="/usr" >> -D SUEXEC_BIN="/usr/bin/suexec" >> -D DEFAULT_PIDLOG="logs/httpd.pid" >> -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" >> -D DEFAULT_ERRORLOG="logs/error_log" >> -D AP_TYPES_CONFIG_FILE="conf/mime.types" >> -D SERVER_CONFIG_FILE="conf/httpd.conf" >> >> I looked inside /usr/local/apache2/bin/apachectl, the HTTPD var >> set to >> *HTTPD='/usr/local/apache2/bin/httpd' >> >> * >> In parallel I also looked inside /usr/bin/apacheclt, there the >> HTTPD var set to >> >> HTTPD='/usr/bin/httpd'. So I assume both of them pointing to >> their respective directories. >> >> I tried the second command you suggested >> *sudo /usr/local/apache2/bin/apachectl -k start >> -f**/usr/local/apache2/conf/httpd.conf >> * >> >> Good news The server started with usual warning message but >> Yes!!! it is using the httpd.conf file which resides inside >> /usr/local/apache2/conf/httpd.conf. >> The message it always show is, >> AH00558: httpd: Could not reliably determine the server's fully >> qualified domain name, using 127.0.1.1. Set the 'ServerName' >> directive globally to suppress this message >> >> *Now is there any way I can set apache to look inside >> */usr/local/apache2/conf/httpd.conf*by default, by forgetting the >> first installation inside /usr? Or should I always specify the >> httpd.conf path as you suggested? >> >> * >> Thank you for the documentation links, I'm referring those links now. >> >> On Tue, Mar 31, 2015 at 10:11 PM, Mike Rumph >> > wrote: >> >> Hello Padmahas, >> >> It looks like your two installations of Apache httpd 2.4 are >> conflicting with each other. >> If I understand correctly, you first installed into /user and >> then into /usr/local/apache2. >> Then you tried to remove the /user installation by deleting >> files manually. >> (As you've seen, /user is not a good choice, because this is >> used for many other things as well.) >> It would probably help to do a fresh installation. >> But let's try a few things first. >> >> When tried *" sudo /usr/local/apache2/bin/apachectl -k start "* >> It gave " *httpd: Could not open configuration file >> /usr/conf/httpd.conf: No such file or directory ".* >> You are probably wanting to use >> /usr/local/apache2/conf/httpd.conf instead. >> >> What results do you get from *sudo >> /usr/local/apache2/bin/apachectl -V * ? >> Look inside */usr/local/apache2/bin/apachectl ** >> *What is the variable HTTPD set to? >> You could try using *sudo /usr/local/apache2/bin/apachectl -k >> start -f**/usr/local/apache2/conf/httpd.conf >> *to override the config file location. >> * >> *See the following links for further options on the apachectl >> or httpd commands: >> - http://httpd.apache.org/docs/2.4/programs/apachectl.html >> - http://httpd.apache.org/docs/2.4/programs/httpd.html >> >> Thanks, >> >> Mike Rumph >> >> >> On 3/31/2015 3:36 AM, Padmahas Bn wrote: >>> *If anyone finds this as a big question please let me know. >>> I'll precise my problem. >>> >>> Steps I followed:* >>> >>> I installed apr and apr-utils package in the path *"/usr"* >>> using the --prefix option. >>> >>> Both were installed successfully. Hence I installed apache >>> 2.4 to the same path ("/usr") using --prefix option while >>> running *"./configure" . >>> >>> * >>> *Later I came to know if prefix is not mentioned for >>> apache2.4 installation, it will be installed inside >>> /usr/local/apache2 by default. >>> >>> * >>> Hence I again installed without specifying --prefix option >>> which does installed the apache2 into /usr/local/apache2. >>> >>> Now I cd to /usr/local/apache2/bin and run *sudo apachectl >>> -k start *and the apache server was started successfully. >>> *Only later I came to know the server is running from the >>> /usr files installed at first time. >>> >>> * >>> Instead of having 2 installations I thought of removing the >>> one installed inside /usr and deleted all files manually and >>> carefully from all sub folders of /usr. >>> >>> *Now when I run the server from /usr/local/apache2 using "* >>> *sudo apachectl -k start " *it says *sudo: apachectl: >>> command not found* >>> >>> So I supplied full path using *" sudo >>> /usr/local/apache2/bin/apachectl -k start "* >>> >>> But its giving " *httpd: Could not open configuration file >>> /usr/conf/httpd.conf: No such file or directory ".* >>> >>> Thank you. >> >> > > --------------070509000206000509060707 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit Hello Padmahas,

For Apache httpd there is no make uninstall,
but there is a make clean, make distclean and make extraclean.

You could try setting up a separate Apache httpd installation inside your home directory with the following instructions:

- cd to your Apache httpd source directory
- $ make clean
- $ ./configure --prefix=/home/(your userid)/apache2
- $ make
- $ make install
- $ cd /home/(your userid)/apache2
- $ bin/apachectl -V
- $ bin/apachectl start
- $ ps -ef | grep -i httpd

For more complete instructions see http://httpd.apache.org/docs/2.4/install.html#configure .

Take care,

Mike Rumph

On 3/31/2015 8:56 PM, Padmahas Bn wrote:
Hello mike,

I would like to clarify one thing. Whatever the apache related command I execute inside /usr/local/apache2/bin, it all affecting the apache inside /usr. The exact reason may be because I installed apache inside /usr at first and only later I installed in "usr/local...."

Hence if you want exact result of the sudo /usr/local/apache2/bin/apachectl -V, please tell me how to explicitly specify the path as you suggested me in the last command using -f option(sudo /usr/local/apache2/bin/apachectl -k start -f /usr/local/apache2/conf/httpd.conf ).

So tell me if apache configures any environment variables and it may not overwriting the path when I install second time inside /usr/local....

The steps I used to install apache2
To install apr and apr-util I followed this link (http://www.linuxfromscratch.org/blfs/view/svn/general/apr.html). This is where I came to know about --prefix option and I used "/usr" from this tutorial. But irrespective of using /usr as --prefix, apr installed inside /usr/local.

Hence I used the same option for apache2 like this. ./configure --prefix=/usr
Unfortunately apache2 was installed in the exact location inside /usr, by merging its files inside bin.


Later I read in apache documentation, if --prefix not specified it will install inside /usr/local... so I thought it would be easy if all apache files is available inside one directory (apache2) which will be created by server. This time I just ran ./configure. And you know the later part.

Two installations are conflicting with each other. Only the first installation is valid and the second is not even executing server start command.

So is there any way I can completely uninstall apache? something similar to "make uninstall". "make uninstall" is not working I don't know why.

On Wed, Apr 1, 2015 at 5:42 AM, Mike Rumph <mike.rumph@oracle.com> wrote:
Hello Padmahas,

Okay.  This tells us a few things.
One problem is that the HTTPD_ROOT is set to /usr instead of /usr/local/apache2.
Other relative paths will be based from here.
Since the SERVER_CONFIG_FILE is set to conf/httpd.conf,
the default config file will be /usr/conf/httpd.conf instead of /usr/local/apache2/conf/httpd.conf.
The -f switch allowed you to override this.

What steps did you use to install and configure httpd into  /usr/local/apache2?
In your httpd source directory, what are the contents of the config.nice file?

You could review the following links:
- http://httpd.apache.org/docs/2.4/install.html#configure
- http://httpd.apache.org/docs/2.4/programs/configure.html

Take care,

Mike


On 3/31/2015 4:19 PM, Padmahas Bn wrote:
Hello mike,

Yes you are write I installed server first inside /usr and then inside /usr/local/apache2 (installed by default when I used ./configure without --prefix option). Even you are right about my manual un installation.

About the command you suggested with -V option, this is the result.

Server version: Apache/2.4.12 (Unix)
Server built:   Mar 31 2015 16:20:21
Server's Module Magic Number: 20120211:41
Server loaded:  APR 1.5.1, APR-UTIL 1.5.4
Compiled using: APR 1.5.1, APR-UTIL 1.5.4
Architecture:   64-bit
Server MPM:     event
  threaded:     yes (fixed thread count)
    forked:     yes (variable process count)
Server compiled with....
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
 -D APR_USE_SYSVSEM_SERIALIZE
 -D APR_USE_PTHREAD_SERIALIZE
 -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
 -D APR_HAS_OTHER_CHILD
 -D AP_HAVE_RELIABLE_PIPED_LOGS
 -D DYNAMIC_MODULE_LIMIT=256
 -D HTTPD_ROOT="/usr"
 -D SUEXEC_BIN="/usr/bin/suexec"
 -D DEFAULT_PIDLOG="logs/httpd.pid"
 -D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
 -D DEFAULT_ERRORLOG="logs/error_log"
 -D AP_TYPES_CONFIG_FILE="conf/mime.types"
 -D SERVER_CONFIG_FILE="conf/httpd.conf"

I looked inside /usr/local/apache2/bin/apachectl, the HTTPD var set to
HTTPD='/usr/local/apache2/bin/httpd'

In parallel I also looked inside /usr/bin/apacheclt, there the HTTPD var set to

HTTPD='/usr/bin/httpd'. So I assume both of them pointing to their respective directories.

I tried the second command you suggested
sudo /usr/local/apache2/bin/apachectl -k start -f /usr/local/apache2/conf/httpd.conf

Good news
The server started with usual warning message but Yes!!! it is using the httpd.conf file which resides inside /usr/local/apache2/conf/httpd.conf.
The message it always show is,
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message

Now is there any way I can set apache to look inside /usr/local/apache2/conf/httpd.conf  by default, by forgetting the first installation inside /usr? Or should I always specify the httpd.conf path as you suggested?

Thank you for the documentation links, I'm referring those links now.

On Tue, Mar 31, 2015 at 10:11 PM, Mike Rumph <mike.rumph@oracle.com> wrote:
Hello Padmahas,

It looks like your two installations of Apache httpd 2.4 are conflicting with each other.
If I understand correctly, you first installed into /user and then into /usr/local/apache2.
Then you tried to remove the /user installation by deleting files manually.
(As you've seen, /user is not a good choice, because this is used for many other things as well.)
It would probably help to do a fresh installation.
But let's try a few things first.

When tried " sudo /usr/local/apache2/bin/apachectl -k start "
It gave " httpd: Could not open configuration file /usr/conf/httpd.conf: No such file or directory ".
You are probably wanting to use /usr/local/apache2/conf/httpd.conf instead.

What results do you get from sudo /usr/local/apache2/bin/apachectl -V   ?
Look inside /usr/local/apache2/bin/apachectl 
What is the variable HTTPD set to?
You could try using sudo /usr/local/apache2/bin/apachectl -k start -f /usr/local/apache2/conf/httpd.conf
to override the config file location.

See the following links for further options on the apachectl or httpd commands:
- http://httpd.apache.org/docs/2.4/programs/apachectl.html
- http://httpd.apache.org/docs/2.4/programs/httpd.html

Thanks,

Mike Rumph


On 3/31/2015 3:36 AM, Padmahas Bn wrote:
If anyone finds this as a big question please let me know. I'll precise my problem.

Steps I followed:


I installed apr and apr-utils package in the path "/usr" using the --prefix option.

Both were installed successfully. Hence I installed apache 2.4 to the same path ("/usr") using --prefix option while running "./configure" .

Later I came to know if prefix is not mentioned for apache2.4 installation, it will be installed inside /usr/local/apache2 by default.

Hence I again installed without specifying --prefix option which does installed the apache2 into /usr/local/apache2.

Now I cd to /usr/local/apache2/bin and run sudo apachectl -k start and the apache server was started successfully. Only later I came to know the server is running from the /usr files  installed at first time.

Instead of having 2 installations I thought of removing the one installed inside /usr and deleted all files manually and carefully from all sub folders of /usr.

Now when I run the server from /usr/local/apache2 using " sudo apachectl -k start " it says sudo: apachectl: command not found

So I supplied full path using " sudo /usr/local/apache2/bin/apachectl -k start "

But its giving " httpd: Could not open configuration file /usr/conf/httpd.conf: No such file or directory ".

Thank you.





--------------070509000206000509060707--