L
L
l4m3r2017-06-03 00:09:59
PHP
l4m3r, 2017-06-03 00:09:59

How to develop on a mac at home?

Got an iMac home. Haven't worked with him before. I work as a freelancer in the evenings. Help me choose the right working environment for comfortable development. After reading , I found 3 options:
1) MAMP - seems to be a convenient program, it is convenient to turn off the server, edit the host file, but for me it puts a lot of extra stuff. A bunch of all sorts of ancient php versions that cannot be deleted. And not flexible enough.
2) Just use what is there and install additionally through brew. Out of the box there is Apache and PHP, which can be updated to the latest version. You can install composer, npm, and other packages and use them everywhere. It is annoying that it constantly hangs in the system even when you are not developing. And to turn off, turn on Apache through the console is constantly inconvenient.
3) Vagrant. I read about it, but did not use it. Seems to be the best option. But I don't understand a number of things. As the main advantage, everyone says that the image is easy to transfer between PCs, transfer to a USB flash drive, etc. But why is it at home? It's so doubtful to me. It would be fine in a company, it is convenient to transfer a single environment among employees. Yes, and in development, then in fact what is needed? Use one version of php + web server, upload files via ftp / sftp to the combat one and that's it. And duplication is also annoying: it seems that I already have a box and php and a server and utilities, and put all this on a virtual machine.
Maybe I'm not correct. I don't have much experience. I used to usually do without lokalka at all. Developed directly on the hosting. I feel like this is not correct. And how is it with you?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergej, 2017-06-03
@l4m3r

1) Do not use MAMP, as advised here.
2) Install brew
3) Use brew to install everything you need (I have nginx, php71, pgsql, mariadb, redis, memcache)
4) Disable php56
...
Actually, development is the same as in linux.
Well, then use git.
Develop locally, commit and push to (github, bitbucket etc...) your branch (or task branch).
Next, create a pull request and merge it into the master.
We set up the server so that it automatically or at your request picks up changes from git and applies them on the server.

A
Andrzej Wielski, 2017-06-03
@wielski

It is annoying that it constantly hangs in the system even when you are not developing. And to turn off, turn on Apache through the console is constantly inconvenient.

Apache is built into Mac OS for a reason. It is required for the operation of many internal systems.
In this regard, it is not recommended to disable it .
For good - my own server with git on board (I use gitlab), and work only through it. FTP is evil.
As for your question - Vagrant is the best, but again it is a rather clumsy colossus, albeit quite flexible.
But personally, I installed php7.1 through brew and simply run the project locally with the following command:
I recommend PHPStorm as a development environment. License servers are googled in a couple of seconds. Enjoy.

O
one pavel, 2017-06-03
@onepavel

I use MAMP, the free version is enough.
All ingredients are in one folder.
Convenient to delete, update and configure.

A
Alexander, 2017-06-04
@Sassoft

Use docker for this, generate the desired configuration and work without clogging the system.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question