How to upgrade Apache 2 from 2.2 to 2.4 for Ubuntu 10.04

      • I was in the process of doing a test upgrade from Apache 2.2 to 2.4.3. I'm using Ubuntu 10.04. I would have upgraded to 12.04 for this to see if the upgrade would go a lot smoother. Unfortunately, I was told it wasn't an option...so I'm stuck using 10.04.

          The process I did this was:

          Before attempting this, I have managed to upgrade APR from 1.3 to 1.4 and APR-UTIL since apache has said they were prerequisites beforehand: http://apr.apache.org/download.cgi. I took the apr and apr-util and placed them under httpd-2.4.3/srclib

            I have also taken Schlauberg's advise concerning libapr removal. So I removed all traces too when I removed all traces of the current apache.

            First remove all traces of the current apache:

            sudo apt-get --purge remove apache2
            sudo apt-get remove apache2-common apache2-utils apache2.2-bin apache2-common
            sudo apt-get autoremove
            
            whereis apache2
            sudo rm -Rf /etc/apache2 /usr/lib/apache2 /usr/include/apache2
            

            Afterwards, I did the following:

            sudo apt-get install build-essential
            sudo apt-get build-dep apache2
            

            Then install apache 2.4 with the following:

                wget http://www.bizdirusa.com/mirrors/apache//httpd/httpd-2.4.3.tar.gz   
            tar -xzvf httpd-2.4.3.tar.gz   
            cd        
            wget     http://mirror.olnevhost.net/pub/apache//apr/apr-1.4.6.tar.gz   
            tar -xzvf apr-1.4.6.tar.gz   
            mv apr-1.4.6 apr   
            cd   
            wget     http://mirror.olnevhost.net/pub/apache//apr/apr-util-1.4.1.tar.gz   
            tar -xzvf apr-util-1.4.1.tar.gz   
            mv apr-util-1.4.1 apr-util
            cd   
            Place folders apr and     apr-util under /httpd-2.4.3/srclib
                sudo cp -r apr-util ~/httpd-2.4.3/srclib
                sudo cp -r apr ~/httpd-2.4.3/srclib    
            cd   
            download pcre-8.31.tar.gz from http://sourceforge.net/projects/pcre/files/pcre/8.31/   
                Please note that pcre-8.31 isn't obtainable through the wget but needs to be done     manually through sourceforge.             
            tar -xzvf pcre-8.31.tar.gz && cd pcre-8.31   
            sudo ./configure   
            sudo make   
            sudo make install   
            cd   
            cd httpd-2.4.3   
            sudo ./configure --prefix=/usr/local/apache2 --enable-mods-shared=all     --enable-deflate --enable-proxy --enable-proxy-balancer --enable-proxy-http --with-mpm=prefork --with-included-apr --with-included-apr-util   
            sudo make   
            sudo make install    
            

            After this process. I no longer get an error in installation. However, I think I'm missing a step because it's not found in /etc/apache2 and if I use a command that uses apache the terminal tells me it's not installed. Can anyone tell me what I'm missing after make install.

            Thanks in advance for any help you have to offer!

          Answers(9)

          • First thing: Make a backup. Then follow this documentation, which took me less than a minute to find.

          • I would recommend looking into Cobbler to see if it can work for you. It was primarily developed for RedHat based systems, but it looks like Ubuntu may be usable. Considering that Cobbler supports both PXE as well as boot discs, it should be able to scale to your needs.

            • Most likely you have another libapr somewhere on your system. First I uninstalled libapr that came with the system, which caused a compile error. Then I cleaned up everything except the source I found via

              locate apr
              

              Another make clean and make install fixed my problem

            • Most likely you have another libapr somewhere on your system. First I uninstalled libapr that came with the system, which caused a compile error. Then I cleaned up everything except the source I found via

              locate apr
              

              Another make clean and make install fixed my problem

            • You could try using FAI (Fully Automatic Installation): http://www.informatik.uni-koeln.de/fai/features/

            • The FAI project has a new $HOME.

              http://fai-project.org

            • under debian/ubuntu its called preseeding: https://help.ubuntu.com/9.10/installation-guide/powerpc/preseed-using.html

              You can put the preseed.cfg on CD oder let it load via web. I`m using it in conjunction with cfengine2

            • Ubuntu fully supports Kickstart (albeit with a few changes). Under Red Hat, Kickstart locations are specified with a ks= parameter given to the Linux kernel at boot; I don't think Ubuntu is any different. Ubuntu still supports preseeding as part of the kickstart process and adds comamnds to that effect to kickstart. – Mei Mar 14 '11 at 16:23

            • Thanks, I realize Ubuntu has great documentation, was just asking for some feedback on best practices in case there were recommendations outside the community docs. This content has led me astray in the past, albeit on more convoluted issues, but either way, thanks for pointing me in that direction. – user53813 Sep 28 '10 at 0:13