How to enable apache-http/2 in centos 7? - linux

I have followed the below link for enabling http/2 in centos-7 apache.
https://www.tunetheweb.com/performance/http2/
My openssl version :
# openssl version
OpenSSL 1.1.0f 25 May 2017
While installing latest apr-util and apache(httpd-2.4.27)
below errors occurred on make command
Inside the apr-util folder :
# make
make[1]: Entering directory `/usr/local/src/apr-util-1.6.0'
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/apr-util-1.6.0/incl
ude -I/usr/local/src/apr-util-1.6.0/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[1]: *** [xml/apr_xml.lo] Error 1
make[1]: Leaving directory `/usr/local/src/apr-util-1.6.0'
make: *** [all-recursive] Error 1
Inside the httpd folder :
#make
Making all in srclib
make[1]: Entering directory `/usr/local/src/httpd-2.4.27/srclib'
Making all in apr
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[3]: Nothing to be done for `local-all'.
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr'
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr'
Making all in apr-util
make[2]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[3]: Entering directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
/bin/sh /usr/local/src/httpd-2.4.27/srclib/apr/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/local/src/htt
pd-2.4.27/srclib/apr-util/include -I/usr/local/src/httpd-2.4.27/srclib/apr-util/include/private -I/usr/local/src/httpd-2.4.27/srclib/apr/include -o xml/apr_xml.lo -c xml/a
pr_xml.c && touch xml/apr_xml.lo
xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory
#include <expat.h>
^
compilation terminated.
make[3]: *** [xml/apr_xml.lo] Error 1
make[3]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib/apr-util'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/httpd-2.4.27/srclib'
make: *** [all-recursive] Error 1

I would suggest to install ready to use package from https://codeit.guru/en_US/2017/10/apache-httpd-2-4-28-built-against-openssl-1-0-2l-with-http2-for-red-hat-enterprise-linux-and-centos/
Alternatively, you can recompile it from SRPM provided by Fedora or CodeIT (the same one with changed defaults and openssl paths):
rpmbuild -ba ~/rpmbuild/SPECS/httpd.spec

#nos was correct and this needed yum install expat-devel and a few other dependencies I already had installed.
I've updated the blog post now to reflect this. Feel free to reach out to me if you've any other issues on this.

Now is available repo from codeit.guru for CentOS 7, it can be enabled:
cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
If apache is already installed, yum update will update apache, it even enables mod_http2.
Otherwise, fresh installation of apache can be done.
Put Protocols h2 http/1.1 within ssl.conf as Mozilla suggests
Restart apache, http/2 is ready.

Related

undefined reference to `crypt' : apache2 manually install error on imx8mqevk

I am using an iMX8MQ EVK board with Linux. I want to install the apache2 server and MySQL database from the source. Started installing apache2 using this
Here is the Linux version:
root#imx8mqevk:~# cat /etc/os-release
ID=fsl-imx-wayland
NAME="NXP i.MX Release Distro"
VERSION="5.10-hardknott (hardknott)"
VERSION_ID=5.10-hardknott
PRETTY_NAME="NXP i.MX Release Distro 5.10-hardknott (hardknott)"
Here is the output of configure
Facing issue with make as crypto is not found. I am not able to resolve the issue.
I have tried installing glibc but the issue is not resolved.
make error
Making all in support
make[1]: Entering directory '/home/root/httpd-2.4.53/support'
make[2]: Entering directory '/home/root/httpd-2.4.53/support'
/usr/local/apr/build-1/libtool --silent --mode=link gcc -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /usr/local/apr/lib/libaprutil-1.la -lexpat /usr/local/apr/lib/libapr-1.la -lrt -lpthread -ldl
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: passwd_common.o: in function `mkhash':
/home/root/httpd-2.4.53/support/passwd_common.c:228: undefined reference to `crypt'
/usr/lib/gcc/aarch64-poky-linux/10.2.0/../../../../aarch64-poky-linux/bin/ld: /home/root/httpd-2.4.53/support/passwd_common.c:240: undefined reference to `crypt'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:48: htpasswd] Error 1
make[2]: Leaving directory '/home/root/httpd-2.4.53/support'
make[1]: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1
make[1]: Leaving directory '/home/root/httpd-2.4.53/support'
make: *** [/home/root/httpd-2.4.53/build/rules.mk:75: all-recursive] Error 1

Tag command not found when running make on crosstool-ng

For some reason on my ubuntu system, running make on crosstool-ng throws this error. I tried seeing if I could find a package that has the tag command but I dont think that this exists.
/usr/bin/make all-recursive
make[1]: Entering directory '/home/rahul/crosstool-ng'
Making all in kconfig
make[2]: Entering directory '/home/rahul/crosstool-ng/kconfig'
/usr/bin/make all-am
make[3]: Entering directory '/home/rahul/crosstool-ng/kconfig'
tag CC --mode=link gcc -g -O2 -o conf conf.o zconf.o
/bin/bash: tag: command not found
Makefile:497: recipe for target 'conf' failed
make[3]: [conf] Error 127 (ignored)
tag CC --mode=link gcc -D_GNU_SOURCE -I/usr/include/ncursesw -g -O2 -o nconf nconf-nconf.o nconf-nconf.gui.o nconf-zconf.o -lmenuw -lpanelw -lncursesw -ltinfo
/bin/bash: tag: command not found
Makefile:523: recipe for target 'nconf' failed
make[3]: [nconf] Error 127 (ignored)
tag CC --mode=link gcc -g -O2 -o mconf mconf.o zconf.o lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o -lncursesw -ltinfo
/bin/bash: tag: command not found
Makefile:519: recipe for target 'mconf' failed
make[3]: [mconf] Error 127 (ignored)
make[3]: Leaving directory '/home/rahul/crosstool-ng/kconfig'
make[2]: Leaving directory '/home/rahul/crosstool-ng/kconfig'
make[2]: Entering directory '/home/rahul/crosstool-ng'
make[2]: Leaving directory '/home/rahul/crosstool-ng'
make[1]: Leaving directory '/home/rahul/crosstool-ng'
If you are still looking for the answer you can find it here: https://github.com/crosstool-ng/crosstool-ng/issues/944#issuecomment-381447332
You just need to run apt install libtool-bin.

cygwin install FGSL?

I use gfortran on cygwin and want to install the FGSL package, then I try
xxx#xxx-PC ~
$wget http://www.lrz.de/services/software/mathematik/gsl/fortran/download/fgsl-1.0.0.tar.gz
$tar zxvf fgsl-1.0.0.tar.gz
$cd fgsl-1.0.0
$./configure
so far so good, then what next should I do?
https://de.wikibooks.org/wiki/Fortran:_FGSL
My apologies. Under Vladimir's guidance, I try
xxx#xxx-PC ~/fgsl-1.0.0
$ make
make all-recursive
make[1]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Making all in .
make[2]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
/bin/sh ./libtool --tag=FC --mode=link gfortran -g -O2 -version-info 0:0:0 -o libfgsl.la -rpath /usr/local/lib fgsl.lo libfgsl_la-fgsl_utils.lo -lgsl -lgslcblas -lblas
/usr/bin/grep: /usr/lib/libblas.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/libblas.la: No such file or directory
libtool: link: `/usr/lib/libblas.la' is not a valid libtool archive
Makefile:531: recipe for target 'libfgsl.la' failed
make[2]: *** [libfgsl.la] Error 1
make[2]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:636: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:437: recipe for target 'all' failed
make: *** [all] Error 2
and
xxx#xxx-PC ~/fgsl-1.0.0
$ make install
Making install in .
make[1]: Entering directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
/bin/sh ./libtool --tag=FC --mode=link gfortran -g -O2 -version-info 0:0:0 -o libfgsl.la -rpath /usr/local/lib fgsl.lo libfgsl_la-fgsl_utils.lo -lgsl -lgslcblas -lblas
/usr/bin/grep: /usr/lib/libblas.la: No such file or directory
/usr/bin/sed: can't read /usr/lib/libblas.la: No such file or directory
libtool: link: `/usr/lib/libblas.la' is not a valid libtool archive
Makefile:531: recipe for target 'libfgsl.la' failed
make[1]: *** [libfgsl.la] Error 1
make[1]: Leaving directory '/cygdrive/d/CygwinWorkshop/fgsl-1.0.0'
Makefile:636: recipe for target 'install-recursive' failed
make: *** [install-recursive] Error 1
Some errors that I don't know how to handle occur.
According to the hints by screen, I next check
$ apt-cyg install lapack
Package lapack is already installed, skipping
$ apt-cyg install liblapack-devel
Package liblapack-devel is already installed, skipping
A fortran code named bsp.f03 given by https://de.wikibooks.org/wiki/Fortran:_FGSL
is used for testing purpose
program bsp
use fgsl
implicit none
real( kind = fgsl_double ) :: a
real( kind = fgsl_double ) :: d = 5.0_fgsl_double
a = d ** 2 * m_pi_4
write( *, * ) "Kreisflaeche = ", a
end program bsp
then I compile and link
$g95 bsp.f03 -I/usr/local/include/g95 -L/usr/local/lib -lgsl -lfgsl_g95 -lgslcblas
-bash: g95: command not found
I use R for statistical
computing on windows a lot and I'm a total newcomer to fortran and cygwin, so please forgive my very basic and naive questions about the above.
You are missing the configure step.The source package was configured for a different system.
In general, for any build, you should run
autoreconf -ivf
./configure
make
In addition before these steps, replace in Makefile.am
libfgsl_la_LDFLAGS = -version-info #LIB_CURRENT#:#LIB_REVISION#:#LIB_AGE# #FGSL_LDFLAGS#
with
libfgsl_la_LDFLAGS = -version-info #LIB_CURRENT#:#LIB_REVISION#:#LIB_AGE# #FGSL_LDFLAGS# -no-undefined
to build the shared library.

there is an error about libtool when building mesos

When I build Apache mesos on CentOS 6.6 as the guided. But there is an error as follows.
/bin/sh ../libtool --tag=CC --mode=link gcc -g1 -O0 -o libry_http_parser.la libry_http_parser_la-http_parser.lo -lz -lcurl -lsvn_delta-1 -lsvn_subr-1 -lapr-1 -lrt
/bin/grep: /usr/lib64/libaprutil-1.la: No such file or directory
/bin/sed: can't read /usr/lib64/libaprutil-1.la: No such file or directory
libtool: link: `/usr/lib64/libaprutil-1.la' is not a valid libtool archive
make[6]: *** [libry_http_parser.la] Error 1
make[6]: Leaving directory `/home/vagrant/mesos-0.21.1/build/3rdparty/libprocess/3rdparty'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/home/vagrant/mesos-0.21.1/build/3rdparty/libprocess/3rdparty'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/home/vagrant/mesos-0.21.1/build/3rdparty/libprocess/3rdparty'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/vagrant/mesos-0.21.1/build/3rdparty/libprocess'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/vagrant/mesos-0.21.1/build/3rdparty'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/vagrant/mesos-0.21.1/build/3rdparty'
make: *** [all-recursive] Error 1
You have to install all mandatory development libraries for this package. In this message it complains on lack of apr-util-devel.
I think
yum install apr-util-devel
should help.

Installing FAAC on linux, getting errors

I am trying to install FAAC on linux. I'm getting errors.
I use this to install.
cd /usr/src
wget http://sourceforge.net/projects/faac/files/faac-src/faac-1.28/faac-1.28.tar.bz2/download
tar -xvjf faac-1.28.tar.bz2
cd faac-1.28
./configure
make
make install
Once I try to make it, I get the error
mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
/usr/include/string.h:369: error: ambiguates old declaration ‘const char* strcasestr(const char*, const char*)’
make[3]: *** [3gp.o] Error 1
make[3]: Leaving directory `/usr/src/faac-1.28/common/mp4v2'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/faac-1.28/common'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/faac-1.28'
make: *** [all] Error 2
I read up online and it was saying it was interfearing with something, and I had to locate a file and edit it.
How do i fix this installation so it install properly.
Remove line 126 containing strcasestr from mpeg4ip.h found in the common/mp4v2 folder, as a temporary workaround. It seems it does not properly exclude its own prototype when it is already included by means of glibc's strcasestr (#define _GNU_SOURCE 1).
BTW: Isn't ffmpeg on the way to have its own AAC code such that faac/faad is no longer needed as a dependency...
Ubuntu 12.04 - kernel 3.5x to 3.8.0-32-generic
Step 1:
apt-get -y remove gstreamer0.10-plugins-bad
apt-get -y install libfaad-dev libfaac-dev faac faad
Step 2:
cd /var/tmp
wget http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-0.10.23.tar.gz
tar xvfz gst-plugins-bad-0.10.23.tar.gz
cd gst-plugins-bad-0.10.23/
./autogen.sh
./configure
configure: *** Plug-ins with dependencies that will be built:
decklink
dvb
faac
faad
fbdevsink
gsettings
linsys
shm
vcdsrc
vp8
make
Making all in faac
make[3]: Entering directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faac'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faac'
Making all in faad
make[3]: Entering directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faad'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/var/tmp/gst-plugins-bad-0.10.23/ext/faad'
Making all in gsettings
make install
Step 3: verify
gst-inspect-0.10 faac | grep Version
Version: 0.10.21
gst-inspect-0.10 faad | grep Version
  Version: 0.10.23
EDIT: deb packages
http://labkom.stikom.edu/ubuntu/pool/universe/g/gst-plugins-bad0.10/

Resources