Installing PHP7.0 on Armbian

Php7.0 used more than a year in the web community and gives pretty good results in performance and less memory usage. I dunno why it’s in testing state in Debian-like systems. Anyway, under the cut the steps to install it on Debian-like system.

The first thing what you’ll need to do is add testing repositories to apt’s /etc/apt/sources.list:deb testing non-free contrib main deb testing/updates non-free contrib main

Actually, you could stop on this step and install php7.0 on the fresh system :)

In my case, php5.6 has already installed, so, here is the additional steps what I’ve done to migrate:

dpkg --list | grep php | awk '/^ii/{ print $2}' > php-pkgs.list dpkg --list | grep php | awk '/^ii/{ print $2}' | xargs aptitude remove -y && aptitude remove php aptitude -t testing install libncursesw aptitude -t testing install php7.0-fpm sed '/\-\(cli\|cgi\|fpm\)/d;s/5/7.0/;s/sqlite/sqlite3/' php-pkgs.list | xargs aptitude -t testing install -y

Don’t forget to modify your www.conf in /etc/php/7.0/fpm/pool.d/www.conf if you were used tcp connection.

That’s all. I guess didn’t forgot something.


Leave a Reply

Your email address will not be published. Required fields are marked *