A command is all done.
sudo port install php55 php55-fpm php55-curl php55-exif php55-gd php55-gettext php55-iconv php55-mbstring php55-mcrypt php 55-mysql php55-memcache php55-odbc php55-opcache php55-openssl php55-oracle php55-postgresql php55-sockets Php55-sqlite php55-xmlrpc php55-zip memcached nginx mysql55
Then it's going to configure something ...
Configure PHP
Go to configuration directory/opt/local/etc/php55
sudo cp./php-fpm.conf.default./php-fpm.confsudo CP./php.ini-development./php.ini can be converted to php.ini-production as needed
Configure Nginx
Go to configuration directory/opt/local/etc/nginx
Build a file fcgi.conf
fastcgi_param gateway_interface cgi/1.1;fastcgi_param server_software nginx;fastcgi_param QUERY_STRING $query _ string;fastcgi_param request_method $request _method;fastcgi_param CONTENT_TYPE $content _type;fastcgi_param content_length $content _length;fastcgi_param script_filename $document _root$fastcgi_script_name;fastcgi_param script_name $fastcgi _script_name;fastcgi_param request_uri $request _uri;fastcgi_param document_uri $document _uri;fastcgi_param document_root $document _ Root;fastcgi_param server_protocol $server _protocol;fastcgi_param remote_addr $remote _addr;fastcgi_param remote_port $remote _port;fastcgi_param server_addr $server _addr;fastcgi_param server_port $server _port;fastcgi_param server_name $server _name;fastcgi _param redirect_status 200;
Modify the nginx.conf is mainly to increase support for PHP
Location ~ \.php$ {root share/nginx/html; Fastcgi_pass 127.0.0.1:9000; Fastcgi_index index.php; Include fcgi.conf; }
Configure MySQL
Install first
Sudo-u _mysql/opt/local/lib/mysql55/bin/mysql_install_db
Set the password for the root account and remove the test database for security settings
sudo mysql_secure_installation
Database directory in/OPT/LOCAL/VAR/DB/MYSQL55
Well, it's so simple ...
The Auto-start
/library/launchdaemons Directory!
Something like this, it's finished.
There may still be people who don't know how to start these software!!
All right... It's useless to write again.
nginx_start sudo launchctl load -w /library/launchdaemons/ org.macports.nginx.plistnginx_stop sudo launchctl unload -w / Library/launchdaemons/org.macports.nginx.plistphp_start sudo launchctl load -w /library/launchdaemons/org.macports.php55-fpm.plistphp_stop sudo launchctl unload -w /Library/LaunchDaemons/org.macports.php55-fpm.plistmemcached_start Sudo launchctl load -w /library/launchdaemons/org.macports.memcached.plistmemcached_stop sudo launchctl unload -w /library/launchdaemons/ org.macports.memcached.plistmysql_start sudo launchctl load -w /library/ launchdaemons/org.macports.mysql55-server.plistmysql_stop sudo launchctl unload -w /library/launchdaemons/org.macports.mySql55-server.plist
Mac Yosemite Installation Configuration nginx+php+mysql+memcached Environment