How can I have homestead as well as local PHP environment working together at the same time on my mac.
I am currently using homestead for laravel applications.. I want to have a separate local PHP ENV on my mac so that I can work on non laravel projects.
I would like to have both the EVN active at the same time..
I am currently using MacOS High Sierra..
I am looking for links that will guide me through the process. Thanks in advance.
@tykus I have installed homestead which is working fine.. I am just worried If I install one more local server then that might screw my homestead.. I am worried if ports might conflict with each others.
On the mac you can set as many new sites in your host file and Homestead.yaml file as you want. You can have multiple sites Laravel and non-laravel sites working together.
Homestead.yaml file
ip: "192.168.10.10"
memory: 2048
cpus: 2
provider: virtualbox
natdnshostresolver: off
authorize: ~/.ssh/id_rsa.pub
keys:
- ~/.ssh/id_rsa
folders:
- map: ~/projects
to: /home/vagrant/code
sites:
- map: project-1.local
to: /home/vagrant/code/project-1/public
type: "laravel"
- map: project-2.local
to: /home/vagrant/code/project-2/
@skoobi I tried installing magento2 inside homestead but its not loading well. it just redirects to /setup and becomes blank.. so that is the reason I want have have a separate ENV
@skoobi I am now running my magento2 project on php7.2 by specifying it in .yaml file
sites:
- map: me.magento2
to: /home/vagrant/Code/magento2
php: "7.2"
but still no luck. Magento is still struggling to load.. I doubt it might be the problem with memory allocation for the virtual box.. I have set memory to 2048
I deleted the old copy of magento2 and tried reinstalling but while doing that I get Mcrypt error.
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for magento/product-community-edition 2.2.5 -> satisfiable by magento/product-community-edition[2.2.5].
- magento/product-community-edition 2.2.5 requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/7.1/php.ini
- /usr/local/etc/php/7.1/conf.d/php-memory-limits.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Manjunaths-MacBook-Pro:magento2 manjunathpadolkar$ composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition
I assume you're trying to install this via the host and not on homestead (not ssh'd into homestead). You'll either need to update your local hosts php.ini to enable mcrypt (or install it if you don't actually have it), or download the .zip file of it and unpack it. It will run on homestead as-is, but not your local host (until you include mcrypt)