PURPOSE
In some environments, security scanning software may indicate that versions of Apache and PHP shipped with up.time 7.1 and later may contain vulnerabilities. Although a future version of up.time will include updated versions of these applications, you may wish to manually update them using these instructions.
REQUIREMENTS
- The following steps can be used to upgrade Apache and PHP for up.time 7.1+.
...
- Only minor upgrades are supported
...
- Apache can be
...
- upgraded to 2.2.x (not 2.4)
...
- PHP can be upgraded to 5.4.x (not 5.5+)
...
INSTRUCTIONS
-- stop up.time web service
/etc/init.d/uptime_httpd stop-- back up apache directory
cd /usr/local/uptime
mv apache apache_orig
3. --download and install re2c (PHP dependency)
cd /tmp
wget http://pkgs.repoforge.org/re2c/re2c-0.13.5-1.el6.rf.x86_64.rpm
rpm -ivh re2c-0.13.5-1.el6.rf.x86_64.rpm
4. -- install openssl devel package (Apache dependency) and mysql devel package (PHP dependency)
yum install openssl-devel mysql-devel
5. -- download and install Apache
cd /tmp
wget http://apache.mirror.rafal.ca//httpd/httpd-2.2.29.tar.gz
tar xvfz httpd-2.2.29.tar.gz
cd httpd-2.2.29
./configure --prefix=/usr/local/uptime/apache --with-mpm=worker --enable-so --enable-proxy --enable-proxy-connect --enable-proxy-ftp --enable-proxy-http --enable-headers --enable-rewrite --enable-status --enable-info --enable-deflate --enable-mem-cache --enable-cache --enable-disk-cache --enable-expires --enable-mods-shared=all --enable-ssl --enable-cgi --enable-xsendfile
make
make install
6. -- download and install xsendfile Apache module
wget https://tn123.org/mod_xsendfile/mod_xsendfile-0.12.tar.bz2 --no-check-certificate
tar xvfj mod_xsendfile-0.12.tar.bz2
/usr/local/uptime/apache/bin/apxs -cia mod_xsendfile-0.12/mod_xsendfile.c
7. -- download and install php
wget http://php.net/get/php-5.4.42.tar.bz2/from/this/mirror
tar xvfj php-5.4.42.tar.bz2
cd php-5.4.42
./configure --prefix=/usr/local/uptime/apache --with-apxs2=/usr/local/uptime/apache/bin/apxs --with-mysql --with-libdir=lib64
make
make install
8. -- move up.time Apache config files into new Apache directory
cd /usr/local/uptime
mv apache/conf apache/conf_orig
cp -R apache_orig/conf apache
9. -- create tmp directory and set file ownerships
mkdir apache/tmp
chown -R uptime:uptime apache
10. (optional) -- if PHP packages are required, use pear; examples below
cd apache/bin
./pear install MDB2
./pear install pear/MDB2#mysql
This completes the upgrade.