sim_tcr
Posts: 338
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Trying compile and install Apache from source. [RESOLVED]

Mon Mar 02, 2015 11:15 am

Hello,

I am trying compile and install Apache from source (2.4.12). I am trying to install to /Splunk dir as user splunk.

Code: Select all

[splunk@xxxxxxxxxxxxx /]$ ls -la | grep Splunk
drwxrwxr-x    5 splunk splunk     9 Mar  2 06:04 Splunk
[splunk@xxxxxxxxxxxxx /]$
I downloaded httpd-2.4.12.tar.gz and extracted the package to /Splunk/httpd-2.4.12
I downloaded apr-1.5.1.tar.gz & apr-util-1.5.4.tar.gz and extracted the contents to /Splunk/httpd-2.4.12/srsclib/apr and /Splunk/httpd-2.4.12/srsclib/apr-util respectively.

From /Splunk/httpd-2.4.12 I ran ./configure --with-included-apr --prefix=/Splunk/apache and it completed without errors.
From /Splunk/httpd-2.4.12 I ran make and it completed without errors.
From /Splunk/httpd-2.4.12 I am running make install and it ends with errors.
make[2]: Leaving directory `/Splunk/httpd-2.4.12/support'
cp: preserving permissions for `/Splunk/apache/modules/httpd.exp': Operation not supported
make[1]: *** [install] Error 1
make[1]: Leaving directory `/Splunk/httpd-2.4.12/support'
make: *** [install-recursive] Error 1
Can any one help please?
Last edited by sim_tcr on Sun Mar 08, 2015 11:27 am, edited 1 time in total.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

Heater
Posts: 16338
Joined: Tue Jul 17, 2012 3:02 pm

Re: Trying compile and install Apache from source.

Mon Mar 02, 2015 11:46 am

You don't have permissions to do that. Try using:

$ sudo make install
Memory in C++ is a leaky abstraction .

sim_tcr
Posts: 338
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: Trying compile and install Apache from source.

Mon Mar 02, 2015 11:53 am

Heater wrote:You don't have permissions to do that. Try using:

$ sudo make install
I do not have sudo permission. Only reason I want to install to /Splunk is because I do not have sudo permission.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

Heater
Posts: 16338
Joined: Tue Jul 17, 2012 3:02 pm

Re: Trying compile and install Apache from source.

Mon Mar 02, 2015 12:01 pm

Google is your friend. You will find "steps of how I installed apache-httpd on a non-root user" here:
http://stackoverflow.com/questions/9436 ... stallation

Not written by me, I have no idea how well that works.

Edit:

Wait a minute. If you cannot get root permissions how did you create the /Splunk directory ?
If that directory already existed presumably you don't have enough permissions to access it.

The answer is to install it to some place you do have permission to use. Hence the
--prefix=/home/username/apache/httpd-2.4.2/ option in the instructions in the link above.
Memory in C++ is a leaky abstraction .

sim_tcr
Posts: 338
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: Trying compile and install Apache from source.

Fri Mar 06, 2015 11:38 am

Heater wrote: Wait a minute. If you cannot get root permissions how did you create the /Splunk directory ?
If that directory already existed presumably you don't have enough permissions to access it.

The answer is to install it to some place you do have permission to use. Hence the
--prefix=/home/username/apache/httpd-2.4.2/ option in the instructions in the link above.
/Splunk was created by admins and gave splunk id and group as owner and group. I (splunk) do have full permissions to /Splunk see below,

Code: Select all

[splunk@xxxxxxxxxxxxx /]$ ls -la | grep Splunk
drwxrwxr-x    5 splunk splunk     9 Mar  2 06:04 Splunk
[splunk@xxxxxxxxxxxxx /]$
So I had tried --prefix=/Splunk/apache

I am still stuck with the original error I posted first post.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

sim_tcr
Posts: 338
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: Trying compile and install Apache from source.

Sun Mar 08, 2015 6:49 am

Here is an update. I tried compiling Apache on my raspberry pi 2 by following the exact same steps and it was successful. Differences are,

on pi I ran it as user 'pi' where on other machine I ran it as "splunk"
on pi I set '--prefix=/home/pi/apache' where on other machine '--prefix=/Splunk/apache'

I checked permission on /home/pi and /Splunk,

Code: Select all

pi@raspiabita /home $ ls -la | grep pi
drwxr-xr-x 21 pi   pi   4096 Mar  8 12:06 pi
pi@raspiabita /home $

[splunk@xxxxxxxxxxxxx /]$ ls -la | grep Splunk
drwxrwxr-x    5 splunk splunk     9 Mar  2 06:04 Splunk
[splunk@xxxxxxxxxxxxx /]$
  
on raspberry pi, pi user has full access to /home/pi and on other machine splunk user has full access to /Splunk.

I am still trying to figure out why make install command on other machine fails with,
make[2]: Leaving directory `/Splunk/httpd-2.4.12/support'
cp: preserving permissions for `/Splunk/apache/modules/httpd.exp': Operation not supported
make[1]: *** [install] Error 1
make[1]: Leaving directory `/Splunk/httpd-2.4.12/support'
make: *** [install-recursive] Error 1
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

sim_tcr
Posts: 338
Joined: Tue Nov 06, 2012 1:01 pm
Location: Bangalore
Contact: Website

Re: Trying compile and install Apache from source. [RESOLVED

Sun Mar 08, 2015 11:29 am

I resolved my issue by downloading the source to my home directory (/home/splunk/) and then compiling.
Earlier it was at /Splunk.
http://raspisimon.no-ip.org
Raspberry Pi Model B x 2, Raspberry Pi 2 x 2, Transcend 32GB Class 10, Transcend 16GB Class 10, Transcend 8GB Class 4, Custom 12V 1.5A (stepped down to 5.5V)

Return to “General discussion”