Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
nndocs:lamp [2015/07/19 18:09] – [PHP-APC] formatting naptastic | nndocs:lamp [2018/07/04 00:19] – we don't use PHP APC anymore. naptastic |
---|
You'll need these: | You'll need these: |
| |
| * This is so wrong |
* ''apt-get -y install libxml2-dev zlib1g-dev libbz2-dev libcurl4-openssl-dev libjpeg8-dev libpng12-dev libmcrypt-dev libaspell-dev libpspell-dev libtidy-dev libxslt1-dev'' | * ''apt-get -y install libxml2-dev zlib1g-dev libbz2-dev libcurl4-openssl-dev libjpeg8-dev libpng12-dev libmcrypt-dev libaspell-dev libpspell-dev libtidy-dev libxslt1-dev'' |
| |
| |
* ''cd'' | * ''cd'' |
* ''<nowiki>wget -O php-5.4.28.tar.bz2 http://www.php.net/get/php-5.4.28.tar.bz2/from/this/mirror</nowiki>'' | * ''<nowiki>curl http://www.php.net/get/php-7.0.16.tar.xz/from/this/mirror | xz -d | tar -x</nowiki>'' |
* ''tar -xvf php-5.4.28.tar.bz2'' | * ''cd php-7.0.16/'' |
* ''cd php-5.4.28/'' | * ''<nowiki>./configure --enable-fpm --prefix=/opt/php70 --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-mbstring --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-mcrypt --enable-pdo --enable-soap --enable-sockets --enable-wddx --with-pcre-regex --with-pdo-mysql=shared --with-pic --with-pspell --with-tidy --with-xmlrpc --with-xsl --with-zlib --with-curl --with-mysqli |
* ''<nowiki>./configure --enable-fpm --prefix=/usr/local --enable-bcmath --enable-calendar --enable-ftp --enable-libxml --enable-mbstring --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --enable-gd-native-ttf --with-mcrypt --with-mysql --enable-pdo --enable-soap --enable-sockets --enable-wddx --enable-zip --with-bz2 --with-kerberos --with-pcre-regex --with-pdo-mysql=shared --with-pic --with-pspell --with-tidy --with-xmlrpc --with-xsl --with-zlib --with-curl</nowiki>'' | </nowiki>'' |
* ''make'' | * ''make'' |
* ''make install'' | * ''make install'' |
| |
"But David," I hear you asking, "Why didn't you put it in /var/run?" Because /var/run is a ramdisk, so /var/run/php-fpm would have to be created every time PHP-FPM starts, and I didn't feel like hacking up the init script any more than I already do. Or I could put the socket files in /var/run not in a directory, but /var/run gets messy enough already. And since PHP's installation process treats /usr/local like its own root filesystem anyway, what the hell, let's do it. | "But David," I hear you asking, "Why didn't you put it in /var/run?" Because /var/run is a ramdisk, so /var/run/php-fpm would have to be created every time PHP-FPM starts, and I didn't feel like hacking up the init script any more than I already do. Or I could put the socket files in /var/run not in a directory, but /var/run gets messy enough already. And since PHP's installation process treats /usr/local like its own root filesystem anyway, what the hell, let's do it. |
| |
==== PHP-APC === | |
| |
* ''<nowiki>wget http://pecl.php.net/get/APC-3.1.13.tgz</nowiki>'' | |
* ''tar -xvf APC-3.1.13.tgz'' | |
* ''cd APC-3.1.13'' | |
* ''phpize'' | |
* ''<nowiki>./configure --enable-apc</nowiki>'' | |
* ''make'' | |
* ''make install'' | |
| |
Add this to the end of ''/usr/local/lib/php.ini'': | |
| |
extension='apc.so' | |
apc.enable=1 | |
apc.shm_size=256m | |
| |
At this point, PHP-FPM is ready to start if you want. | At this point, PHP-FPM is ready to start if you want. |