Please note that the following section assumes that PHP versions 7.2 and 5.6 are the only installed versions. Hence, to make the development easier, add the following content to your ~/.bash_profile file. Switching between PHP CLI binary is another uphill task. Starting and stopping services in OSX is a tedious process. Insert the following content exit Bye Shortcuts Let us configure two virtual host files to mock projects of PHP versions 5.6 and 7.2 respectively $ cd /usr/local/var/www/ $ mkdir php56 $ cd php56 We can verify by checking for open listeners on ports 9056 & 9072: $ lsof -Pni4 | grep LISTEN | grep php Start PHP-FPM services $ launchctl load -w $ launchctl load -w ~/Library/LaunchAgents/īefore proceeding further, let’s ensure that PHP-FPM is running. Create the following directory $ mkdir -p ~/Library/LaunchAgentsĬreate soft links for configuration files $ ln -sfv ~/Library/LaunchAgents/ $ ln -sfv ~/Library/LaunchAgents/ Next step is to configure auto-start on system boot. As we would be running the application in the default HTTP port 80, we would require root privileges (Privileged ports > ~/.bash_profile &. Once the installation is complete, the next job would be to configure auto-start for NGINX. Open the terminal software and execute the following command $ brew install nginx Let us assume that your terminal shell is BASH. You can learn to setup brew package manager from the article How to install a package manager for macOS. Super user access ( sudo ) and brew package manager is required to complete the installation. We are considering that the machine does not have any software installed on the default HTTP port 80. It will act as our backend datastore.Īt the time of writing this article, the available versions are listed below MariaDB – A community developed fork of the famous MySQL relational database.We use the PHP-FPM (FastCGI Process Manager) implementation. PHP – Server-side software which handles the data processing.
0 Comments
Leave a Reply. |