Apache 2.4.18 installation on AIX

  • Download below packages from www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html
    perl-Crypt-SSLeay-0.57-2.aix6.1.ppc.rpm
    perl-Net_SSLeay.pm-1.55-3.aix6.1.ppc.rpm
    db-4.8.24-3.aix6.1.ppc.rpm
    lua-5.1.5-1.aix6.1.ppc.rpm
    openldap-2.4.40-1.aix6.1.ppc.rpm
    pcre-8.33-1.aix6.1.ppc.rpm
    readline-6.1-2.aix6.1.ppc.rpm
    httpd-2.4.18-1.aix6.1.ppc.rpm
    mod_ssl-2.4.18-1.aix6.1.ppc.rpm

    Or download all above as one tar package from www.stor2rrd.com : apache-2.4.18-AIX.tar

  • Install packages under root (run updtvpkg at first):
    updtvpkg
    
    rpm -Uvh perl-Crypt-SSLeay-0.57-2.aix6.1.ppc.rpm
    rpm -Uvh --nodeps --replacefiles perl-Net_SSLeay.pm-1.55-3.aix6.1.ppc.rpm
    rpm -Uvh readline-6.1-2.aix6.1.ppc.rpm
    rpm -Uvh db-4.8.24-3.aix6.1.ppc.rpm
    rpm -Uvh lua-5.1.5-1.aix6.1.ppc.rpm
    rpm -Uvh openldap-2.4.40-1.aix6.1.ppc.rpm
    rpm -Uvh pcre-8.33-1.aix6.1.ppc.rpm
    rpm -Uvh mod_ssl-2.4.18-1.aix6.1.ppc.rpm
    rpm -Uvh expat-2.1.1-1.aix6.1.ppc.rpm
    rpm -Uvh httpd-2.4.18-1.aix6.1.ppc.rpm
    
  • Assign your own certificate and key (adjust /opt/freeware/etc/httpd/conf/extra/httpd-ssl.conf to match your file names) or generate self signed certificate like below:
    # cd /opt/freeware/etc/httpd/conf/
    # OPENSSL_CONF=/usr/lpp/openssl.base/inst_root/var/ssl/openssl.cnf openssl req -x509 -nodes -days 3650 -newkey rsa:2048 -keyout ssl.key/server.key -out ssl.crt/server.crt
    
  • In case you do not need SSL support comment out below line in /opt/freeware/etc/httpd/conf/httpd.conf:
    # vi /opt/freeware/etc/httpd/conf/httpd.conf
    
    # Secure (SSL/TLS) connections
    #Include conf/extra/httpd-ssl.conf
    
    You might need to define LIBPATH before restart
    # export LIBPATH=/usr/lib
    # /opt/freeware/sbin/apachectl restart
    
  • Configure STOR2RRD (attach STOR2RRD stuff at the end of /opt/freeware/etc/httpd/conf/httpd.conf)
    # vi /opt/freeware/etc/httpd/conf/httpd.conf 
    
    LoadModule cgi_module /opt/freeware/lib/httpd/modules/mod_cgi.so
    Alias /stor2rrd  "/home/stor2rrd/stor2rrd/www/"
    <Directory "/home/stor2rrd/stor2rrd/www/">
        Options Indexes FollowSymLinks Includes MultiViews
        Require all granted 
    </Directory>
    
    # CGI-BIN
    ScriptAlias /stor2rrd-cgi/ "/home/stor2rrd/stor2rrd/stor2rrd-cgi/"
    <Directory "/home/stor2rrd/stor2rrd/stor2rrd-cgi">
        AllowOverride None
        SetHandler cgi-script
        Options ExecCGI Includes FollowSymLinks
        Require all granted
    </Directory>
    
  • start Apache
    # /opt/freeware/sbin/apachectl start
    
  • Automatic start Apache with start of the opereating system
    Add below into /etc/rc.d/init.d/httpd:
    # vi /etc/rc.d/init.d/httpd
    
    PROG_BIN=/opt/freeware/sbin/apachectl
    export LD_LIBRARY_PATH=/lib
    
  • Start/Stop from OS starting scripts:
    # /etc/rc.d/init.d/httpd start
    # /etc/rc.d/init.d/httpd stop