simpsonjr
asked on
Upgrade Apache from 2.0.53 to 2.2.6
I have 3 webservers that I need to upgrade from Apache/2.0.52 to Apache/2.2.6 what are the steps?
The webservers are running on Solaris 9 and we are using coldfusion.
Should I build from source or just get a pre build pkg?
The webservers are running on Solaris 9 and we are using coldfusion.
Should I build from source or just get a pre build pkg?
On solaris, I have *always* built apache from source. It's easy, and you end up getting everything you need. For example, a commonly-used binary, "apxs", is often NOT included in pre-built packages, and this can make trying to add various modules later a huge pain. In addition, with a package, you have no control where the binaries and config files go. Totally controllable with a source build-- in fact, with a source build, you can build the new apache to go SOMEWHERE ELSE--- and end up with BOTH the old and new apache setups on the same box for testing (note: make sure both don't listen to tcp port 80- at the same time!).
As far as the steps:
in the (new) apache directory--
./configure
make
make install
BUT-- there are options, and I'm not sure how coldfusion fits into there-- for that, take a CLOSE look at the existing httpd.conf.
in the (new) apache directory--
./configure
make
make install
BUT-- there are options, and I'm not sure how coldfusion fits into there-- for that, take a CLOSE look at the existing httpd.conf.
ASKER
What is the best way to make sure that you are building the new version with the same conf as the current one that;s running?
.
.
If the old one was built from source, look for "config.log" in the source directory- that will tell you exactly how it was configure (./configure --option1 --option2 ... etc).
The top of the config log will look like this:
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --enable-module=so --enable-rewrite
Otherwise, if your apache was not built from source on your host, check out the output of /path/to/apache/httpd -V (i.e., /usr/local/apache/bin/http d -V) - it will tell you what options apache was compiled with (note, many of them are probably defaults).
It will look like this:
Server version: Apache/2.2.3
Server built: Nov 20 2007 09:20:13
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm /prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED _ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOG S
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apa che2"
-D SUEXEC_BIN="/usr/local/apa che2/bin/s uexec"
-D DEFAULT_PIDLOG="logs/httpd .pid"
-D DEFAULT_SCOREBOARD="logs/a pache_runt ime_status "
-D DEFAULT_LOCKFILE="logs/acc ept.lock"
-D DEFAULT_ERRORLOG="logs/err or_log"
-D AP_TYPES_CONFIG_FILE="conf /mime.type s"
-D SERVER_CONFIG_FILE="conf/h ttpd.conf"
The top of the config log will look like this:
It was created by configure, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --enable-module=so --enable-rewrite
Otherwise, if your apache was not built from source on your host, check out the output of /path/to/apache/httpd -V (i.e., /usr/local/apache/bin/http
It will look like this:
Server version: Apache/2.2.3
Server built: Nov 20 2007 09:20:13
Server's Module Magic Number: 20051115:3
Server loaded: APR 1.2.7, APR-Util 1.2.7
Compiled using: APR 1.2.7, APR-Util 1.2.7
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOG
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/usr/local/apa
-D SUEXEC_BIN="/usr/local/apa
-D DEFAULT_PIDLOG="logs/httpd
-D DEFAULT_SCOREBOARD="logs/a
-D DEFAULT_LOCKFILE="logs/acc
-D DEFAULT_ERRORLOG="logs/err
-D AP_TYPES_CONFIG_FILE="conf
-D SERVER_CONFIG_FILE="conf/h
ASKER
Is there a way to run ./configure to look at the current apache that is installed and build it based on that?
If not, this is what I was going to do to upgrade.
Make a backup of the existing apache 2 folder that is currently installed.
Install the new apache 2.2.4 package
replace the httpd.conf
restart apache.
Is there any other files or folders that I need to mv from the old apache2 backup?
Thanks
If not, this is what I was going to do to upgrade.
Make a backup of the existing apache 2 folder that is currently installed.
Install the new apache 2.2.4 package
replace the httpd.conf
restart apache.
Is there any other files or folders that I need to mv from the old apache2 backup?
Thanks
No, configure will not automatically know what to do, nor does the configure script have a way to tell "how" your existing apache was built. You need to tell it. My previous posting described how you have to figure out your current apache was built from: either find the config.log, or see above for running httpd and displaying the apache options used at compile-time.
If you are planning on upgrading apache in the same directory as it is now (sounds like that's your plan)- then no, you shouldn't have to copy or move anything - even the httpd.conf file you have now WILL BE PRESERVED.
The simplest thing to do:
STOP apache.
create a backup of the entire existing apache tree.
cd /some/directory
tar cvf apache-backup.tar /usr/local/apache2 (assuming that's where apache is now)
Build new apache, install it into the same directory
./configure --options-you-need-once-yo u-find-the m-if-there -are-any
make
make install
Test.
Voila! With the backup, you can safely do the above. If you have problems, restore the backup and go from there.
If you are planning on upgrading apache in the same directory as it is now (sounds like that's your plan)- then no, you shouldn't have to copy or move anything - even the httpd.conf file you have now WILL BE PRESERVED.
The simplest thing to do:
STOP apache.
create a backup of the entire existing apache tree.
cd /some/directory
tar cvf apache-backup.tar /usr/local/apache2 (assuming that's where apache is now)
Build new apache, install it into the same directory
./configure --options-you-need-once-yo
make
make install
Test.
Voila! With the backup, you can safely do the above. If you have problems, restore the backup and go from there.
ASKER
Here is what I get from httpd -V
[************] /usr/local/apache2/bin > ./httpd -V
Server version: Apache/2.0.52
Server built: Oct 12 2004 03:56:01
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm /prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED _ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOG S
-D HTTPD_ROOT="/usr/local/apa che2"
-D SUEXEC_BIN="/usr/local/apa che2/bin/s uexec"
-D DEFAULT_PIDLOG="logs/httpd .pid"
-D DEFAULT_SCOREBOARD="logs/a pache_runt ime_status "
-D DEFAULT_LOCKFILE="logs/acc ept.lock"
-D DEFAULT_ERRORLOG="logs/err or_log"
-D AP_TYPES_CONFIG_FILE="conf /mime.type s"
-D SERVER_CONFIG_FILE="conf/h ttpd.conf
What options where used?
I think this is the pkg that they used.
[***********] /usr/local/apache2/bin > pkginfo -l |more
PKGINST: SMCapach2
NAME: apache
CATEGORY: application
ARCH: sparc
VERSION: 2.0.52
BASEDIR: /usr/local
VENDOR: The Apache Group
PSTAMP: Steve Christensen
INSTDATE: Dec 19 2006 14:19
EMAIL: steve@smc.vnet.net
STATUS: completely installed
FILES: 3213 installed pathnames
62 directories
102 executables
92110 blocks used (approx)
[************] /usr/local/apache2/bin > ./httpd -V
Server version: Apache/2.0.52
Server built: Oct 12 2004 03:56:01
Server's Module Magic Number: 20020903:9
Architecture: 32-bit
Server compiled with....
-D APACHE_MPM_DIR="server/mpm
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_FCNTL_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOG
-D HTTPD_ROOT="/usr/local/apa
-D SUEXEC_BIN="/usr/local/apa
-D DEFAULT_PIDLOG="logs/httpd
-D DEFAULT_SCOREBOARD="logs/a
-D DEFAULT_LOCKFILE="logs/acc
-D DEFAULT_ERRORLOG="logs/err
-D AP_TYPES_CONFIG_FILE="conf
-D SERVER_CONFIG_FILE="conf/h
What options where used?
I think this is the pkg that they used.
[***********] /usr/local/apache2/bin > pkginfo -l |more
PKGINST: SMCapach2
NAME: apache
CATEGORY: application
ARCH: sparc
VERSION: 2.0.52
BASEDIR: /usr/local
VENDOR: The Apache Group
PSTAMP: Steve Christensen
INSTDATE: Dec 19 2006 14:19
EMAIL: steve@smc.vnet.net
STATUS: completely installed
FILES: 3213 installed pathnames
62 directories
102 executables
92110 blocks used (approx)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.