Skip to content

Instantly share code, notes, and snippets.

@grimmdev
Created March 25, 2017 21:14
Show Gist options
  • Save grimmdev/06b2860490b3d5a2340fe318cf8ae8bf to your computer and use it in GitHub Desktop.
Save grimmdev/06b2860490b3d5a2340fe318cf8ae8bf to your computer and use it in GitHub Desktop.
Setup LAMP PHP7 Debian Jessie
# echo 'deb http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list
# echo 'deb-src http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list
$ cd /tmp
$ wget --no-check-certificate https://www.dotdeb.org/dotdeb.gpg
$ apt-key add dotdeb.gpg
$ rm dotdeb.gpg
$ apt-get update
$ apt-get install php7.0 php7.0-fpm php7.0-gd php7.0-mysql lighttpd nano
$ cp /etc/lighttpd/conf-available/15-fastcgi-php.conf /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
$ nano /etc/lighttpd/conf-enabled/15-fastcgi-php.conf
Change or append till you get this.
fastcgi.server += ( ".php" =>
((
"bin-path" => "/usr/bin/php-cgi",
"socket" => "/run/php/php7.0-fpm.sock",
"max-procs" => 1,
"bin-environment" => (
"PHP_FCGI_CHILDREN" => "4",
"PHP_FCGI_MAX_REQUESTS" => "10000"
),
"bin-copy-environment" => (
"PATH", "SHELL", "USER"
),
"broken-scriptfilename" => "enable"
))
)
Then use CRTL + X and press Y and Enter.
$ systemctl restart lighttpd.service
$ nano /var/www/html/test.php
<?php
mkdir("something");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment