Friday 18 September 2015

How To install PHP7 MariaDB nginx Apache on Debian 7 (Wheezy)


install mariadb

sudo apt-get update
sudo apt-get install python-software-properties
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo add-apt-repository 'deb http://sfo1.mirrors.digitalocean.com/mariadb/repo/10.0/debian wheezy main'
sudo apt-get update; sudo apt-get install mariadb-server

uninstall php5 and apache2, we will be building it from source.

sudo apt-get remove php5
sudo apt-get remove php5-common
sudo apt-get remove apache2-common
sudo apt-get remove apache2
sudo apt-get remove apache2.2-bin 

download and prepare apache2 for building

mkdir apache
cd apache
wget -nd http://ftp.wayne.edu/apache//httpd/httpd-2.4.16.tar.gz
tar xzf httpd-2.4.16.tar.gz

wget -nd http://www.interior-dsgn.com/apache//apr/apr-1.5.2.tar.gz
wget -nd http://www.interior-dsgn.com/apache//apr/apr-util-1.5.4.tar.gz
tar xzf apr-util-1.5.4.tar.gz
tar xzf apr-1.5.2.tar.gz
cd httpd-2.4.16/srclib/    
mv ../../apr-util-1.5.4 apr-util
mv ../../apr/apr-1.5.2/ apr
cd ../../
should have worked now but we need pcre. wget -ndftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre2-10.20.zip unzip pcre2-10.20.zip cd pcre2-10.20 ./configure --prefix=/usr/local/pcre make sudo make install
lets configure and build and install apache2 cd httpd-2.4.16
./configure --with-included-apr --enable-so 
make

sudo make install
now time for php7!
./configure \
--prefix=$HOME/tmp/usr \
--with-config-file-path=$HOME/tmp/usr/etc \
--enable-mbstring \
--enable-zip \
--enable-bcmath \
--enable-pcntl \
--enable-ftp \
--enable-exif \
--enable-calendar \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--with-curl \
--with-mcrypt \
--with-iconv \
--with-gmp \
--with-pspell \
--with-gd \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-openssl \
--with-pdo-mysql \
--with-gettext=/usr \
--with-zlib=/usr \
--with-bz2=/usr \
--with-recode=/usr \
I got:
+--------------------------------------------------------------------+
| License:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

Thank you for using PHP.
Woohoo!
make
I see:
Build complete.
Don't forget to run 'make test'.
Okay lets test it!
make test
Now lets really do it. (cross fingers)
sudo make install

No comments:

Post a Comment