By default, CentOS being a Enterprise Linux OS, does not come with latest and greatest packages. This is a good thing, as this provides stability, but if you have to do some hacks for your infrastructure, and the last one was for me to install mod_proxy_msrpc into httpd in order to be able to connect on my Exchange server using Outlook and RPC over HTTP, than you need to find kinky solutions. This module works only with httpd-2.4+, and CentOS is using httpd-2.2.15
After some fun playing with the packages (vmware + snapshots ftw), I created with some help a small guide.
Now let`s start:
I assume you don`t have httpd + php installed on your server.
## Install httpd-2.4.4
cd /usr/local/src
wget http://pkgs.fedoraproject.org/repo/pkgs/apr/apr-1.4.8.tar.bz2/ce2ab01a0c3cdb71cf0a6326b8654f41/apr-1.4.8.tar.bz2
wget http://pkgs.fedoraproject.org/repo/pkgs/apr-util/apr-util-1.5.2.tar.bz2/89c1348aa79e898d7c34a6206311c9c2/apr-util-1.5.2.tar.bz2
wget http://dl.fedoraproject.org/pub/fedora/linux/releases/18/Fedora/source/SRPMS/d/distcache-1.4.5-23.src.rpm
wget http://pkgs.fedoraproject.org/repo/pkgs/httpd/httpd-2.4.4.tar.bz2/0e712ee2119cd798c8ae39d5f11a9206/httpd-2.4.4.tar.bz2
yum -y install autoconf libtool doxygen expat expat-devel libuuid-devel db4-devel mysql-devel unixODBC-devel postgresql-devel sqlite-devel pcre pcre-devel lua-devel libxml2-devel openldap-devel nss-devel
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm (for x64)
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm (for x32)
yum -y install freetds freetds-devel glib rpm-build
rpmbuild -tb /usr/local/src/apr-1.4.8.tar.bz2
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-1.4.8-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-devel-1.4.8-1.i386.rpm
rpmbuild -tb /usr/local/src/apr-util-1.5.2.tar.bz2
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-devel-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-dbm-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-pgsql-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-mysql-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-sqlite-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-freetds-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-odbc-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-ldap-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-openssl-1.5.2-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/apr-util-nss-1.5.2-1.i386.rpm
rpmbuild –-rebuild distcache-1.4.5-23.src.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/distcache-1.4.5-23.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/distcache-devel-1.4.5-23.i386.rpm
rpmbuild -tb /usr/local/src/httpd-2.4.4.tar.bz2
rpm -ivh -aid /root/rpmbuild/RPMS/i386/httpd-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/httpd-devel-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/httpd-manual-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/httpd-tools-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/mod_authnz_ldap-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/mod_lua-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/mod_proxy_html-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/mod_socache_dc-2.4.4-1.i386.rpm
rpm -ivh -aid /root/rpmbuild/RPMS/i386/mod_ssl-2.4.4-1.i386.rpm
## Install PHP 5.5.5
yum install gdbm-devel bzip2-devel libpng-devel gmp-devel libmcrypt-devel mcrypt libcurl-devel db4-devel libXpm-devel libc-client-devel openldap-devel unixODBC-devel postgresql-devel sqlite-devel aspell-devel libxslt-devel net-snmp-devel libxml2-devel pcre-devel gd-devel libicu-devel gcc-c++
cd /usr/local/src
wget http://de1.php.net/distributions/php-5.5.5.tar.bz2
tar -jxvf php-5.5.5.tar.bz2
cd php-5.5.5
./configure
–with-apxs2=/usr/bin/apxs
–prefix=/usr
–sysconfdir=/etc
–with-zlib-dir
–with-freetype-dir
–enable-cgi
–enable-mbstring
–with-libxml-dir=/usr
–enable-soap
–enable-calendar
–with-curl
–with-mcrypt
–with-zlib
–with-gd
–enable-inline-optimization
–disable-rpath
–with-bz2
–with-zlib
–enable-sockets
–enable-sysvsem
–enable-sysvshm
–enable-pcntl
–enable-mbregex
–with-mhash
–enable-zip
–with-pcre-regex
–with-mysql
–with-pdo-mysql
–with-mysqli
–with-jpeg-dir=/usr
–with-png-dir=/usr
–enable-gd-native-ttf
–with-openssl
–with-libdir=lib64
–with-libxml-dir=/usr
–enable-exif
–enable-dba
–with-gettext
–enable-shmop
–enable-sysvmsg
–enable-wddx
–with-kerberos
–enable-bcmath
–enable-ftp
–enable-intl
–with-pspell
make && make install
Add in /etc/httpd/conf/httpd.conf
<FilesMatch “.php$”>
SetHandler application/x-httpd-php
</FilesMatch>
The module for php should be already written in httpd.conf, you can check by searching for
LoadModule php5_module lib/httpd/modules/libphp5.so
## Install mod_proxy_msrpc (rpc over http fix for outlook 2010 and exchange 2010)
yum install git
mkdir /usr/local/src/gitrepo
cd /usr/local/src/gitrepo
git clone https://github.com/bombadil/mod_proxy_msrpc
./configure
make
Go to /etc/httpd/conf/httpd.conf and add:
LoadModule proxy_msrpc_module /etc/httpd/modules/mod_proxy_msrpc.so
Inside your from /etc/httpd/conf/extra/httpd-ssl.conf (or wherever your vhosts are written) add:
OutlookAnywherePassthrough On
Example:
<VirtualHost *:443>
DocumentRoot /your/location/of/document/root
ServerName mail.host.com:443
SSLEngine On
SSLProxyEngine On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
SSLProtocol all -SSLv2
SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW
SSLCertificateFile /etc/pki/CA/path_to_cert/mail.host.com.crt
SSLCertificateKeyFile /etc/pki/CA/pat_to_key/mail.host.com.key
OutlookAnywherePassthrough On
ProxyRequests Off
ProxyErrorOverride Off
ProxyPreserveHost On
Redirect / https://mail.host.com/owa
<Location /owa>
ProxyPass https://exchange/owa
ProxyPassReverse https://exchange/owa
SSLRequireSSL
</Location>
<Location /Microsoft-Server-ActiveSync>
ProxyPass https://exchange/Microsoft-Server-ActiveSync
ProxyPassReverse https://exchange/Microsoft-Server-ActiveSync
SSLRequireSSL
</Location>
<Location /rpc>
ProxyPass https://exchange/rpc
ProxyPassReverse https://exchange/rpc
SSLRequireSSL
</Location>
<Location /ecp>
ProxyPass https://exchange/ecp
ProxyPassReverse https://exchange/ecp
SSLRequireSSL
</Location>
<Location /OAB>
ProxyPass https://exchange/OAB
ProxyPassReverse https://exchange/OAB
SSLRequireSSL
</Location>
<Location /ews>
ProxyPass https://exchange/EWS
ProxyPassReverse https://exchange/EWS
SSLRequireSSL
</Location>
<Location /autodiscover>
ProxyPass https://exchange/Autodiscover
ProxyPassReverse https://exchange/Autodiscover
SSLRequireSSL
</Location>
<Location /AutoDiscover>
ProxyPass https://exchange/Autodiscover
ProxyPassReverse https://exchange/Autodiscover
SSLRequireSSL
</Location>
<Location /Autodiscover>
ProxyPass https://exchange/Autodiscover
ProxyPassReverse https://exchange/Autodiscover
SSLRequireSSL
</Location>
</VirtualHost>
Sources:
http://www.virtualitworld.co.in
bombadil
when I try rpm -ivh -aid /root/rpmbuild/RPMS/x86_64/apr-1.4.8-1.x86_64.rpm
it tells the file /usr/lib64/libapr-1.so.0 from the installation of apr-1.4.8-1.x86_64 conflicts with the file from the package apr-1.3.9-5.el6_2.x86_64
how do I solve this?
@telle You will need to unistall the old one, i think you can use rpm -e package or yum remove to do this. The guide here is written from centos install minimal, where you don`t have these packages. If you have them, uninstall and put new versions.
plz, provide httpd.conf i’ve problems with valid DSO list
I’m receiving this error
rpm -ivh -aid /root/rpmbuild/RPMS/i686/mod_authnz_ldap-2.4.4-1.i686.rpm
error: Failed dependencies:
httpd = 2.4.4-1 is needed by mod_authnz_ldap-2.4.4-1.i686
httpd-mmn = 20120211 is needed by mod_authnz_ldap-2.4.4-1.i686
While trying to find the 2.4.4 version of apache it seems all I can find are for x86 systems any suggestions on where to get it for a 32 bit i686 system?