Link to home
Start Free TrialLog in
Avatar of ittechlab
ittechlabFlag for Canada

asked on

Apache installation

I am trying to install apache and getting the following

[root@linux httpd-2.4.2]# ./configure --enable-so
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting CFLAGS to " -g -O2 -pthread"
  setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE"
  setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... no
configure: error: APR-util not found.  Please read the documentation.

I did install APR-util though.

not sure why i am getting this error.

can some one assist me with this issue?
Avatar of ittechlab
ittechlab
Flag of Canada image

ASKER

I did install APR and APR-Util

now i am getting the following error.  Isn't that PCRE comes with the apache.

I installed it but its still complains.

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

[root@linux httpd-2.4.2]# ./configure
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
  setting CFLAGS to " -g -O2 -pthread"
  setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE"
  setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc option to accept ISO C99... -std=gnu99
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
Is there a specific reason you are compiling rather than using a package manager of some sort ?
Avatar of drj003
drj003

As maeltar said, if you don't need to compile it, just run it with a package manager like
"yum install package".  If you need to compile it, try uninstalling APR-util and reinstalling it.
As the following article says, your APR-util maybe older than the apache version-

http://www.hackersgarage.com/installing-apache-2-4-1-from-source-on-centos-6-2-linux.html
Avatar of Julian Parker
try yum install "Web Server" as root from the cli...

it would help if you said what distro you were using.
Hi drj003,

I tried the article you mentioned here.

cd /usr/local/src/httpd-2.4.1/srclib/
wget http://mirror-cybernet.lums.edu.pk/pub/apache//apr/apr-util-1.4.1.tar.bz2
wget http://mirror-cybernet.lums.edu.pk/pub/apache//apr/apr-1.4.6.tar.bz2
tar -jxf apr-1.4.6.tar.bz2
tar -jxf apr-util-1.4.1.tar.bz2
mv apr-1.4.6 apr
mv apr-util-1.4.1 apr-util
./configure --prefix=/usr/local/apache --enable-so --enable-deflate --enable-expires --enable-headers --enable-rewrite --with-included-apr --with-included-apr-util
make
make install



http://www.hackersgarage.com/installing-apache-2-4-1-from-source-on-centos-6-2-linux.html

i am getting this error at the end.

checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
[root@linux httpd-2.4.2]# make
make: *** No targets specified and no makefile found.  Stop.
ASKER CERTIFIED SOLUTION
Avatar of drj003
drj003

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I just installed php version by downloading the source file from the website.

I tried to create a small php file with the phpinfo() and its shows 5.1.6.

How can i fix this. please advise.

http://www.php.net/downloads.php

[root@linux01 ~]# php -v
PHP 5.4.5 (cli) (built: Jul 31 2012 02:42:45)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies

[root@linux01 ~]# /usr/bin/php -v
PHP 5.1.6 (cli) (built: Jun 27 2012 12:21:13)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies

[root@linux01 ~]# /usr/local/bin/php -v
PHP 5.4.5 (cli) (built: Jul 31 2012 02:42:45)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Did you install Apache from source using my instructions?
it worked. but i removed and installed using yum install command now.
[root@linux01 ~]# httpd -v
Server version: Apache/2.2.3
Server built:   Jun  6 2012 10:00:42
[root@linux01 ~]# rpm -qa httpd
httpd-2.2.3-65.el5.centos
my question is there are some situation we may need to install the latest versions.

in my case i installed latest version of php by compiling source code

when i run /usr/bin/php -v shows older version there for when i write a small php file using phpinfo() method its shows older version.

when i run php -v shows new version
[root@linux01 ~]# php -v
PHP 5.4.5 (cli) (built: Jul 31 2012 02:42:45)

how can i fix so that phpinfo() will show the latest version of php
Yes, there were several posts above that recommended using a package manager.  It seemed as though you wanted to install from source, which is why I gave the steps and tested it myself.

As far as a PHP installation; I think that should really be a seperate case/new post.
i am creating a sep. post can you help me
Well, I'm at work now, but I may be able to try to help.  If not, there are many capable people on this site that can.