MacLion10.7.2 assemble Nginx + PHP-FPM with MacPorts

Source: Internet
Author: User
MacLion10.7.2 install Nginx + PHP-FPMMacLion10.7.2 with MacPorts install Nginx + PHP-FPM with MacPorts? Sudoport-vselfupdate ?? Modify the PHP5 Portfile? Sudovioptlocalvarmacportssourcesrsy Mac Lion 10.7.2 install Nginx + PHP-FPM with MacPorts

Mac Lion 10.7.2 install Nginx + PHP-FPM with MacPorts

?

sudo port -v selfupdate

?

?

Modify the Portfile file of PHP5

?

sudo vi /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/php5/Portfile

?

?

Find configure. args? Add a row:-enable-fpm
Find xinstall ....... Comment out php-cgi

?

?

sudo port install nginx php5 +fastcgi php5-apc php5-mysql +mysqlnd

?

?

Modify nginx configuration file

?

sudo cp /opt/local/etc/nginx/nginx.conf.example /opt/local/etc/nginx/nginx.conf sudo vi /opt/local/etc/nginx/nginx.conf

?

?

Modify the php-fpm configuration file

?

Sudo cp/opt/local/etc/php-fpm.conf.default/opt/local/etc/php-fpm.conf sudo vi/opt/local/etc/php-fpm.conf # find and edit the following content pid = run/php-fpm.pid error_log = log/php-fpm.log listen =/tmp/php-fpm.sock

?

?

Modify the php configuration file

sudo cp /opt/local/etc/php5/php.ini-development /opt/local/etc/php5/php.inisudo vi /opt/local/etc/php5/php.ini

?

?

Install extension

?

sudo port install php5-extension

?

Test the nginx configuration file

sudo nginx -t

?

Other related commands

# Start nginxsudo nginx # restart sudo-s reload # Close sudo-s stop # Test the php-fpm configuration file sudo php-fpm-t # start sudo php-fpm # immediately close (INT, TERM) sudo kill-INT 'cat/opt/local/var/run/php-fpm.pid '# smooth termination (QUIT) sudo kill-QUIT 'cat/opt/local/var/run/php-fpm.pid '# Restart (USR1, USR2) sudo kill-USR2 'cat/opt/local/var/run/php-fpm.pid'

??

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.