php/DOC/README.php5.4_debian9

82 lines
2.5 KiB
Plaintext

# ==========================================
#
# Install PHP v 5.4.45 on Debian 9 (stretch)
#
# ==========================================
# ----------
# - see: https://unix.stackexchange.com/questions/379215/installing-php-5-3-on-debian-stretch-9
# ----------
# - Install dependencies
# -
apt install build-essential checkinstall zip autoconf
apt install libfcgi-dev libfcgi0ldbl libmcrypt-dev libssl-dev libc-client2007e-dev \
libkrb5-dev libcurl4-openssl-dev
apt install libxml2-dev libcurl4-openssl-dev libpcre3-dev libbz2-dev libjpeg-dev \
libpng-dev libfreetype6-dev libmcrypt-dev libmhash-dev freetds-dev
# - This was recommend, but i don't installed libmariadbclient-dev
# -
#apt-get install libmariadbclient-dev
# - OpenSSL
# -
mkdir /usr/local/src/openssl
cd /usr/local/src/openssl
wget https://www.openssl.org/source/old/1.0.1/openssl-1.0.1u.tar.gz
gunzip < openssl-1.0.1u.tar.gz | tar -xf -
cd openssl-1.0.1u
./config shared --openssldir=/usr/local/openssl-1.0.1u/ enable-ec_nistp_64_gcc_128
make depend
make
make install
ln -s openssl-1.0.1u /usr/local/openssl
ln -s ../lib /usr/local/openssl/lib/x86_64-linux-gnu
# - Curl
# -
mkdir /usr/local/src/curl
cd /usr/local/src/curl
wget https://curl.haxx.se/download/curl-7.26.0.tar.gz
gunzip < curl-7.26.0.tar.gz | tar -xf -
cd curl-7.26.0
env PKG_CONFIG_PATH=/usr/local/openssl/lib/pkgconfig LDFLAGS=-Wl,-rpath=/usr/local/openssl/lib \
./configure --with-ssl=/usr/local/openssl --with-zlib --prefix=/usr/local/curl-7.26.0
make
make install
ln -s curl-7.26.0 /usr/local/curl
# - Imap - imap-2007f
# -
# - Then, libc-client. I actually used the sources from debian 8, since it included some patches.
# -
# - Note:
# - The build itself failed but still produced c-client.a, which is all I needed.
# -
mkdir /usr/local/src/uw-imap
cd /usr/local/src/uw-imap
wget http://http.debian.net/debian/pool/main/u/uw-imap/uw-imap_2007f\~dfsg-2.dsc
wget http://http.debian.net/debian/pool/main/u/uw-imap/uw-imap_2007f\~dfsg.orig.tar.gz
wget http://http.debian.net/debian/pool/main/u/uw-imap/uw-imap_2007f\~dfsg-2.debian.tar.gz
dpkg-source -x uw-imap_2007f\~dfsg-2.dsc imap-2007f
mv imap-2007f /usr/local/
cd /usr/local/imap-2007f
touch {ipv6,lnxok}
make slx SSLINCLUDE=/usr/local/openssl/include/ SSLLIB=/usr/local/openssl/lib EXTRAAUTHENTICATORS=gss
mkdir lib include
cp c-client/*.c lib/
cp c-client/*.h include/
cp c-client/c-client.a lib/libc-client.a
ln -s /usr/lib/libc-client.a /usr/lib/x86_64-linux-gnu/libc-client.a
# - PHP 5.4.45
# -
# - Install PHP 5.4.45 using script mod_php-5.4_debian-9_install.sh