pkgin install nginx php55-fpm
calculating dependencies... done.
nothing to upgrade.
7 packages to be installed: xmlcatmgr-2.2nb1 perl-5.20.0nb2 pcre-8.35nb1 php-5.5.16 libxml2-2.9.1nb2 nginx-1.6.0 php55-fpm-5.5.16 (28M to download, 105M to install)proceed ? [Y/n] y
downloading packages...
[...]nginx-1.6.0: Creating group ``www''nginx-1.6.0: Creating user ``www''[...]============================================================================This package has SMF support. You may use svcadm(1M) to 'enable', 'disable'or 'restart' services. To enable the instance(s)for this package, run:
/usr/sbin/svcadm enable svc:/pkgsrc/nginx:default
Use svcs(1) to check on service status. See smf(5)for more information.
============================================================================[...]installing php55-fpm-5.5.16...
php55-fpm-5.5.16: copying /opt/local/share/examples/php/php-fpm.conf to /opt/local/etc/php-fpm.conf
============================================================================This package has SMF support. You may use svcadm(1M) to 'enable', 'disable'or 'restart' services. To enable the instance(s)for this package, run:
/usr/sbin/svcadm enable svc:/pkgsrc/php-fpm:default
Use svcs(1) to check on service status. See smf(5)for more information.
============================================================================
As seen above a www user and www group is created for Nginx/web content. Start the Nginx web-server:
1
svcadm enable nginx
Browse to http://ip-address, and you should see the Nginx welcome page.
Here is a minimal Nginx configuration file (/opt/local/etc/nginx/nginx.conf) to enable PHP-FPM:
Browse to http://ip-address to verify that the PHP installation is working and to view PHP information.
Extensions
Search for available PHP extensions:
12345678910111213141516171819
pkgin search php55-*
php55-zlib-5.5.16nb1 PHP extension for zlib compression
php55-zip-5.5.16 PHP extension for ZIP archive handling
php55-zendoptimizerplus-7.0.0 Zend opcode cache and optimizer for PHP
php55-yaz-1.1.1nb9 PHP extension for YAZ
php55-xsl-5.5.16nb1 PHP extension for XSLT functions
php55-xmlrpc-5.5.16 PHP extension for XML-RPC support
php55-wddx-5.5.16 PHP extension for WDDX support
php55-uploadprogress-1.0.1 PHP extension to track progress of a file upload
php55-tt-rss-fever-plugin-1.2 Fever emulation plugin for Tiny Tiny RSS
php55-tt-rss-1.12 Tiny Tiny RSS is an open source web-based RSS feed reader
php55-tiki6-6.8nb1 Tiki Wiki CMS Groupware web-based application
php55-tidy-5.5.16 PHP extension for tidy functions
php55-sysvshm-5.5.16 PHP extension for SysV shared memory support
php55-sysvsem-5.5.16 PHP extension for SysV semaphore support
php55-sysvmsg-5.5.16 PHP extension for SysV IPC Message Queues support
php55-ssh2-0.12 PHP bindings to the functions of libssh2
php55-ssdeep-1.0.2 PHP extension for ssdeep
[...]
To install a PHP extension install it, add the extension to /opt/local/etc/php.ini, and then restart PHP-FPM:
1234567891011121314151617181920212223242526272829
pkgin -y install php55-gd
calculating dependencies... done.
nothing to upgrade.
4 packages to be installed: png-1.6.12 libjpeg-turbo-1.3.0nb1 freetype2-2.5.3nb1 php55-gd-5.5.16nb1 (2201K to download, 6474K to install)downloading packages...
[...]installing packages...
installing png-1.6.12...
installing libjpeg-turbo-1.3.0nb1...
installing freetype2-2.5.3nb1...
installing php55-gd-5.5.16nb1...
===========================================================================$NetBSD: MESSAGE.module,v 1.2 2004/11/05 21:50:11 jdolecek Exp $To enable this module, add the following to /opt/local/etc/php.ini:
extension=gd.so
and make sure extension_dir points to the dir where gd.so is.
Then restart your PHP5.5-enabled HTTP server to load this module.
===========================================================================pkg_install warnings: 0, errors: 0
reading local summary...
processing local summary...
updating database: 100%
marking php55-gd-5.5.16nb1 as non auto-removable
Restart PHP-FPM
1
svcadm restart php-fpm
Now browse to http://ip-address and check that the extension (gd) is enabled.